[Ttssh2-commit] [8438] Merge branch 'trunk' into unicode_buf

scmno****@osdn***** scmno****@osdn*****
2019年 12月 14日 (土) 00:12:01 JST


Revision: 8438
          https://osdn.net/projects/ttssh2/scm/svn/commits/8438
Author:   zmatsuo
Date:     2019-12-14 00:12:00 +0900 (Sat, 14 Dec 2019)
Log Message:
-----------
Merge branch 'trunk' into unicode_buf

- r8436 をマージ

Revision Links:
--------------
    https://osdn.net/projects/ttssh2/scm/svn/commits/8436

Modified Paths:
--------------
    branches/unicode_buf/TTXSamples/TTXResizeMenu/TTXResizeMenu.c
    branches/unicode_buf/TTXSamples/TTXttyrec/TTXttyplay.c
    branches/unicode_buf/doc/en/html/about/contacts.html
    branches/unicode_buf/doc/en/html/about/ctrlseq.html
    branches/unicode_buf/doc/en/html/about/history.html
    branches/unicode_buf/doc/en/html/commandline/teraterm.html
    branches/unicode_buf/doc/en/html/macro/appendixes/negative.html
    branches/unicode_buf/doc/en/html/macro/command/setdlgpos.html
    branches/unicode_buf/doc/en/html/menu/file.html
    branches/unicode_buf/doc/en/html/menu/setup-additional.html
    branches/unicode_buf/doc/en/html/setup/teraterm-win.html
    branches/unicode_buf/doc/en/html/setup/teraterm.html
    branches/unicode_buf/doc/ja/html/about/contacts.html
    branches/unicode_buf/doc/ja/html/about/history.html
    branches/unicode_buf/doc/ja/html/commandline/teraterm.html
    branches/unicode_buf/doc/ja/html/macro/appendixes/negative.html
    branches/unicode_buf/doc/ja/html/macro/command/setdlgpos.html
    branches/unicode_buf/doc/ja/html/menu/file.html
    branches/unicode_buf/doc/ja/html/menu/setup-additional.html
    branches/unicode_buf/doc/ja/html/setup/teraterm-win.html
    branches/unicode_buf/doc/ja/html/setup/teraterm.html
    branches/unicode_buf/installer/release/TERATERM.INI
    branches/unicode_buf/installer/release/lang_utf8/French.lng
    branches/unicode_buf/installer/release/lang_utf8/German.lng
    branches/unicode_buf/installer/release/lang_utf8/Japanese.lng
    branches/unicode_buf/installer/release/lang_utf8/Korean.lng
    branches/unicode_buf/installer/release/lang_utf8/Russian.lng
    branches/unicode_buf/installer/release/lang_utf8/Simplified Chinese.lng
    branches/unicode_buf/installer/release/lang_utf8/Traditional Chinese.lng
    branches/unicode_buf/installer/release/lang_utf8/english.lng
    branches/unicode_buf/installer/teraterm.iss
    branches/unicode_buf/teraterm/common/codeconv.cpp
    branches/unicode_buf/teraterm/common/compat_win.cpp
    branches/unicode_buf/teraterm/common/compat_win.h
    branches/unicode_buf/teraterm/common/dlglib.c
    branches/unicode_buf/teraterm/common/dlglib_cpp.cpp
    branches/unicode_buf/teraterm/common/dlglib_tmpl.cpp
    branches/unicode_buf/teraterm/common/tt_res.h
    branches/unicode_buf/teraterm/common/ttlib.c
    branches/unicode_buf/teraterm/common/ttlib.h
    branches/unicode_buf/teraterm/common/tttypes.h
    branches/unicode_buf/teraterm/teraterm/WSAAsyncGetAddrInfo.c
    branches/unicode_buf/teraterm/teraterm/addsetting.cpp
    branches/unicode_buf/teraterm/teraterm/buffer.c
    branches/unicode_buf/teraterm/teraterm/clipboar.c
    branches/unicode_buf/teraterm/teraterm/tekwin.cpp
    branches/unicode_buf/teraterm/teraterm/ttermpro.rc
    branches/unicode_buf/teraterm/teraterm/ttime.c
    branches/unicode_buf/teraterm/teraterm/ttwinman.c
    branches/unicode_buf/teraterm/teraterm/vtterm.c
    branches/unicode_buf/teraterm/teraterm/vtwin.cpp
    branches/unicode_buf/teraterm/teraterm/vtwin.h
    branches/unicode_buf/teraterm/teraterm/winjump.c
    branches/unicode_buf/teraterm/ttpcmn/ttpcmn.def
    branches/unicode_buf/teraterm/ttpfile/ttfile.c
    branches/unicode_buf/teraterm/ttpmacro/CMakeLists.txt
    branches/unicode_buf/teraterm/ttpmacro/ListDlg.cpp
    branches/unicode_buf/teraterm/ttpmacro/ListDlg.h
    branches/unicode_buf/teraterm/ttpmacro/errdlg.cpp
    branches/unicode_buf/teraterm/ttpmacro/errdlg.h
    branches/unicode_buf/teraterm/ttpmacro/inpdlg.cpp
    branches/unicode_buf/teraterm/ttpmacro/inpdlg.h
    branches/unicode_buf/teraterm/ttpmacro/msgdlg.cpp
    branches/unicode_buf/teraterm/ttpmacro/msgdlg.h
    branches/unicode_buf/teraterm/ttpmacro/statdlg.cpp
    branches/unicode_buf/teraterm/ttpmacro/statdlg.h
    branches/unicode_buf/teraterm/ttpmacro/ttl.c
    branches/unicode_buf/teraterm/ttpmacro/ttl.h
    branches/unicode_buf/teraterm/ttpmacro/ttmacro.cpp
    branches/unicode_buf/teraterm/ttpmacro/ttmbuff.c
    branches/unicode_buf/teraterm/ttpmacro/ttmdlg.cpp
    branches/unicode_buf/teraterm/ttpmacro/ttmmain.cpp
    branches/unicode_buf/teraterm/ttpmacro/ttmmain.h
    branches/unicode_buf/teraterm/ttpmacro/ttmparse.c
    branches/unicode_buf/teraterm/ttpmacro/ttmparse.h
    branches/unicode_buf/teraterm/ttpmacro/ttpmacro.rc
    branches/unicode_buf/teraterm/ttpset/ttset.c
    branches/unicode_buf/ttssh2/ttxssh/auth.c
    branches/unicode_buf/ttssh2/ttxssh/cipher-ctr.c
    branches/unicode_buf/ttssh2/ttxssh/ssh.c
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.c
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.rc
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.v10.vcxproj.filters
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.v11.vcxproj.filters
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.v12.vcxproj.filters
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.v14.vcxproj.filters
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.v15.vcxproj.filters
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.v9.vcproj
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.vcproj

Added Paths:
-----------
    branches/unicode_buf/teraterm/ttpmacro/macrodlgbase.h

-------------- next part --------------
Modified: branches/unicode_buf/TTXSamples/TTXResizeMenu/TTXResizeMenu.c
===================================================================
--- branches/unicode_buf/TTXSamples/TTXResizeMenu/TTXResizeMenu.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/TTXSamples/TTXResizeMenu/TTXResizeMenu.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -97,9 +97,9 @@
     _snprintf_s(tmp, sizeof(tmp), _TRUNCATE, "%dx%d", x, y);
 
   if (c < 15)
-    return _snprintf_s(buff, buffsize, _TRUNCATE, "%s(&%x)", tmp, c+1);
+    return _snprintf_s(buff, buffsize, _TRUNCATE, "%s (&%X)", tmp, c+1);
   else if (c < 35)
-    return _snprintf_s(buff, buffsize, _TRUNCATE, "%s(&%c)", tmp, 'a' + 1 - 9);
+    return _snprintf_s(buff, buffsize, _TRUNCATE, "%s (&%c)", tmp, 'A' + c - 9);
   else
     return _snprintf_s(buff, buffsize, _TRUNCATE, "%s", tmp);
 }

Modified: branches/unicode_buf/TTXSamples/TTXttyrec/TTXttyplay.c
===================================================================
--- branches/unicode_buf/TTXSamples/TTXttyrec/TTXttyplay.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/TTXSamples/TTXttyrec/TTXttyplay.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -24,6 +24,14 @@
 
 static HANDLE hInst; /* Instance handle of TTX*.DLL */
 
+enum ParseMode {
+  MODE_FIRST,
+  MODE_ESC,
+  MODE_CSI,
+  MODE_STRING,
+  MODE_STR_ESC
+};
+
 struct recheader {
 	struct timeval tv;
 	int len;
@@ -241,6 +249,7 @@
 	char tmpbuff[2048];
 	unsigned int spos, dpos;
 	char *ptr;
+	enum ParseMode mode = MODE_FIRST;
 	BOOL speed_changed = FALSE;
 
 	ptr = (char *)buff;
@@ -247,40 +256,85 @@
 	*wbytes = 0;
 
 	for (spos = dpos = 0; spos < len; spos++, ptr++) {
-		switch (*ptr) {
-		  case '1':
-			pvar->speed = 0;
-			speed_changed = TRUE;
-			break;
-		  case 'f':
-		  case 'F':
-		  case '+':
-			if (pvar->speed < 8) {
-				pvar->speed++;
+		switch (mode) {
+		case MODE_FIRST:
+			switch (*ptr) {
+			  case '1':
+				pvar->speed = 0;
 				speed_changed = TRUE;
+				break;
+			  case 'f':
+			  case 'F':
+			  case '+':
+				if (pvar->speed < 8) {
+					pvar->speed++;
+					speed_changed = TRUE;
+				}
+				break;
+			  case 's':
+			  case 'S':
+			  case '-':
+				if (pvar->speed > -8) {
+					pvar->speed--;
+					speed_changed = TRUE;
+				}
+				break;
+			  case 'p':
+			  case 'P':
+				pvar->pause = !(pvar->pause);
+				speed_changed = TRUE;
+				break;
+			  case ' ':
+			  case '.':
+				pvar->wait.tv_sec = 0;
+				break;
+			  case ESC:
+				mode = MODE_ESC;
+				break;
+			  default:
+				if (dpos < sizeof(tmpbuff)) {
+					tmpbuff[dpos++] = *ptr;
+				}
 			}
 			break;
-		  case 's':
-		  case 'S':
-		  case '-':
-			if (pvar->speed > -8) {
-				pvar->speed--;
-				speed_changed = TRUE;
+		case MODE_ESC:
+			switch (*ptr) {
+			case '[':
+				mode = MODE_CSI;
+				break;
+			case 'P': // DCS
+			case ']': // OSC
+			case 'X': // SOS
+			case '^': // PM
+			case '_': // APC
+				mode = MODE_STRING;
+				break;
+			default:
+				mode = MODE_FIRST;
+				break;
 			}
 			break;
-		  case 'p':
-		  case 'P':
-			pvar->pause = !(pvar->pause);
-			speed_changed = TRUE;
+		case MODE_CSI:
+			if (*ptr < ' ' || *ptr > '?') {
+				mode = MODE_FIRST;
+			}
 			break;
-		  case ' ':
-		  case '.':
-			pvar->wait.tv_sec = 0;
+		case MODE_STRING:
+			if (*ptr == ESC) {
+				mode = MODE_STR_ESC;
+			}
+			else if (*ptr == BEL) {
+				mode = MODE_FIRST;
+			}
 			break;
-		  default:
-			if (dpos < sizeof(tmpbuff)) {
-				tmpbuff[dpos++] = *ptr;
+		case MODE_STR_ESC:
+			if (*ptr == '\\') {
+				mode = MODE_FIRST;
 			}
+			else if (*ptr != ESC) {
+				mode = MODE_STRING;
+			}
+			break;
 		}
 	}
 

Modified: branches/unicode_buf/doc/en/html/about/contacts.html
===================================================================
--- branches/unicode_buf/doc/en/html/about/contacts.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/about/contacts.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -57,7 +57,7 @@
 </p>
 
 <address>
-E-mail address of the author (Yutaka Hirata): yutak****@gmail*****
+E-mail address of the author: ttssh****@lists***** 
 (The address may be changed in future.)
 </address>
 

Modified: branches/unicode_buf/doc/en/html/about/ctrlseq.html
===================================================================
--- branches/unicode_buf/doc/en/html/about/ctrlseq.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/about/ctrlseq.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -264,7 +264,7 @@
     = 13    Reports window position.
             <i>Ps2</i> = Omitted, 0, 1
                        Reports whole window position.
-                = 2    Reprots text area position.
+                = 2    Reports text area position.
             Response: CSI 3 ; <i>x</i> ; <i>y</i> t
               <i>x</i>    X position of window.
               <i>y</i>    Y position of window.
@@ -272,7 +272,7 @@
     = 14    Reports window size in pixels.
             <i>Ps2</i> = Omitted, 0, 1
                        Reports text area size.
-                = 2    Reprots whole window size.
+                = 2    Reports whole window size.
             Response: CSI 4 ; <i>y</i> ; <i>x</i> t
               <i>y</i>    Window height in pixels.
               <i>x</i>    Window width in pixels.
@@ -769,8 +769,8 @@
     <tr>
 	<td> 7786 </td>
 	<td> - </td>
-	<td> Enables mouse wheel - cursorkey translation. </td>
-	<td> Disables mouse wheel - cursorkey translation. </td>
+	<td> Enables mouse wheel - cursor key translation. </td>
+	<td> Disables mouse wheel - cursor key translation. </td>
     </tr>
     <tr>
         <td> 8200 </td>

Modified: branches/unicode_buf/doc/en/html/about/history.html
===================================================================
--- branches/unicode_buf/doc/en/html/about/history.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/about/history.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -31,7 +31,7 @@
 
 <h2 id="teraterm">Tera Term</h2>
 
-<h3 id="teraterm_4.105">2019.xx.xx (Ver 4.105)</h3>
+<h3 id="teraterm_4.105">2019.12.7 (Ver 4.105)</h3>
 <ul class="history">
   <li>Changes
     <ul>
@@ -38,11 +38,21 @@
       <li>Added SFMT information on version dialog.</li>
       <li>Changed of indication from "Protocol" to "IP version" and from "UNSPEC" to "AUTO" on <a href="../menu/file-new.html">New connection dialog</a>.</li>
       <li>When the opacity value of the window is temporarily changed by operating the mouse wheel on the title bar of VT window, the tooltip of the opacity value is shown.</li>
-      <li>The location of resizing toolchip is automatically moved to coordinates after resizing.</li>
+      <li>The location of resizing tooltip is automatically moved to coordinates after resizing.</li>
       <li>Added slider for specify the opacity values on the Visual tab of the <a href="../menu/setup-additional.html">Additional settings dialog</a>. When transparency is not available, made opacity not changeable.</li>
-      <li>Eterm look-feel: Added the <a href="../menu/setup-additional.html#MixedThemeFile">Mixed ThemeFile to Background</a> configuration. Also, added the the <a href="../setup/teraterm-ini.html#BGIgnoreThemeFile">BGIgnoreThemeFile</a> entry in the teraterm.ini file. The default value is off.</li>
+      <li>Eterm look-feel: Added the <a href="../menu/setup-additional.html#MixedThemeFile">Mixed ThemeFile to Background</a> configuration. Also, added the <a href="../setup/teraterm-ini.html#BGIgnoreThemeFile">BGIgnoreThemeFile</a> entry in the teraterm.ini file. The default value is off.</li>
       <li>When the opacity values of the <a href="../menu/setup-additional.html">Additional settings dialog</a> is input over than 255, the value is automatically changed to 255 over the dialog.</li>
       <li>Added support for REP control sequence.</li>
+      <li>Added support for xterm ED 3 (clear scroll buffer) control sequence.
+        <ul>
+          <li>Added the <a href="../menu/setup-additional.html#ed3">"Accept clearing scroll buffer from remote"</a> setting on the <a href="../menu/setup-additional.html#TabControlSequence">Control Sequence tab</a> of the <a href="../menu/setup-additional.html">Additional settings dialog</a>. The default value is off.</li>
+        </ul></li>
+	<li>Added <a href="../commandline/teraterm.html#osc52">/OSC52=</a> command line option for change the <a href="../menu/setup-additional.html#ClipboardAccessFromRemote">"Clipboard access from remote"</a> setting.</li>
+      <li>Added the <a href="../menu/file.html#PauseLog">[Pause Logging]</a> and the <a href="../menu/file.html#StopLog">[Stop Logging]</a> menu into the <a href="../menu/file.html">[File]</a> menu.</li>
+      <li>The start of the text selection with the mouse can be delayed by setting.
+        <ul>
+	  <li>Added the <a href="../setup/teraterm-win.html#delayselect">MouseSelectStartDelay</a> entry in the teraterm.ini file. The default value is 0.</li>
+        </ul></li>
 
       <li>Serial port connection
         <ul>
@@ -55,21 +65,32 @@
           <li>The title of <a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> dialog is changed from "Serial port setup" to "Serial port setup and connection".</li>
           <li>The detail information of COM port is added on the <a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> dialog.</li>
           <li>The tooltip of the speed setting is added on the <a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> dialog.</li>
-          <li>The OK button notation in the <a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> dialog is changed refering to the connection state. </li>
+          <li>The OK button notation in the <a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> dialog is changed referring to the connection state. </li>
           <li>The OK button can not be pressed in the <a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> dialog when no COM ports are available.</li>
           <li>Added <a href="../commandline/teraterm.html#cdatabit">/CDATABIT=</a>,  <a href="../commandline/teraterm.html#cparity">/CPARITY=</a>, <a href="../commandline/teraterm.html#cstopbit">/CSTOPBIT=</a>, <a href="../commandline/teraterm.html#cflowctrl">/CFLOWCTRL=</a>, <a href="../commandline/teraterm.html#cdelayperchar">/CDELAYPERCHAR=</a>, <a href="../commandline/teraterm.html#cdelayperline">/CDELAYPERLINE=</a> command line options.</li>
         </ul>
       </li>
+	  <li>MACRO: When <a href="../macro/command/setdlgpos.html">setdlgpos</a> macro command has no argument, the dialog box is located on the default position.</li>
+	  <li>MACRO: The dialog position specified by <a href="../macro/command/setdlgpos.html">setdlgpos</a> becomes to not be out of range in display.</li>
     </ul>
   </li>
 
   <li>Bug fixes
     <ul>
-      <li>The toolchip during resizing can not be displayed on the left and top edge of the desktop. This bug was introduced in 4.103.</li>
-      <li>Eterm look-feel: When a image file is randomly selected with the wallpaper, invalid file may be selected. </li>
-      <li>The help button of File-Log, File-Trasnfer, Setup-Font and Printer dialog does not work well. This bug was introduced in 4.104.</li>
+      <li>The tooltip during resizing can not be displayed on the left and top edge of the desktop. This bug was introduced in 4.103.</li>
+      <li>Eterm look-feel: When an image file is randomly selected with the wallpaper, invalid file may be selected. </li>
+      <li>The help button of File-Log, File-Transfer, Setup-Font and Printer dialog does not work well. This bug was introduced in 4.104.</li>
       <li>Fixed a problem that TTIMESV (Save IME status) / TTIMERS (Restore IME status) control sequences do not work.</li>
-      <li>The help button on the printer dialog can not be shown from Windows 2000 to 10(except Windows95).</li>
+      <li>The help button on the printer dialog can not be shown from Windows 2000 to 10. The help button on the printer dialog can be shown on all Windows except Windows95.</li>
+      <li>The macro window tries not to terminate when ESC key is pressed. This bug was introduced in 4.103.</li>
+      <li>Tera Term tries not to terminate when TEK window is closed. This bug was introduced in 4.103.</li>
+      <li>When the DPI is changed while menu bar hidden, the window size is correctly adjusted.</li>
+      <li>When DPI is changed, an application fault occurs on Windows 8.1.</li>
+      <li>The window title is garbled when receiving the window title setting control sequence which contains the kanji characters.</li>
+      <li>MACRO: The button of yesnobox selected with left or right arrow key is reversed.</li>
+      <li>The help button on the Save setup, Restore setup and Load key map dialog can not be shown.</li>
+      <li>Save setup dialog shows incorrectly "Open as read-only" check-box on Windows95/98/NT4.0.</li>
+      <li>MACRO: Error is displayed correctly when string constant is not terminated.</li>
     </ul>
   </li>
 
@@ -76,9 +97,12 @@
   <li>Misc
     <ul>
       <li>Bug fix: A font(TSPECIAL1.TTF) copy may fail when Tera Term installs from the installer.</li>
-      <li>NOTE: CygTerm+ is supported on Windows Vista or later. Please build CygTerm+'s source code by using Cygwin for older Windows, if CygTerm+ wants to run on older Windows.</li>
+      <li>NOTE: CygTerm+ binary included in the installer becomes to be supported on Windows Vista or later. Please build CygTerm+'s source code by using Cygwin for older Windows, if CygTerm+ wants to run on older Windows.</li>
       <li>upgraded TTSSH to <a href="#ttssh_2.91">2.91</a>.</li>
       <li>upgraded TTProxy to <a href="#ttproxy_1.0.0.26">1.0.0.26</a>.</li>
+      <li>upgraded TTXResizeMenu Plug-in to <a href="#resizemenu_1.06">1.06</a>.</li>
+      <li>upgraded TTXttyrec Plug-in to <a href="#ttyrec_1.04">1.04</a>.</li>
+      <li>Changed e-mail address of <a href="contacts.html">Contacting the author</a>.</li>
     </ul>
   </li>
 </ul>
@@ -160,9 +184,9 @@
 <ul class="history">
   <li>Changes
     <ul>
-      <li>The AlphaBlend VT window can be configured as a different value for each active and inative.</li>
+      <li>The AlphaBlend VT window can be configured as a different value for each active and inactive.</li>
       <li>The value of transparency can be temporarily changed by moving the mouse wheel on the title bar of the VT window.</li>
-      <li>The internal implemention of the VT window was speeded up.</li>
+      <li>The internal implementation of the VT window was speeded up.</li>
       <li>UTF-8: Four bytes character can not be shown yet but can be decoded, the impact range of character corruption was be minimized.</li>
       <li>The language code(CodePage) of the "<a href="../menu/setup-terminal.html">Terminal ([Setup] menu)</a>" dialog(<a href="../usage/unicode.html">Unicode usage</a>).</li>
       <li>MACRO: The macro file can support UTF-8 and UTF-16(with BOM) encoding.</li>
@@ -227,7 +251,7 @@
     <ul>
       <li>added support for multiple files' drag&drop.</li>
       <li>Functional enhancement: <a href="../usage/mouse.html#dragdropwindow">Confirmation dialog by using drag&drop a file</a>.</li>
-      <li>Window size is maximized when the titlie bar is double-clicked if <a href="../menu/setup-terminal.html#TermIsWin">"Term size = win size"</a> setting is on.</li>
+      <li>Window size is maximized when the title bar is double-clicked if <a href="../menu/setup-terminal.html#TermIsWin">"Term size = win size"</a> setting is on.</li>
       <li>added the <a href="../setup/teraterm-win.html#title">Title format configuration</a> on the General tab of the <a href="../menu/setup-additional.html#TitleFormat">Additional settings dialog</a>.</li>
     </ul>
   </li>
@@ -250,7 +274,7 @@
         </ul></li>
       <li>Improved the behavior of window resizing.</li>
       <li>Accept service name instead of the port number on the command line option.</li>
-      <li>added the <a href="../commandline/teraterm.html#speed">/SPEED=</a> command line option which behavior is same as the <a href="../commandline/teraterm.html#baud">/BAUDE=</a> command line option.</li>
+      <li>added the <a href="../commandline/teraterm.html#speed">/SPEED=</a> command line option which behavior is same as the <a href="../commandline/teraterm.html#baud">/BAUD=</a> command line option.</li>
       <li>added the <a href="../macro/command/setspeed.html">setspeed</a> command.</li>
     </ul>
   </li>
@@ -491,7 +515,7 @@
         <ul>
           <li>The function can be enabled at Copy and Paste tab of <a href="../menu/setup-additional.html#TrimTrailingNL">Additional settings dialog</a>.</li>
         </ul></li>
-      <li>When scroll back is used, scroll state is always reseted with user input.</li>
+      <li>When scroll back is used, scroll state is always reset with user input.</li>
       <li>ZMODEM: The default escaped character are added LF and GS by sending.</li>
       <li>The default value of <a href="../setup/teraterm-com.html#maxport">MaxComPort</a> setting is increased from 4 to 256.</li>
       <li>changed <a href="../macro/commandline.html">macro command line</a> behavior.
@@ -568,7 +592,7 @@
           <li>Packet size(1K) can be specified at <del>receiving</del> <ins>sending</ins>.</li>
           <li>The <a href="../macro/command/xmodemrecv.html">xmodemrecv</a> and <a href="../macro/command/xmodemsend.html">xmodemsend</a> macro argument is the same.</li>
         </ul></li>
-      <li>Cancel from remote host at XMODEM transmitter becomes as trasnfer failure.</li>
+      <li>Cancel from remote host at XMODEM transmitter becomes as transfer failure.</li>
       <li>When remote host sends 1K packet against Checksum at XMODEM receiving, Tera Term receives data as Checksum/1K.</li>
       <li>When remote host sends NAK at XMODEM CRC sending, Tera Term sends data as Checksum.</li>
       <li>added configuration for XMODEM, YMODEM and ZMODEM timeout value.
@@ -619,7 +643,7 @@
         </ul></li>
       <li>Eterm look-feel: added the <a href="../menu/setup-additional.html#ImageBrightness">Image Brightness</a> configuration.</li>
       <li>added the Virtual Store path to <a href="../menu/setup-directory.html">Setup directory</a>.</li>
-      <li>The cygterm.cfg is not saved on dialog closing but is saved on the Save setup when <a href="../menu/setup-additional.html#CygTerm">the CygTerm configuration of the Addtional settings</a> is used.</li>
+      <li>The cygterm.cfg is not saved on dialog closing but is saved on the Save setup when <a href="../menu/setup-additional.html#CygTerm">the CygTerm configuration of the Additional settings</a> is used.</li>
       <li>The command line option can be quoted from an offset when the '"' is used.</li>
       <li>When the click-able URL is not double-clicked but single-clicked on the version dialog, the browser can be launched.</li>
       <li>MACRO: added new parameter which can specify an index of selected item at the <a href="../macro/command/listbox.html">listbox</a> macro command.</li>
@@ -711,7 +735,7 @@
 <ul class="history">
   <li>Changes
     <ul>
-      <li>When the [Reset Terminal] on the <a href="../menu/control.html">[Control]</a> is called, the color setup with OSC 10/11 will be reseted.</li>
+      <li>When the [Reset Terminal] on the <a href="../menu/control.html">[Control]</a> is called, the color setup with OSC 10/11 will be reset.</li>
       <li>YMODEM: The block0 packet size meaning end of transfer is 128 byte at all time. Special thanks to mlukoshkov.</li>
       <li>YMODEM: The packet of file information is not fixed size but variable size(128 or 1024byte).</li>
       <li>added the <a href="../macro/command/dirnamebox.html">dirnamebox</a> command.</li>
@@ -841,8 +865,8 @@
       <li>Fixed some bugs regarding Debug mode
         <ul>
           <li>When the debug mode is entered, the insertion mode and the auto-wrap mode may be changed.</li>
-          <li>When the debug mode is entered, the character attribute can not be reseted.</li>
-          <li>When the debug mode is leaved, the character attribute may be reseted.</li>
+          <li>When the debug mode is entered, the character attribute can not be reset.</li>
+          <li>When the debug mode is leaved, the character attribute may be reset.</li>
         </ul></li>
     </ul>
   </li>
@@ -1351,7 +1375,7 @@
   <li>Bug fixes
     <ul>
       <li>The log file which name length is 80 bytes over can not be opened.</li>
-      <li>When the meta key is enabled, the Control and Meta key is redundantly inputed.</li>
+      <li>When the meta key is enabled, the Control and Meta key is redundantly input.</li>
     </ul>
   </li>
 
@@ -1864,7 +1888,7 @@
         </ul></li>
       <li>Disabled the "Eterm lookfeel" check-box on the <a href="../menu/setup-additional.html">Additional settings dialog</a>. If a user enables the feature, directly edit the teraterm.ini file.</li>
       <li>The hidden fonts can be shown on the font selection dialog with Windows 7 beta(build7000).</li>
-      <li>added support for specifying the reverser color.
+      <li>added support for specifying the reversed color.
         <ul>
           <li>added VTReverseColor entry in teraterm.ini file.<br>
               Notice: This function is disabled for the backward compatibility when a user selects the upgrade installation. If a user want to enable this feature, turn on the EnableReverseAttrColor entry.</li>
@@ -3018,7 +3042,7 @@
 <ul class="history">
   <li>Serial ports larger than COM4</li>
   <li>Baud rate of 14400</li>
-  <li>User shortcut keys "EditCLS", "EditCLS", "ControlOpenTEK" and "ControlCloseTEK".</li>
+  <li>User shortcut keys "EditCLS", "EditCLB", "ControlOpenTEK" and "ControlCloseTEK".</li>
   <li>Macro commands "clearscreen", "code2str", "enablekeyb", "filemarkptr", "fileseekback", "filestrseek2", "findclose", "findfirst", "findnext", "getdir", "kmtfinish", "kmtget", "makepath", "sendkcode", "setdir", "setexitcode", "str2code" and "testlink".</li>
   <li>Macro operator "%".</li>
   <li>Macro: a comment can be placed in any line.</li>
@@ -3217,7 +3241,7 @@
 
 <h2 id="ttssh">TTSSH</h2>
 
-<h3 id="ttssh_2.91">2019.xx.xx (Ver 2.91)</h3>
+<h3 id="ttssh_2.91">2019.12.7 (Ver 2.91)</h3>
 <ul class="history">
   <li>Changes
     <ul>
@@ -3226,6 +3250,7 @@
       <li>The LogLevel entry is added on the <a href="../menu/setup-ssh.html#LogLevel">Setup dialog</a>.</li>
       <li>The help button are added on the <a href="../menu/setup-ssh.html">Setup dialog</a>, <a href="../menu/setup-sshauth.html">Authentication Setup dialog</a>, <a href="../menu/setup-sshforward.html">Forwarding dialog</a> and <a href="../menu/setup-sshkeygenerator.html">Key Generator dialog</a>.</li>
       <li>When the network is disconnected from SSH server side, the known_hosts and user authentication dialog are automatically closed while the dialog is shown.</li>
+      <li>Changed the error message when unable to open local file.</li>
     </ul>
   </li>
 
@@ -3237,6 +3262,8 @@
       <li>The problem is improved in the user authentication dialog that the delay occurs when the focus is moved from the user name to passphrase by using TAB key after entering the user name.</li>
       <li>When the user name is left blank in the user authentication dialog, the focus may not be moved from the user name to the pull-down menu on the right side with TAB key.</li>
       <li>Fixed a port forwarding issue that closes the client connection before completing all data transmission.</li>
+      <li>Incorrect process ID is recorded in TTSSH.LOG before connecting.</li>
+      <li>Authentication banner cannot display correctly when banner string contains character other than US-ASCII.</li>
     </ul>
   </li>
 
@@ -3287,7 +3314,7 @@
   <li>Bug fixes
     <ul>
       <li>garbage data is added to the CipherOrder and MacOrder settings when saving settings.</li>
-      <li>when echo flag is 1 in the server's authentication informatin message, password string is masked on the keyboard-interactive authentication dialog.</li>
+      <li>when echo flag is 1 in the server's authentication information message, password string is masked on the keyboard-interactive authentication dialog.</li>
     </ul>
   </li>
 
@@ -3744,7 +3771,7 @@
 <ul class="history">
   <li>Changes
     <ul>
-      <li>added support for the key exchange of Curve25519 elliptic curve DH(Diffe Hellman) algorithm.
+      <li>added support for the key exchange of Curve25519 elliptic curve DH(Diffie Hellman) algorithm.
         <ul>
           <li><a href="../menu/setup-sshkeygenerator.html">Key Generator</a> supports the ED25519 authentication key.</li>
           <li><a href="../menu/setup-sshkeygenerator.html">Key Generator</a> supports the bcrypt KDF format of the RSA/DSA/ECDSA private key.</li>
@@ -3920,7 +3947,7 @@
   <li>Changes
     <ul>
       <li>When the SSH version of the TTSSH does not match the server protocol version, a user can not connect.</li>
-      <li>The control characters(^A-^_) can be inputed as the password string on the key generator dialog.</li>
+      <li>The control characters(^A-^_) can be input as the password string on the key generator dialog.</li>
       <li>added the <a href="../usage/ssh.html#VerifyHostKeyDNS">SSHFP RR</a> on the <a href="../usage/ssh.html#securitywarning">Security Warning</a> dialog.
         <ul>
           <li>added the "Verify hostkey fingerprint by DNS" check-box on the "<a href="../menu/setup-ssh.html">TTSSH: Setup</a>" dialog box.</li>
@@ -4231,7 +4258,7 @@
          <li>Only support for SSH2 protocol.</li>
          <li>Not supporting for SFTP(SSH File Transfer Protocol).</li>
        </ul></li>
-      <li>Bug fix: TCP disconnection was mis-detected in the packet sending. This bug was introduced in in TSSH 1.01 because SSH heartbeat thread was not thread-safe.</li>
+      <li>Bug fix: TCP disconnection was mis-detected in the packet sending. This bug was introduced in in TTSSH 1.01 because SSH heartbeat thread was not thread-safe.</li>
       <li>Bug fix: SSH is disabled when "/ssh1" or "/ssh2" is included in host name on New Connection dialog.</li>
       <li>Bug fix: Twice sending SSH2_MSG_SERVICE_REQUEST packet when the user default is not specified and the user authentication method is challenge, /ask4passwd is specified at command line parameter.</li>
       <li>Bug fix: TIS authentication dialog would not appear when CheckAuthListFirst entry is off and the user authentication method is challenge, /ask4passwd is specified at command line parameter.</li>
@@ -4875,7 +4902,7 @@
 
 <h2 id="ttproxy">TTProxy</h2>
 
-<h3 id="ttproxy_1.0.0.26">2019.xx.xx (Ver 1.0.0.26)</h3>
+<h3 id="ttproxy_1.0.0.26">2019.12.7 (Ver 1.0.0.26)</h3>
 <ul class="history">
   <!-- li>Changes
     <ul>
@@ -4885,7 +4912,7 @@
 
   <li>Bug fixes
     <ul>
-      <li>When the HTTP proxy connection fails and the status code is other than 400,401,403,405,406,407, invalid string are shown in the message box.</li>
+      <li>When the HTTP proxy connection fails and the status code is other than 400,401,403,405,406,407, invalid string is shown in the message box.</li>
     </ul>
   </li>
 </ul>
@@ -5162,6 +5189,11 @@
 </ul>
 
 <h2 id="resizemenu">TTXResizeMenu</h2>
+<h3 id="resizemenu_1.06">2019.12.7 (Ver 1.06)</h3>
+<ul class="history">
+  <li>Fixed the access key for the 16th and subsequent entries in the menu.</li>
+</ul>
+
 <h3 id="resizemenu_1.05">2018.11.30 (Ver 1.05)</h3>
 <ul class="history">
   <li>added menu id to increase/decrease window size. (for shortcut keys)</li>
@@ -5194,6 +5226,11 @@
 </ul>
 
 <h2 id="ttyrec">TTXttyrec</h2>
+<h3 id="ttyrec_1.04">2019.12.7 (Ver 1.04)</h3>
+<ul class="history">
+  <li>Bug fix: Unexpected pauses and playback speed changes occur when replaying the editing by Vim.</li>
+</ul>
+
 <h3 id="ttyrec_1.03">2017.02.28 (Ver 1.03)</h3>
 <ul class="history">
   <li>added [Replay again] entry under [File] menu that can replay again after one relaying.</li>

Modified: branches/unicode_buf/doc/en/html/commandline/teraterm.html
===================================================================
--- branches/unicode_buf/doc/en/html/commandline/teraterm.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/commandline/teraterm.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -23,7 +23,7 @@
          [/TEKICON=<icon name>] [/TIMEOUT=<connecting timeout value>]
          [/V] [/VTICON=<icon name>] [/W="<window title>"] [/WAITCOM]
          [/X=<window pos (x)] [/Y=<window pos (y)] [/PIPE]
-         [/AUTOWINCLOSE=<flag>]
+         [/AUTOWINCLOSE=<flag>] [/OSC52=<operations to permit>]
          [;<comment>]
 </pre>
 
@@ -213,6 +213,17 @@
   <dt id="nolog">/NOLOG</dt>
   <dd>Start Tera Term without logging.</dd>
 
+  <dt id="osc52">/OSC52=<operations to permit></dt>
+  <dd>
+    operations to permit for clipboard access from remote host.
+    <ul>
+      <li><span class="syntax">/OCS52=off</span> deny read and write access.</li>
+      <li><span class="syntax">/OCS52=read</span> permits read access only</li>
+      <li><span class="syntax">/OCS52=write</span> permits write access only</li>
+      <li><span class="syntax">/OCS52=readwrite</span> permits read and write access</li>
+    </ul>
+  </dd>
+
   <dt id="p">/P=<TCP port#></dt>
   <dd>TCP port number</dd>
 

Modified: branches/unicode_buf/doc/en/html/macro/appendixes/negative.html
===================================================================
--- branches/unicode_buf/doc/en/html/macro/appendixes/negative.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/macro/appendixes/negative.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -15,20 +15,25 @@
 Using a negative integer constant may cause a problem like the following: For example,
 </p>
 
-<pre><code>for i -10 0</code></pre>
+<pre><code>for i 5 -1</code></pre>
 
 <p>
-causes the syntax error, because the second parameter is regarded as "i-10" instead of "i". To avoid this problem, take one of the following solutions:
+causes the syntax error, because the second parameter is regarded as "5-1" instead of "5" and the third parameter is empty. To avoid this problem, take one of the following solutions:
 </p>
 
 <ol>
   <li>Put "0" before "-".
-<pre><code>for i 0-10 0</code></pre>
+<pre><code>for i 5 0-1</code></pre>
   </li>
 
+  <li>Add parenthese.
+<pre><code>for i 5 (-1)</code></pre>
+  </li>
+
   <li>Assign the negative constant to a variable.
-<pre><code>A = -10
-for i A 0
+<pre><code>
+A = -1
+for i 5 A
 </code></pre>
   </li>
 </ol>

Modified: branches/unicode_buf/doc/en/html/macro/command/setdlgpos.html
===================================================================
--- branches/unicode_buf/doc/en/html/macro/command/setdlgpos.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/macro/command/setdlgpos.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -18,15 +18,17 @@
 </p>
 
 <pre class="macro-syntax">
-setdlgpos <x> <y>
+setdlgpos [<x> <y>]
 </pre>
 
 <h2>Remarks</h2>
 
 <p>
-Changes the initial position for dialog boxes opened by the "<a href="inputbox.html">inputbox</a>", "<a href="listbox.html">listbox</a>", "<a href="messagebox.html">messagebox</a>", "<a href="passwordbox.html">passwordbox</a>", "<a href="statusbox.html">statusbox</a>" and "<a href="yesnobox.html">yesnobox</a>" commands. If the status dialog box is displayed, the "setdlgpos" command also moves the dialog box.<br>
+  Changes the initial position for dialog boxes opened by the "<a href="inputbox.html">inputbox</a>", "<a href="listbox.html">listbox</a>", "<a href="messagebox.html">messagebox</a>", "<a href="passwordbox.html">passwordbox</a>", "<a href="statusbox.html">statusbox</a>", "<a href="yesnobox.html">yesnobox</a>" commands and error dialogbox. If the status dialog box is displayed, the "setdlgpos" command also moves the dialog box.<br>
+Set dialog box position to default in main(primary) display when no argument is given. (version 4.105 or later)<br>
 <x> and <y> specify the position (x,y) in the screen coordinate.<br>
-The origin (0,0) is upper left corner of the screen.
+The origin (0,0) is upper left corner of the screen(primary display).<br>
+Move into display, if dialog box position is outside display. (version 4.105 or later)
 </p>
 
 <h2>Example</h2>

Modified: branches/unicode_buf/doc/en/html/menu/file.html
===================================================================
--- branches/unicode_buf/doc/en/html/menu/file.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/menu/file.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -27,6 +27,11 @@
         Logs received characters to a file.
       </dd>
 
+      <dt id="PauseLog">Pause Logging</dt>
+      <dd>
+        Pause logging.
+      </dd>
+
       <dt>Comment to Log...</dt>
       <dd>
         Adds comment to the log file.
@@ -43,6 +48,11 @@
         Displays the log dialog.
       </dd>
 
+      <dt id="StopLog">Stop Logging</dt>
+      <dd>
+        Stop logging and closes the log file.
+      </dd>
+
       <dt><a href="file-sendfile.html">Send file...</a></dt>
       <dd>
         Sends a file to the host.

Modified: branches/unicode_buf/doc/en/html/menu/setup-additional.html
===================================================================
--- branches/unicode_buf/doc/en/html/menu/setup-additional.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/menu/setup-additional.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -191,6 +191,11 @@
 	Notifies the access of clipboard from remote host.
       </dd>
 
+      <dt id="ed3">Accept clearing scroll buffer from remote</dt>
+      <dd>
+        Enables the control sequence for clearing the scroll buffer. When enabled, the clear command clears the scroll buffer.
+      </dd>
+
     </dl>
 
 

Modified: branches/unicode_buf/doc/en/html/setup/teraterm-win.html
===================================================================
--- branches/unicode_buf/doc/en/html/setup/teraterm-win.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/setup/teraterm-win.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -662,5 +662,20 @@
 </pre>
 
 
+<h1 id="delayselect">Delay for stating of text selection</h1>
+<p>
+You can configure the delay for the start of text selection with the mouse and treat it as a click if the time you drag with the mouse is short.<br>
+For example, to handle as a click when the mouse drag time is shorter than 200 msecs, edit the MouseSelectStartDelay line in the [Tera Term] section of the setup file like the following:
+</p>
+
+<pre>
+MouseSelectStartDelay=200
+</pre>
+
+<pre>
+Default:
+MouseSelectStartDelay=0
+</pre>
+
 </body>
 </html>

Modified: branches/unicode_buf/doc/en/html/setup/teraterm.html
===================================================================
--- branches/unicode_buf/doc/en/html/setup/teraterm.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/en/html/setup/teraterm.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -106,6 +106,7 @@
  <li><a href="teraterm-win.html#vttekpos">Fix the initial window position</a></li>
  <li><a href="teraterm-win.html#savevtwinpos">Save the window position</a></li>
  <li><a href="teraterm-win.html#WindowIcon">Change the window icon</a></li>
+ <li><a href="teraterm-win.html#delayselect">Delay for starting of text selection.</a></li>
 </ul>
 
 <h3>Communication</h3>

Modified: branches/unicode_buf/doc/ja/html/about/contacts.html
===================================================================
--- branches/unicode_buf/doc/ja/html/about/contacts.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/ja/html/about/contacts.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -57,7 +57,7 @@
 </p>
 
 <address>
-\x8D\xEC\x8E\xD2(\x95\xBD\x93c \x96L)\x82̃\x81\x81[\x83\x8B\x83A\x83h\x83\x8C\x83X: yutak****@gmail*****
+\x8D\xEC\x8E҂̃\x81\x81[\x83\x8B\x83A\x83h\x83\x8C\x83X: ttssh****@lists*****
 (\x8F\xAB\x97\x88\x95ύX\x82\xB3\x82\xEA\x82邩\x82\xE0\x82\xB5\x82\xEA\x82܂\xB9\x82\xF1\x81B)
 </address>
 

Modified: branches/unicode_buf/doc/ja/html/about/history.html
===================================================================
--- branches/unicode_buf/doc/ja/html/about/history.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/ja/html/about/history.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -31,7 +31,7 @@
 
 <h2 id="teraterm">Tera Term</h2>
 
-<h3 id="teraterm_4.105">2019.xx.xx (Ver 4.105)</h3>
+<h3 id="teraterm_4.105">2019.12.7 (Ver 4.105)</h3>
 <ul class="history">
   <li>\x95ύX
     <ul>
@@ -43,6 +43,16 @@
       <li>Eterm look-feel: <a href="../menu/setup-additional.html#MixedThemeFile">\x95ǎ\x86\x82Ɖ摜\x82\xF0\x8D\xAC\x8D\x87\x82\xB7\x82\xE9</a>\x82\xF0\x90ݒ\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81Bteraterm.ini \x82\xC9 <a href="../setup/teraterm-ini.html#BGIgnoreThemeFile">BGIgnoreThemeFile</a> \x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCDoff\x81B</li>
       <li><a href="../menu/setup-additional.html">Additional settings\x83_\x83C\x83A\x83\x8D\x83O</a>\x82\xCCVisual\x83^\x83u\x82ŕs\x93\xA7\x96\xBE\x93x\x82̒l\x82\xC9256\x88ȏ\xE3\x82\xF0\x93\xFC\x97͂\xB5\x82\xBD\x82Ƃ\xAB\x81A\x83_\x83C\x83A\x83\x8D\x83O\x8F\xE3\x82\xC5255\x82ɕύX\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <li>REP \x90\xA7\x8C\xE4\x83V\x81[\x83P\x83\x93\x83X\x82ɑΉ\x9E\x82\xB5\x82\xBD\x81B</li>
+      <li>xterm \x82\xCC ED 3 (\x83X\x83N\x83\x8D\x81[\x83\x8B\x83o\x83b\x83t\x83@\x8F\xC1\x8B\x8E) \x90\xA7\x8C\xE4\x83V\x81[\x83P\x83\x93\x83X\x82ɑΉ\x9E\x82\xB5\x82\xBD\x81B
+        <ul>
+	  <li><a href="../menu/setup-additional.html">Additional settings\x83_\x83C\x83A\x83\x8D\x83O</a>\x82\xCC<a href="../menu/setup-additional.html#TabControlSequence">Control Sequence\x83^\x83u</a>\x82\xC9<a href="../menu/setup-additional.html#ed3">\x81u\x83\x8A\x83\x82\x81[\x83g\x82\xA9\x82\xE7\x82̃X\x83N\x83\x8D\x81[\x83\x8B\x83o\x83b\x83t\x83@\x8F\xC1\x8B\x8E\x82\xF0\x8E󂯓\xFC\x82\xEA\x82\xE9\x81v</a>\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCDoff\x81B</li>
+        </ul></li>
+	<li><a href="../menu/setup-additional.html#ClipboardAccessFromRemote">\x81u\x83\x8A\x83\x82\x81[\x83g\x82\xA9\x82\xE7\x82̃N\x83\x8A\x83b\x83v\x83{\x81[\x83h\x83A\x83N\x83Z\x83X\x81v</a>\x90ݒ\xE8\x82\xF0\x95ύX\x82\xB7\x82\xE9\x88ׂ̃R\x83}\x83\x93\x83h\x83\x89\x83C\x83\x93\x83I\x83v\x83V\x83\x87\x83\x93\x82Ƃ\xB5\x82\xC4<a href="../commandline/teraterm.html#osc52">/OSC52=</a>\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
+      <li><a href="../menu/file.html">[File]</a> \x83\x81\x83j\x83\x85\x81[\x82\xC9 <a href="../menu/file.html#PauseLog">[Pause Logging]</a> / <a href="../menu/file.html#StopLog">[Stop Logging]</a> \x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
+      <li>\x83}\x83E\x83X\x82ł̃e\x83L\x83X\x83g\x91I\x91\xF0\x82̊J\x8En\x82\xF0\x81A\x90ݒ\xE8\x82Œx\x82点\x82鎖\x82\xAA\x8Fo\x97\x88\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B
+        <ul>
+	  <li>teraterm.ini \x82\xC9 <a href="../setup/teraterm-win.html#delayselect">MouseSelectStartDelay</a> \x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCD0\x81B</li>
+        </ul></li>
 
       <li>\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ڑ\xB1
         <ul>
@@ -60,6 +70,8 @@
           <li><a href="../commandline/teraterm.html#cdatabit">/CDATABIT=</a>,  <a href="../commandline/teraterm.html#cparity">/CPARITY=</a>, <a href="../commandline/teraterm.html#cstopbit">/CSTOPBIT=</a>, <a href="../commandline/teraterm.html#cflowctrl">/CFLOWCTRL=</a>, <a href="../commandline/teraterm.html#cdelayperchar">/CDELAYPERCHAR=</a>, <a href="../commandline/teraterm.html#cdelayperline">/CDELAYPERLINE=</a> \x83R\x83}\x83\x93\x83h\x83\x89\x83C\x83\x93\x83I\x83v\x83V\x83\x87\x83\x93\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
         </ul>
       </li>
+	  <li>MACRO: <a href="../macro/command/setdlgpos.html">setdlgpos</a> \x88\xF8\x90\x94\x82Ȃ\xB5\x82̂Ƃ\xAB\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82̈ʒu\x82\xF0\x83f\x83t\x83H\x83\x8B\x83g\x82Ƃ\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+	  <li>MACRO: <a href="../macro/command/setdlgpos.html">setdlgpos</a> \x82̈ʒu\x8Ew\x92\xE8\x82Ń_\x83C\x83A\x83\x8D\x83O\x82\xAA\x83f\x83B\x83X\x83v\x83\x8C\x83C\x82\xA9\x82\xE7\x82͂ݏo\x82\xB3\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 
@@ -69,7 +81,16 @@
       <li>Eterm look-feel: \x95ǎ\x86\x82ƍ\xAC\x8D\x87\x82\xB7\x82\xE9\x89摜\x83t\x83@\x83C\x83\x8B\x82\xF0\x83\x89\x83\x93\x83_\x83\x80\x82ɑI\x91\xF0\x82\xB7\x82\xE9\x8DہA\x96\xB3\x8A֌W\x82ȃt\x83@\x83C\x83\x8B\x82\xF0\x91I\x91\xF0\x82\xB7\x82邱\x82Ƃ\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
       <li>\x83\x8D\x83O\x8D̎\xE6\x81E\x83t\x83@\x83C\x83\x8B\x91\x97\x90M\x81E\x83t\x83H\x83\x93\x83g\x81E\x88\xF3\x8D\xFC\x83_\x83C\x83A\x83\x8D\x83O\x82̃w\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xAA\x8B@\x94\\x82\xB5\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B4.104\x82ł̃G\x83\x93\x83o\x83O\x81B</li>
       <li>TTIMESV(IME\x8F\xF3\x91ԕۑ\xB6)/TTIMERS(IME\x8F\xF3\x91ԕ\x9C\x8C\xB3)\x90\xA7\x8C\xE4\x83V\x81[\x83P\x83\x93\x83X\x82\xAA\x90\xB3\x82\xB5\x82\xAD\x93\xAE\x82\xA9\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
-      <li>Windows2000\x81`10\x82ŁA\x88\xF3\x8D\xFC\x83_\x83C\x83A\x83\x8D\x83O\x82Ƀw\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD(Windows95\x82͏\x9C\x82\xAD)\x81B</li>
+      <li>Windows2000\x81`10\x82ŁA\x88\xF3\x8D\xFC\x83_\x83C\x83A\x83\x8D\x83O\x82Ƀw\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81BWindows95\x82\xF0\x8F\x9C\x82\xAD\x81A\x82\xB7\x82ׂĂ\xCCWindows\x82ň\xF3\x8D\xFC\x83_\x83C\x83A\x83\x8D\x83O\x82Ƀw\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9\x82悤\x82ɂȂ\xC1\x82\xBD\x81B</li>
+      <li>MACRO \x83E\x83B\x83\x93\x83h\x83E\x82ŁAESC\x83L\x81[\x82\xF0\x89\x9F\x89\xBA\x8E\x9E\x8FI\x97\xB9\x82\xB5\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B4.103\x82ł̃G\x83\x93\x83o\x83O\x81B</li>
+      <li>TEK\x83E\x83B\x83\x93\x83h\x83E\x82\xF0\x95‚\xB6\x82\xBD\x82Ƃ\xAB Tera Term \x8E\xA9\x90g\x82͏I\x97\xB9\x82\xB5\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B4.103\x82ł̃G\x83\x93\x83o\x83O\x81B</li>
+      <li>\x83\x81\x83j\x83\x85\x81[\x83o\x81[\x94\xF1\x95\\x8E\xA6\x8E\x9E\x81ADPI\x82\xAA\x95ω\xBB\x82\xB5\x82\xBD\x82Ƃ\xAB\x83E\x83B\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82𐳂\xB5\x82\xAD\x92\xB2\x90\xAE\x82\xB7\x82\xE9\x82悤\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>Windows 8.1\x82ŁADPI\x82\xAA\x95ω\xBB\x82\xB5\x82\xBD\x82Ƃ\xAB Tera Term \x82\xAA\x8B\xAD\x90\xA7\x8FI\x97\xB9\x82\xB5\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+      <li>\x8A\xBF\x8E\x9A\x82\xF0\x8A܂ރE\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B\x90ݒ萧\x8C\xE4\x83V\x81[\x83P\x83\x93\x83X\x82\xF0\x8E\xF3\x90M\x82\xB5\x82\xBD\x8E\x9E\x81A\x83E\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B\x82\xAA\x95\xB6\x8E\x9A\x89\xBB\x82\xAF\x82\xB7\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>MACRO: yesnobox \x82ō\xB6\x89E\x96\xEE\x88\xF3\x83L\x81[\x82őI\x91\xF0\x82\xB3\x82\xEA\x82\xE9\x83{\x83^\x83\x93\x82\xAA\x8Bt\x82ɂȂ\xC1\x82Ă\xA2\x82\xBD\x82̂\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>\x90ݒ\xE8\x82̕ۑ\xB6\x81E\x90ݒ\xE8\x82̓ǂݍ\x9E\x82݁E\x83L\x81[\x83}\x83b\x83v\x93ǂݍ\x9E\x82݃_\x83C\x83A\x83\x8D\x83O\x82Ƀw\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>Windows95/98/NT4.0\x82ɂ\xA8\x82\xA2\x82āA\x90ݒ\xE8\x82̕ۑ\xB6\x83_\x83C\x83A\x83\x8D\x83O\x82Ɂu\x93ǂݎ\xE6\x82\xE8\x90\xEA\x97p\x83t\x83@\x83C\x83\x8B\x82Ƃ\xB5\x82ĊJ\x82\xAD\x81v\x82Ƃ\xA2\x82\xA4\x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>MACRO: \x95\xB6\x8E\x9A\x97\xF1\x8C^\x92萔\x82̏I\x92[\x82\xAA\x90\xB3\x82\xB5\x82\xAD\x82Ȃ\xA2\x8Fꍇ\x81A\x83G\x83\x89\x81[\x82\xAA\x90\xB3\x82\xB5\x82\xAD\x95\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 
@@ -76,9 +97,12 @@
   <li>\x82\xBB\x82̑\xBC
     <ul>
       <li>\x83C\x83\x93\x83X\x83g\x81[\x83\x89\x82\xA9\x82\xE7\x83C\x83\x93\x83X\x83g\x81[\x83\x8B\x8E\x9E\x81A\x83t\x83H\x83\x93\x83g(TSPECIAL1.TTF)\x82̃R\x83s\x81[\x82\xAA\x8E\xB8\x94s\x82\xB7\x82邱\x82Ƃ\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
-      <li>CygTerm+\x82\xCDWindows Vista\x88ȍ~\x82̃T\x83|\x81[\x83g\x82ƂȂ\xE8\x82܂\xB7\x81B\x8CÂ\xA2Windows\x82œ\xAE\x8D삳\x82\xB9\x82\xBD\x82\xA2\x8Fꍇ\x82́A\x8CÂ\xA2Windows\x82ɑΉ\x9E\x82\xB5\x82\xBDCygwin\x82\xF0\x8Eg\x82\xC1\x82\xC4CygTerm+\x82\xF0\x83\\x81[\x83X\x83R\x81[\x83h\x82\xA9\x82\xE7\x83r\x83\x8B\x83h\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B</li>
+      <li>\x83C\x83\x93\x83X\x83g\x81[\x83\x89\x82ɓ\xAF\x8D\xAB\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9CygTerm+\x83o\x83C\x83i\x83\x8A\x82\xCDWindows Vista\x88ȍ~\x82̃T\x83|\x81[\x83g\x82ƂȂ\xE8\x82܂\xB7\x81B\x8CÂ\xA2Windows\x82œ\xAE\x8D삳\x82\xB9\x82\xBD\x82\xA2\x8Fꍇ\x82́A\x8CÂ\xA2Windows\x82ɑΉ\x9E\x82\xB5\x82\xBDCygwin\x82\xF0\x8Eg\x82\xC1\x82\xC4CygTerm+\x82\xF0\x83\\x81[\x83X\x83R\x81[\x83h\x82\xA9\x82\xE7\x83r\x83\x8B\x83h\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B</li>
       <li><a href="#ttssh_2.91">TTSSH(2.91)</a>\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li>
       <li><a href="#ttproxy_1.0.0.26">TTProxy(1.0.0.26)</a>\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li>
+      <li><a href="#resizemenu_1.06">TTXResizeMenu Plugin(1.06)</a>\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li>
+      <li><a href="#ttyrec_1.04">TTXttyrec Plugin(1.04)</a>\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li>
+      <li><a href="contacts.html">\x8D\xEC\x8E҂ւ̘A\x97\x8D</a>\x82̃\x81\x81[\x83\x8B\x83A\x83h\x83\x8C\x83X\x82\xF0\x95ύX\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 </ul>
@@ -619,7 +643,7 @@
         </ul></li>
       <li>Eterm look-feel: <a href="../menu/setup-additional.html#ImageBrightness">\x94w\x8Ci\x89摜\x82̖\xBE\x82邳</a>\x82\xF0\x90ݒ\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <li><a href="../menu/setup-directory.html">\x90ݒ\xE8\x83t\x83H\x83\x8B\x83_(Setup directory)</a>\x82\xC9 Virtual Store \x83p\x83X\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
-      <li><a href="../menu/setup-additional.html#CygTerm">Addtional settings\x82\xCCCygTerm\x90ݒ\xE8</a>\x82ŁA\x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x95‚\xB6\x82\xBD\x8E\x9E\x82ɐݒ\xE8\x82\xF0\x95ۑ\xB6\x82\xB7\x82\xE9\x82̂ł͂Ȃ\xAD\x81ASave setup\x8E\x9E\x82\xC9 cygterm.cfg \x82\xF0\x95ۑ\xB6\x82\xB7\x82\xE9\x82悤\x82ɕύX\x82\xB5\x82\xBD\x81B</li>
+      <li><a href="../menu/setup-additional.html#CygTerm">Additional settings\x82\xCCCygTerm\x90ݒ\xE8</a>\x82ŁA\x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x95‚\xB6\x82\xBD\x8E\x9E\x82ɐݒ\xE8\x82\xF0\x95ۑ\xB6\x82\xB7\x82\xE9\x82̂ł͂Ȃ\xAD\x81ASave setup\x8E\x9E\x82\xC9 cygterm.cfg \x82\xF0\x95ۑ\xB6\x82\xB7\x82\xE9\x82悤\x82ɕύX\x82\xB5\x82\xBD\x81B</li>
       <li>\x83R\x83}\x83\x93\x83h\x83\x89\x83C\x83\x93\x83I\x83v\x83V\x83\x87\x83\x93\x82̃p\x81[\x83X\x8F\x88\x97\x9D\x82\xF0\x95ύX\x82\xB5\x81A\x83p\x83\x89\x83\x81\x81[\x83^\x82̓r\x92\x86\x82\xA9\x82\xE7\x82ł\xE0 '"' \x82ɂ\xE6\x82\xE9\x83N\x83I\x81[\x83g\x82\xF0\x89”\\x82ɂ\xB5\x82\xBD\x81B</li>
       <li>\x83o\x81[\x83W\x83\x87\x83\x93\x8F\xEE\x95\xF1\x83_\x83C\x83A\x83\x8D\x83O\x82\xCCURL\x82\xF0\x83V\x83\x93\x83O\x83\x8B\x83N\x83\x8A\x83b\x83N\x82Ńu\x83\x89\x83E\x83U\x82\xAA\x8BN\x93\xAE\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <li><a href="../macro/command/listbox.html">listbox</a> \x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82ŁA\x8F\x89\x8A\xFA\x8F\xF3\x91ԂőI\x91\xF0\x82\xB5\x82Ă\xA2\x82鍀\x96ڂ\xF0\x8Ew\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
@@ -922,7 +946,7 @@
       <li>"New connection" \x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9 <a href="../commandline/teraterm.html#es">/ES</a> \x83R\x83}\x83\x93\x83h\x83\x89\x83C\x83\x93\x83I\x83v\x83V\x83\x87\x83\x93\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
       <li>URL\x82̓r\x92\x86\x82ʼn\xFC\x8Ds\x82\xB3\x82\xEA\x82Ă\xA2\x82鎞\x82ɁA\x8Cq\x82\xAA\x82\xC1\x82Ă\xA2\x82\xE9\x82\xE0\x82̂Ƃ\xB5\x82Ĉ\xB5\x82\xA6\x82\xE9\x90ݒ\xE8\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B
         <ul>
-          <li>tearterm.ini\x82\xC9<a href="../setup/teraterm-misc.html#JoinSplitURL">JoinSplitURL, JoinSplitURLIgnoreEOLChar</a>\x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
+          <li>teraterm.ini\x82\xC9<a href="../setup/teraterm-misc.html#JoinSplitURL">JoinSplitURL, JoinSplitURLIgnoreEOLChar</a>\x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
         </ul></li>
       <li>\x83}\x83N\x83\x8D
         <ul>
@@ -1876,7 +1900,7 @@
       <li>EDITOR.CNF \x82\xF0\x83C\x83\x93\x83X\x83g\x81[\x83\x89\x83p\x83b\x83P\x81[\x83W\x82ɐV\x8BK\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
       <li>\x83L\x81[\x83{\x81[\x83h\x90ݒ\xE8\x83t\x83@\x83C\x83\x8B\x82\xAA\x96\xB3\x82\xA2\x8E\x9E\x82̃G\x83f\x83B\x83^\x83L\x81[\x83p\x83b\x83h\x82\xA8\x82\xE6\x82уt\x83@\x83\x93\x83N\x83V\x83\x87\x83\x93\x83L\x81[\x82̓\xAE\x8D\xEC\x82\xF0\x95ύX\x82\xB5\x81A\x91Ή\x9E\x82\xB7\x82\xE9VT\x83L\x81[\x82̃V\x81[\x83P\x83\x93\x83X\x82𑗏o\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B
         <ul>
-          <li>tearterm.ini \x82\xC9 <a href="../setup/teraterm-term.html#StrictKeyMapping">StrictKeyMapping</a> \x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCDoff\x81B</li>
+          <li>teraterm.ini \x82\xC9 <a href="../setup/teraterm-term.html#StrictKeyMapping">StrictKeyMapping</a> \x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCDoff\x81B</li>
         </ul></li>
       <li>\x83o\x81[\x83W\x83\x87\x83\x93\x83_\x83C\x83A\x83\x8D\x83O\x82ɁA\x83r\x83\x8B\x83h\x8A‹\xAB(Visual C++)\x82̃o\x81[\x83W\x83\x87\x83\x93\x82ƃr\x83\x8B\x83h\x83^\x83C\x83\x80\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <li>\x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h "<a href="../macro/command/sprintf2.html">sprintf2</a>" \x82\xF0\x90V\x8BK\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
@@ -3223,7 +3247,7 @@
 
 <h2 id="ttssh">TTSSH</h2>
 
-<h3 id="ttssh_2.91">2019.xx.xx (Ver 2.91)</h3>
+<h3 id="ttssh_2.91">2019.12.7 (Ver 2.91)</h3>
 <ul class="history">
   <li>\x95ύX
     <ul>
@@ -3232,6 +3256,7 @@
       <li><a href="../menu/setup-ssh.html#LogLevel">Setup\x83_\x83C\x83A\x83\x8D\x83O</a>\x82\xC9LogLevel\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
       <li><a href="../menu/setup-ssh.html">Setup\x83_\x83C\x83A\x83\x8D\x83O</a>\x81A<a href="../menu/setup-sshauth.html">Authentication Setup\x83_\x83C\x83A\x83\x8D\x83O</a>\x81A<a href="../menu/setup-sshforward.html">Forwarding\x83_\x83C\x83A\x83\x8D\x83O</a>\x81A<a href="../menu/setup-sshkeygenerator.html">Key Generator\x83_\x83C\x83A\x83\x8D\x83O</a>\x82Ƀw\x83\x8B\x83v\x83{\x83^\x83\x93\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
       <li>known_hosts\x83_\x83C\x83A\x83\x8D\x83O\x82\xA8\x82\xE6\x82у\x86\x81[\x83U\x94F\x8F؃_\x83C\x83A\x83\x8D\x83O\x82̕\\x8E\xA6\x92\x86\x82ɁASSH\x83T\x81[\x83o\x91\xA4\x82\xA9\x82\xE7\x83l\x83b\x83g\x83\x8F\x81[\x83N\x90ؒf\x82\xB3\x82ꂽ\x8Fꍇ\x81A\x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x8E\xA9\x93\xAE\x82ŕ‚\xB6\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+      <li>SCP \x82Ń\x8D\x81[\x83J\x83\x8B\x91\xA4\x82̃t\x83@\x83C\x83\x8B\x82\xAA\x8AJ\x82\xAF\x82Ȃ\xA9\x82\xC1\x82\xBD\x8E\x9E\x82̃\x81\x83b\x83Z\x81[\x83W\x82\xF0\x95ύX\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 
@@ -3243,6 +3268,8 @@
       <li>\x83\x86\x81[\x83U\x94F\x8F؃_\x83C\x83A\x83\x8D\x83O\x82ŁA\x83\x86\x81[\x83U\x96\xBC\x82\xF0\x93\xFC\x97͌\xE3\x82\xCCTAB\x83L\x81[\x82Ńp\x83X\x83t\x83\x8C\x81[\x83Y\x97\x93\x82ւ̈ړ\xAE\x82ɒx\x89\x84\x82\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x89\xFC\x91P\x82\xB5\x82\xBD\x81B</li>
       <li>\x83\x86\x81[\x83U\x94F\x8F؃_\x83C\x83A\x83\x8D\x83O\x82ŁA\x83\x86\x81[\x83U\x96\xBC\x82\xF0\x8B󗓂ɂ\xB5\x82\xBD\x8C\xE3\x81ATAB\x83L\x81[\x82ʼnE\x91\xA4\x82̃v\x83\x8B\x83_\x83E\x83\x93\x83\x81\x83j\x83\x85\x81[\x82Ƀt\x83H\x81[\x83J\x83X\x88ړ\xAE\x82\xB5\x82Ȃ\xA2\x82\xB1\x82Ƃ\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
       <li>\x83|\x81[\x83g\x93]\x91\x97\x82ŁA\x83N\x83\x89\x83C\x83A\x83\x93\x83g\x82Ƀf\x81[\x83^\x82𑗂\xE8\x8FI\x82\xED\x82\xE9\x91O\x82ɐڑ\xB1\x82\xF0\x90ؒf\x82\xB7\x82\xE9\x8Fꍇ\x82\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>\x90ڑ\xB1\x82\xB7\x82\xE9\x82܂ł̊ԁA\x90\xB3\x82\xB5\x82\xAD\x82Ȃ\xA2\x83v\x83\x8D\x83Z\x83XID\x82\xAATTSSH.LOG\x82ɋL\x98^\x82\xB3\x82\xEA\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>\x94F\x8F؃o\x83i\x81[\x82\xC9US-ASCII\x88ȊO\x82̕\xB6\x8E\x9A\x82\xAA\x8A܂܂\xEA\x82鎞\x82ɐ\xB3\x82\xB5\x82\xAD\x95\\x8E\xA6\x82ł\xAB\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 
@@ -3380,7 +3407,7 @@
         <ul>
           <li>teraterm.ini \x82\xC9 AuthBanner \x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCD 1\x81B(VT\x83E\x83B\x83\x93\x83h\x83E\x82ŕ\\x8E\xA6)</li>
         </ul></li>
-      <li>Diffie-Hellman group exchane \x8C\xAE\x8C\xF0\x8A\xB7\x95\xFB\x8E\xAE\x82ł̍ŏ\xAC\x83O\x83\x8B\x81[\x83v\x83T\x83C\x83Y\x82\xF0 2048 \x82ɕύX\x82\xB5\x82\xBD\x81B(RFC 8270)
+      <li>Diffie-Hellman group exchange \x8C\xAE\x8C\xF0\x8A\xB7\x95\xFB\x8E\xAE\x82ł̍ŏ\xAC\x83O\x83\x8B\x81[\x83v\x83T\x83C\x83Y\x82\xF0 2048 \x82ɕύX\x82\xB5\x82\xBD\x81B(RFC 8270)
         <ul>
           <li>\x88ȑO\x82̓\xAE\x8D\xEC\x82ɖ߂\xB7\x82ɂ́Ateraterm.ini \x82\xCC GexMinimalGroupSize \x83G\x83\x93\x83g\x83\x8A\x82\xF0 1024 \x82ɂ\xB7\x82\xE9\x81B</li>
         </ul></li>
@@ -4289,7 +4316,7 @@
 <h3 id="ttssh_2.42">2007.9.30 (Ver 2.42)</h3>
 <ul class="history">
       <li>New connection \x83_\x83C\x83A\x83\x8D\x83O\x82Ŏg\x97p\x92\x86\x82̃V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x82\xF0\x95\\x8E\xA6\x82\xB5\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
-      <li>\x83p\x83X\x83\x8F\x81[\x83h\x94F\x8F؂\xF0\x91I\x91\xF0\x82\xB5\x82Ă\xA2\x82\xE9\x82Ƃ\xAB\x82\xC9 keyboard-interactive \x94F\x8F؂\xF0\x8Eg\x97p\x82\xB7\x82\xE9\x82̂\xF0\x82\xE2\x82߂\xBD\x81B\x82\xB1\x82\xEA\x82ɔ\xBA\x82\xA2\x81AAuthentication Setup \x83_\x83C\x83A\x83\x8D\x83O\x82\xCC keyboard-interactive \x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X\x82\xF0\x8D폜\x82\xB5\x82\xBD\x81Bkeyboard-interactive \x94F\x8F؂\xF0\x8Eg\x97p\x82\xB7\x82邽\x82߂ɂ́Achallange/response \x82\xF0\x91I\x91\xF0\x82\xB7\x82\xE9\x95K\x97v\x82\xAA\x82\xA0\x82\xE9\x81B</li>
+      <li>\x83p\x83X\x83\x8F\x81[\x83h\x94F\x8F؂\xF0\x91I\x91\xF0\x82\xB5\x82Ă\xA2\x82\xE9\x82Ƃ\xAB\x82\xC9 keyboard-interactive \x94F\x8F؂\xF0\x8Eg\x97p\x82\xB7\x82\xE9\x82̂\xF0\x82\xE2\x82߂\xBD\x81B\x82\xB1\x82\xEA\x82ɔ\xBA\x82\xA2\x81AAuthentication Setup \x83_\x83C\x83A\x83\x8D\x83O\x82\xCC keyboard-interactive \x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X\x82\xF0\x8D폜\x82\xB5\x82\xBD\x81Bkeyboard-interactive \x94F\x8F؂\xF0\x8Eg\x97p\x82\xB7\x82邽\x82߂ɂ́Achallenge/response \x82\xF0\x91I\x91\xF0\x82\xB7\x82\xE9\x95K\x97v\x82\xAA\x82\xA0\x82\xE9\x81B</li>
       <li>New connection \x83_\x83C\x83A\x83\x8D\x83O\x82\xCC Host \x83h\x83\x8D\x83b\x83v\x83_\x83E\x83\x93\x82ŁACtrl+p, Ctrl+n, Ctrl+b, Ctrl+f, Ctrl+a, Ctrl+e \x83V\x83\x87\x81[\x83g\x83J\x83b\x83g\x83L\x81[\x82\xF0\x83T\x83|\x81[\x83g\x82\xB5\x82\xBD\x81B\x82\xBB\x82ꂼ\x82ꁪ, \x81\xAB, \x81\xA9, \x81\xA8, Home, End \x83L\x81[\x82ɑΉ\x9E\x82\xB7\x82\xE9\x81B</li>
       <li>\x83p\x83P\x83b\x83g\x91\x97\x90M\x8F\x88\x97\x9D\x82\xC9TCP\x83R\x83l\x83N\x83V\x83\x87\x83\x93\x90ؒf\x82̌댟\x8Fo\x82\xF0\x82\xB5\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <li>\x93\xE0\x95\x94\x82Ŏg\x97p\x82\xB5\x82Ă\xA2\x82镶\x8E\x9A\x97\xF1\x8Cn\x8A֐\x94\x82̃Z\x83L\x83\x85\x83A\x83o\x81[\x83W\x83\x87\x83\x93\x82ւ̑S\x92u\x8A\xB7\x82\xF0\x8E\xC0\x8E{\x81B
@@ -4880,7 +4907,7 @@
 
 <h2 id="ttproxy">TTProxy</h2>
 
-<h3 id="ttproxy_1.0.0.26">2019.xx.xx (Ver 1.0.0.26)</h3>
+<h3 id="ttproxy_1.0.0.26">2019.12.7 (Ver 1.0.0.26)</h3>
 <ul class="history">
   <!--li>\x95ύX
     <ul>
@@ -5169,6 +5196,11 @@
 </ul>
 
 <h2 id="resizemenu">TTXResizeMenu</h2>
+<h3 id="resizemenu_1.06">2019.12.7 (Ver 1.06)</h3>
+<ul class="history">
+  <li>\x83\x81\x83j\x83\x85\x81[\x82\xCC16\x94Ԗڈȍ~\x82̃A\x83N\x83Z\x83X\x83L\x81[\x82\xAA\x8C\xEB\x82\xC1\x82Ă\xA2\x82\xE9\x82̂\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+</ul>
+
 <h3 id="resizemenu_1.05">2018.11.30 (Ver 1.05)</h3>
 <ul class="history">
   <li>\x83E\x83C\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82𑝌\xB8\x82\xB3\x82\xB9\x82\xE9\x88ׂ̃\x81\x83j\x83\x85\x81[ID\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B(\x83V\x83\x87\x81[\x83g\x83J\x83b\x83g\x83L\x81[\x92\xE8\x8B`\x97p)</li>
@@ -5201,6 +5233,11 @@
 </ul>
 
 <h2 id="ttyrec">TTXttyrec</h2>
+<h3 id="ttyrec_1.04">2019.12.7 (Ver 1.04)</h3>
+<ul class="history">
+  <li>Vim \x82̕ҏW\x89\xE6\x96ʂ\xF0\x8DĐ\xB6\x82\xB5\x82\xBD\x8E\x9E\x81A\x97\\x8A\xFA\x82\xB5\x82Ȃ\xA2 Pause \x82\xE2\x8DĐ\xB6\x91\xAC\x93x\x82̕ύX\x82\xAA\x8BN\x82\xB1\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+</ul>
+
 <h3 id="ttyrec_1.03">2017.02.28 (Ver 1.03)</h3>
 <ul class="history">
   <li>\x8DĐ\xB6\x8FI\x97\xB9\x8C\xE3\x81A\x8Dēx\x8DĐ\xB6\x82\xB7\x82\xE9\x88ׂ\xCC [Replay again] \x82\xF0 [File] \x83\x81\x83j\x83\x85\x81[\x82ɒlj\xC1\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>

Modified: branches/unicode_buf/doc/ja/html/commandline/teraterm.html
===================================================================
--- branches/unicode_buf/doc/ja/html/commandline/teraterm.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/ja/html/commandline/teraterm.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -27,7 +27,7 @@
          [/TEKICON=<icon name>] [/TIMEOUT=<connecting timeout value>]
          [/V] [/VTICON=<icon name>] [/W="<window title>"] [/WAITCOM]
          [/X=<window pos (x)] [/Y=<window pos (y)] [/PIPE]
-         [/AUTOWINCLOSE=<flag>]
+         [/AUTOWINCLOSE=<flag>] [/OSC52=<operations to permit>]
          [;<comment>]
 </pre>
 
@@ -214,6 +214,17 @@
   <dt id="nolog">/NOLOG</dt>
   <dd>\x8BN\x93\xAE\x8E\x9E\x82Ƀ\x8D\x83O\x82\xF0\x8AJ\x8En\x82\xB5\x82Ȃ\xA2</dd>
 
+  <dt id="osc52">/OSC52=<operations to permit></dt>
+  <dd>
+    \x83z\x83X\x83g\x82\xA9\x82\xE7\x82̃N\x83\x8A\x83b\x83v\x83{\x81[\x83h\x83A\x83N\x83Z\x83X\x82ŋ\x96\x89‚\xB7\x82鑀\x8D\xEC
+    <ul>
+      <li><span class="syntax">/OSC52=off</span> \x8B\x96\x89‚\xB5\x82Ȃ\xA2</li>
+      <li><span class="syntax">/OSC52=read</span> \x93ǂݍ\x9E\x82݂̂݋\x96\x89‚\xB7\x82\xE9</li>
+      <li><span class="syntax">/OSC52=write</span> \x8F\x91\x82\xAB\x8D\x9E\x82݂̂݋\x96\x89‚\xB7\x82\xE9</li>
+      <li><span class="syntax">/OSC52=readwrite</span> \x93ǂݏ\x91\x82\xAB\x82\xF0\x8B\x96\x89‚\xB7\x82\xE9</li>
+    </ul>
+  </dd>
+
   <dt id="p">/P=<TCP port#></dt>
   <dd>TCP \x83|\x81[\x83g\x94ԍ\x86</dd>
 

Modified: branches/unicode_buf/doc/ja/html/macro/appendixes/negative.html
===================================================================
--- branches/unicode_buf/doc/ja/html/macro/appendixes/negative.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/ja/html/macro/appendixes/negative.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -14,20 +14,25 @@
 \x83R\x83}\x83\x93\x83h\x82̃p\x83\x89\x83\x81\x81[\x83^\x82ɕ\x89\x82̐\xAE\x90\x94\x92萔\x82\xF0\x8Eg\x97p\x82\xB7\x82\xE9\x8Fꍇ\x81A\x88ȉ\xBA\x82̂悤\x82Ȗ\xE2\x91肪\x94\xAD\x90\xB6\x82\xB7\x82\xE9\x8Fꍇ\x82\xAA\x82\xA0\x82\xE9\x81B\x97Ⴆ\x82΁A
 </p>
 
-<pre><code>for i -10 0</code></pre>
+<pre><code>for i 5 -1</code></pre>
 
 <p>
-\x82\xB1\x82̃R\x83}\x83\x93\x83h\x82͕\xB6\x96@\x83G\x83\x89\x81[\x82𔭐\xB6\x82\xB7\x82\xE9\x81B\x82Ȃ\xBA\x82Ȃ\xE7\x81A2\x94Ԃ߂̃p\x83\x89\x83\x81\x81[\x83^\x82\xCD "i" \x82ł͂Ȃ\xAD\x82āA"i-10" \x82Ƃ݂Ȃ\xB3\x82\xEA\x82邩\x82\xE7\x82ł\xA0\x82\xE9\x81B\x82\xB1\x82̖\xE2\x91\xE8\x82\xF0\x96h\x82\xAE\x82ɂ͈ȉ\xBA\x82̂\xA2\x82\xB8\x82ꂩ\x82̕\xFB\x96@\x82\xF0\x82Ƃ\xE9\x81B
+\x82\xB1\x82̃R\x83}\x83\x93\x83h\x82͕\xB6\x96@\x83G\x83\x89\x81[\x82𔭐\xB6\x82\xB7\x82\xE9\x81B\x82Ȃ\xBA\x82Ȃ\xE7\x81A2\x94Ԃ߂̃p\x83\x89\x83\x81\x81[\x83^\x82\xCD "5" \x82ł͂Ȃ\xAD\x82āA"5-1" \x82Ƃ݂Ȃ\xB3\x82\xEA\x81A3\x94Ԃ߂̃p\x83\x89\x83\x81\x81[\x83^\x82\xAA\x82Ȃ\xAD\x82Ȃ邩\x82\xE7\x82ł\xA0\x82\xE9\x81B\x82\xB1\x82̖\xE2\x91\xE8\x82\xF0\x96h\x82\xAE\x82ɂ͈ȉ\xBA\x82̂\xA2\x82\xB8\x82ꂩ\x82̕\xFB\x96@\x82\xF0\x82Ƃ\xE9\x81B
 </p>
 
 <ol>
   <li>"-" \x82̑O\x82\xC9 "0" \x82\xF0\x82‚\xAF\x82\xE9\x81B
-<pre><code>for i 0-10 0</code></pre>
+<pre><code>for i 5 0-1</code></pre>
   </li>
 
+  <li>\x8Aۊ\x87\x8Cʂ\xF0\x82‚\xAF\x82\xE9\x81B
+<pre><code>for i 5 (-1)</code></pre>
+  </li>
+
   <li>\x95\x89\x82̐\xAE\x90\x94\x92萔\x82\xF0\x95ϐ\x94\x82ɑ\xE3\x93\xFC\x82\xB5\x82Ă\xA9\x82\xE7\x8Eg\x97p\x82\xB7\x82\xE9\x81B
-<pre><code>A = -10
-for i A 0
+<pre><code>
+A = -1
+for i 5 A
 </code></pre>
   </li>
 </ol>

Modified: branches/unicode_buf/doc/ja/html/macro/command/setdlgpos.html
===================================================================
--- branches/unicode_buf/doc/ja/html/macro/command/setdlgpos.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/ja/html/macro/command/setdlgpos.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -18,15 +18,21 @@
 </p>
 
 <pre class="macro-syntax">
-setdlgpos <x> <y>
+setdlgpos [<x> <y>]
 </pre>
 
 <h2>\x89\xF0\x90\xE0</h2>
 
 <p>
-<a href="inputbox.html">"inputbox"</a>, <a href="listbox.html">"listbox"</a>, <a href="messagebox.html">"messagebox"</a>, <a href="passwordbox.html">"passwordbox"</a>, <a href="statusbox.html">"statusbox"</a>, <a href="yesnobox.html">"yesnobox"</a> \x83R\x83}\x83\x93\x83h\x82ŕ\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82̏\x89\x8A\xFA\x88ʒu\x82\xF0\x95ύX\x82\xB7\x82\xE9\x81B<br>
-\x82܂\xBD\x81A\x83X\x83e\x81[\x83^\x83X\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9\x8Fꍇ\x81Asetdlgpos \x83R\x83}\x83\x93\x83h\x82͂\xBB\x82̃_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82\xF0\x88ړ\xAE\x82\xB3\x82\xB9\x82\xE9\x81B<br>
-<x> \x82\xC6 <y> \x82͉\xE6\x96ʂ̍\xC0\x95W (x,y) \x82\xF0\x95\\x82킷\x81B\x8C\xB4\x93_ (0,0) \x82͉\xE6\x96ʂ̍\xB6\x8F\xE3\x82̋\xF7\x82̈ʒu\x81B
+<a href="inputbox.html">"inputbox"</a>, <a href="listbox.html">"listbox"</a>, <a href="messagebox.html">"messagebox"</a>, <a href="passwordbox.html">"passwordbox"</a>, <a href="statusbox.html">"statusbox"</a>, <a href="yesnobox.html">"yesnobox"</a> \x83R\x83}\x83\x93\x83h\x82ŕ\\x8E\xA6\x82\xB3\x82\xEA\x82\xE9\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x81A\x83G\x83\x89\x81[\x83_\x83C\x83A\x83\x8D\x83O\x95\\x8E\xA6\x88ʒu\x82\xF0\x88ʒu\x82\xF0\x95ύX\x82\xB7\x82\xE9\x81B
+<br>
+\x82܂\xBD\x81A\x83X\x83e\x81[\x83^\x83X\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9\x8Fꍇ\x81Asetdlgpos \x83R\x83}\x83\x93\x83h\x82͂\xBB\x82̃_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82\xF0\x88ړ\xAE\x82\xB3\x82\xB9\x82\xE9\x81B
+<br>
+\x83p\x83\x89\x83\x81\x81[\x83^\x8Fȗ\xAA\x8E\x9E\x81A\x83\x81\x83C\x83\x93\x83f\x83B\x83X\x83v\x83\x8C\x83C(\x83v\x83\x89\x83C\x83}\x83\x8A\x83f\x83B\x83X\x83v\x83\x8C\x83C)\x82̃f\x83t\x83H\x83\x8B\x83g\x82̕\\x8E\xA6\x88ʒu\x82ƂȂ\xE9 (\x83o\x81[\x83W\x83\x87\x83\x93 4.105\x88ȍ~)\x81B
+<br>
+<x> \x82\xC6 <y> \x82͉\xE6\x96ʂ̍\xC0\x95W (x,y) \x82\xF0\x95\\x82킷\x81B\x8C\xB4\x93_ (0,0) \x82̓\x81\x83C\x83\x93\x83f\x83B\x83X\x83v\x83\x8C\x83C\x82̍\xB6\x8F\xE3\x82̋\xF7\x82̈ʒu\x81B
+<br>
+\x83_\x83C\x83A\x83\x8D\x83O\x82\xAA\x83f\x83B\x83X\x83v\x83\x8C\x83C\x82\xA9\x82\xE7\x82͂ݏo\x82\xB7\x8Fꍇ\x82́A\x83f\x83B\x83X\x83v\x83\x8C\x83C\x93\xE0\x82Ɉړ\xAE\x82\xB3\x82\xEA\x82\xE9 (\x83o\x81[\x83W\x83\x87\x83\x93 4.105\x88ȍ~)\x81B
 </p>
 
 <h2>\x97\xE1</h2>

Modified: branches/unicode_buf/doc/ja/html/menu/file.html
===================================================================
--- branches/unicode_buf/doc/ja/html/menu/file.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/ja/html/menu/file.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -27,6 +27,11 @@
         \x8E\xF3\x90M\x82\xB3\x82\xEA\x82镶\x8E\x9A\x82\xF0\x83t\x83@\x83C\x83\x8B\x82ɏ\x91\x82\xAB\x8D\x9E\x82݂܂\xB7\x81B
       </dd>
 
+      <dt id="PauseLog">Pause Logging</dt>
+      <dd>
+        \x83\x8D\x83O\x82̋L\x98^\x82\xF0\x88ꎞ\x92\x86\x92f\x82\xB5\x82܂\xB7\x81B
+      </dt>
+
       <dt>Comment to Log...</dt>
       <dd>
         \x83\x8D\x83O\x83t\x83@\x83C\x83\x8B\x82փR\x83\x81\x83\x93\x83g\x82\xF0\x92lj\xC1\x82\xB7\x82邱\x82Ƃ\xAA\x82ł\xAB\x82܂\xB7\x81B
@@ -43,6 +48,11 @@
         \x83\x8D\x83O\x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x95\\x8E\xA6\x82\xB5\x82܂\xB7\x81B
       </dd>
 
+      <dt id="StopLog">Stop Logging</dt>
+      <dd>
+        \x83\x8D\x83O\x82̋L\x98^\x82\xF0\x8FI\x97\xB9\x82\xB5\x82܂\xB7\x81B
+      </dt>
+
       <dt><a href="file-sendfile.html">Send file...</a></dt>
       <dd>
         \x83t\x83@\x83C\x83\x8B\x82𑗐M\x82\xB5\x82܂\xB7\x81B

Modified: branches/unicode_buf/doc/ja/html/menu/setup-additional.html
===================================================================
--- branches/unicode_buf/doc/ja/html/menu/setup-additional.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/ja/html/menu/setup-additional.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -189,6 +189,11 @@
 	\x83z\x83X\x83g\x82\xA9\x82\xE7\x82̃N\x83\x8A\x83b\x83v\x83{\x81[\x83h\x82ւ̃A\x83N\x83Z\x83X\x82\xF0\x92ʒm\x82\xB7\x82邩\x90ݒ肵\x82܂\xB7\x81B
       </dd>
 
+      <dt id="ed3">Accept clearing scroll buffer from remote</dt>
+      <dd>
+	\x83z\x83X\x83g\x82\xA9\x82\xE7\x82̃X\x83N\x83\x8D\x81[\x83\x8B\x83o\x83b\x83t\x83@\x83N\x83\x8A\x83A\x97v\x8B\x81\x82\xF0\x8E󂯓\xFC\x82\xEA\x82邩\x82\xF0\x90ݒ肵\x82܂\xB7\x81B\x97L\x8C\xF8\x82ɂ\xB7\x82\xE9\x82\xC6 clear \x83R\x83}\x83\x93\x83h\x82ŃX\x83N\x83\x8D\x81[\x83\x8B\x83o\x83b\x83t\x83@\x82\xAA\x8F\xC1\x8B\x8E\x82\xB3\x82\xEA\x82\xE9\x82悤\x82ɂȂ\xE8\x82܂\xB7\x81B
+      </dd>
+
     </dl>
 
 

Modified: branches/unicode_buf/doc/ja/html/setup/teraterm-win.html
===================================================================
--- branches/unicode_buf/doc/ja/html/setup/teraterm-win.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/ja/html/setup/teraterm-win.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -677,5 +677,21 @@
 </pre>
 
 
+<h1 id="delayselect">\x83}\x83E\x83X\x82ł̕\xB6\x8E\x9A\x82̑I\x91\xF0\x82̊J\x8En\x82\xF0\x92x\x82点\x82\xE9</h1>
+<p>
+\x83}\x83E\x83X\x82ł̃e\x83L\x83X\x83g\x82̑I\x91\xF0\x82̊J\x8En\x82\xF0\x92x\x82点\x82āA\x83}\x83E\x83X\x82Ńh\x83\x89\x83b\x83O\x82\xB5\x82\xBD\x8E\x9E\x8AԂ\xAA\x92Z\x82\xA2\x8Fꍇ\x82̓N\x83\x8A\x83b\x83N\x82Ƃ\xB5\x82Ĉ\xB5\x82킹\x82鎖\x82\xAA\x8Fo\x97\x88\x82܂\xB7\x81B<br>
+\x97Ⴆ\x82΁A\x83}\x83E\x83X\x82ł̃h\x83\x89\x83b\x83O\x8E\x9E\x8AԂ\xAA 200 \x83~\x83\x8A\x95b\x82\xE6\x82\xE8\x92Z\x82\xA2\x8Fꍇ\x82ɃN\x83\x8A\x83b\x83N\x82Ƃ\xB7\x82\xE9\x82ɂ́A\x90ݒ\xE8\x83t\x83@\x83C\x83\x8B\x82\xCC [Tera Term] \x83Z\x83N\x83V\x83\x87\x83\x93\x82\xCC MouseSelectStartDelay \x8Ds\x82\xF0\x88ȉ\xBA\x82̂悤\x82ɕύX\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B
+</p>
+
+<pre>
+MouseSelectStartDelay=200
+</pre>
+
+<pre>
+\x8Fȗ\xAA\x8E\x9E:
+MouseSelectStartDelay=0
+</pre>
+
+
 </body>
 </html>

Modified: branches/unicode_buf/doc/ja/html/setup/teraterm.html
===================================================================
--- branches/unicode_buf/doc/ja/html/setup/teraterm.html	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/doc/ja/html/setup/teraterm.html	2019-12-13 15:12:00 UTC (rev 8438)
@@ -108,6 +108,7 @@
  <li><a href="teraterm-win.html#vttekpos">\x83E\x83B\x83\x93\x83h\x83E\x82̏\x89\x8A\xFA\x88ʒu\x82\xF0\x8CŒ肷\x82\xE9</a></li>
  <li><a href="teraterm-win.html#savevtwinpos">\x83E\x83B\x83\x93\x83h\x83E\x88ʒu\x82\xF0\x95ۑ\xB6\x82\xB7\x82\xE9</a></li>
  <li><a href="teraterm-win.html#WindowIcon">\x83E\x83B\x83\x93\x83h\x83E\x83A\x83C\x83R\x83\x93\x82\xF0\x95ύX\x82\xB7\x82\xE9</a></li>
+ <li><a href="teraterm-win.html#delayselect">\x83}\x83E\x83X\x82ł̕\xB6\x8E\x9A\x82̑I\x91\xF0\x82̊J\x8En\x82\xF0\x92x\x82点\x82\xE9</a></li>
 </ul>
 
 <h3>\x92ʐM</h3>

Modified: branches/unicode_buf/installer/release/TERATERM.INI
===================================================================
--- branches/unicode_buf/installer/release/TERATERM.INI	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/release/TERATERM.INI	2019-12-13 15:12:00 UTC (rev 8438)
@@ -465,6 +465,9 @@
 ; Clear screen when window is resized
 ClearOnResize=on
 
+; Accept clearing scroll buffer from remote (xterm ED3)
+ClearScrollBufferFromRemote=off
+
 ; Clear screen after the connection is closed
 ClearScreenOnCloseConnection=off
 
@@ -582,6 +585,9 @@
 ; Maximized window bug tweak (0..2)
 MaximizedBugTweak=2
 
+; Delay for starting of text selection
+MouseSelectStartDelay=0
+
 ; Nonblinking cursor
 NonblinkingCursor=off
 

Modified: branches/unicode_buf/installer/release/lang_utf8/French.lng
===================================================================
--- branches/unicode_buf/installer/release/lang_utf8/French.lng	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/release/lang_utf8/French.lng	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2019-09-11)
+; Updated by TeraTerm Project (2019-11-22)
 ; Last translated (French language) by Francois MOCQ (2010-07-21)
 
 [Tera Term]
@@ -10,9 +10,11 @@
 MENU_FILE_DUPLICATE=D&upliquer la session\tAlt+D
 MENU_FILE_GYGWIN=Connexion Cy&gwin\tAlt+G
 MENU_FILE_LOG=&Journal...
+MENU_FILE_PAUSELOG=Pause Logg&ing
 MENU_FILE_COMMENTLOG=Ajouter un C&ommentaire au Journal...
 MENU_FILE_VIEWLOG=&Voir le Journal
 MENU_FILE_SHOWLOGDIALOG=Boite de dialogue du Journal...
+MENU_FILE_STOPLOG=Stop Logging (&Q)
 MENU_FILE_SENDFILE=&Envoyer un fichier...
 MENU_FILE_CHANGEDIR=&Changer de dossier...
 MENU_FILE_REPLAYLOG=&Reafficher le journal...
@@ -213,6 +215,7 @@
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_READ=read only
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_WRITE=write only
 DLG_TAB_SEQUENCE_CLIPBOARD_NOTIFY=&Notify clipboard access from remote
+DLG_TAB_SEQUENCE_ACCEPT_CLEAR_SBUFF=Accept clearing &scroll buffer from remote
 
 DLG_TAB_COPYPASTE_CONTINUE=Autoriser copie continue de ligne
 DLG_TAB_COPYPASTE_MOUSEPASTE=Interdire coller avec bouton D de la souris

Modified: branches/unicode_buf/installer/release/lang_utf8/German.lng
===================================================================
--- branches/unicode_buf/installer/release/lang_utf8/German.lng	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/release/lang_utf8/German.lng	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2019-09-11)
+; Updated by TeraTerm Project (2019-11-22)
 ; Last translated (German language) by Frederik Schwarzer (2010-05-17)
 
 [Tera Term]
@@ -10,9 +10,11 @@
 MENU_FILE_DUPLICATE=&Verbindung duplizieren\tAlt+D
 MENU_FILE_GYGWIN=&Cygwin-Verbindung\tAlt+G
 MENU_FILE_LOG=&Log...
+MENU_FILE_PAUSELOG=Pause Logg&ing
 MENU_FILE_COMMENTLOG=&Kommentar zum Log
 MENU_FILE_VIEWLOG=Log ansehen
 MENU_FILE_SHOWLOGDIALOG=Sho&w Log dialog...
+MENU_FILE_STOPLOG=Stop Logging (&Q)
 MENU_FILE_SENDFILE=Datei &senden
 MENU_FILE_CHANGEDIR=&Verzeichnis wechseln
 MENU_FILE_REPLAYLOG=&Log abspielen
@@ -213,6 +215,7 @@
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_READ=read only
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_WRITE=write only
 DLG_TAB_SEQUENCE_CLIPBOARD_NOTIFY=&Notify clipboard access from remote
+DLG_TAB_SEQUENCE_ACCEPT_CLEAR_SBUFF=Accept clearing &scroll buffer from remote
 
 DLG_TAB_COPYPASTE_CONTINUE=Mehrere Zeilen kopieren
 DLG_TAB_COPYPASTE_MOUSEPASTE=&Einfügen mit rechter Maustaste aus

Modified: branches/unicode_buf/installer/release/lang_utf8/Japanese.lng
===================================================================
--- branches/unicode_buf/installer/release/lang_utf8/Japanese.lng	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/release/lang_utf8/Japanese.lng	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2019-09-11)
+; Updated by TeraTerm Project (2019-11-22)
 
 [Tera Term]
 DLG_SYSTEM_FONT=MS Pゴシック,12,128
@@ -9,9 +9,11 @@
 MENU_FILE_DUPLICATE=セッションの複製(&U)\tAlt+D
 MENU_FILE_GYGWIN=Cygwin接続(&G)\tAlt+G
 MENU_FILE_LOG=ログ(&L)...
+MENU_FILE_PAUSELOG=ログを中断(&I)
 MENU_FILE_COMMENTLOG=ログにコメントを付加(&O)...
 MENU_FILE_VIEWLOG=ログを表示(&V)
 MENU_FILE_SHOWLOGDIALOG=ログダイアログを表示(&W)...
+MENU_FILE_STOPLOG=ログを終了(&Q)
 MENU_FILE_SENDFILE=ファイル送信(&S)...
 MENU_FILE_CHANGEDIR=ディレクトリを変更(&C)...
 MENU_FILE_REPLAYLOG=ログを再生(&R)...
@@ -212,6 +214,7 @@
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_READ=読込のみ
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_WRITE=書込のみ
 DLG_TAB_SEQUENCE_CLIPBOARD_NOTIFY=リモートからのクリップボードアクセスを通知する(&N)
+DLG_TAB_SEQUENCE_ACCEPT_CLEAR_SBUFF=リモートからのスクロールバッファの消去を受け入れる(&S)
 
 DLG_TAB_COPYPASTE_CONTINUE=継続行コピーを有効にする(&L)
 DLG_TAB_COPYPASTE_MOUSEPASTE=右クリックでの貼り付けを無効にする(&D)

Modified: branches/unicode_buf/installer/release/lang_utf8/Korean.lng
===================================================================
--- branches/unicode_buf/installer/release/lang_utf8/Korean.lng	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/release/lang_utf8/Korean.lng	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2019-09-11)
+; Updated by TeraTerm Project (2019-11-22)
 ; Last translated (Korean language) by Daehong Kim (2013-07-25)
 
 [Tera Term]
@@ -10,9 +10,11 @@
 MENU_FILE_DUPLICATE=세션 복사(&U)\tAlt+D
 MENU_FILE_GYGWIN=Cygwin 연결(&G)\tAlt+G
 MENU_FILE_LOG=로그(&L)...
+MENU_FILE_PAUSELOG=Pause Logg&ing
 MENU_FILE_COMMENTLOG=로그 주석(&O)...
 MENU_FILE_VIEWLOG=로그 보기(&V)
 MENU_FILE_SHOWLOGDIALOG=로그 다이얼로그(&W)...
+MENU_FILE_STOPLOG=Stop Logging (&Q)
 MENU_FILE_SENDFILE=파일 보내기(&S)...
 MENU_FILE_CHANGEDIR=폴더 변경(&C)...
 MENU_FILE_REPLAYLOG=로그 재실행(&R)...
@@ -213,6 +215,7 @@
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_READ=읽기전용
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_WRITE=쓰기 전용
 DLG_TAB_SEQUENCE_CLIPBOARD_NOTIFY=&Notify clipboard access from remote
+DLG_TAB_SEQUENCE_ACCEPT_CLEAR_SBUFF=Accept clearing &scroll buffer from remote
 
 DLG_TAB_COPYPASTE_CONTINUE=연속된 줄 복사 할성화(&L)
 DLG_TAB_COPYPASTE_MOUSEPASTE=마우스 오른쪽 버튼 붙여넣기 비활성화(&D)

Modified: branches/unicode_buf/installer/release/lang_utf8/Russian.lng
===================================================================
--- branches/unicode_buf/installer/release/lang_utf8/Russian.lng	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/release/lang_utf8/Russian.lng	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2019-09-11)
+; Updated by TeraTerm Project (2019-11-22)
 ; Last translated (Russian language) by Ryumik Sergey (2017-07-19)
 
 [Tera Term]
@@ -10,9 +10,11 @@
 MENU_FILE_DUPLICATE=&Повторная сессия\tAlt+D
 MENU_FILE_GYGWIN=Cy&gwin соединение\tAlt+G
 MENU_FILE_LOG=&Лог...
+MENU_FILE_PAUSELOG=Pause Logg&ing
 MENU_FILE_COMMENTLOG=&Комментарии к логу...
 MENU_FILE_VIEWLOG=&Просмотреть лог
 MENU_FILE_SHOWLOGDIALOG=&Показать диалог...
+MENU_FILE_STOPLOG=Stop Logging (&Q)
 MENU_FILE_SENDFILE=&Передать файл...
 MENU_FILE_CHANGEDIR=&Изменить путь...
 MENU_FILE_REPLAYLOG=&Воспроизвести лог...
@@ -213,6 +215,7 @@
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_READ=чтение
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_WRITE=запись
 DLG_TAB_SEQUENCE_CLIPBOARD_NOTIFY=&Уведомлять об удаленном доступе к буферу
+DLG_TAB_SEQUENCE_ACCEPT_CLEAR_SBUFF=Accept clearing &scroll buffer from remote
 
 DLG_TAB_COPYPASTE_CONTINUE=&Возможность продолжения копирования строки
 DLG_TAB_COPYPASTE_MOUSEPASTE=&Отключить вставку правой кнопкой мыши

Modified: branches/unicode_buf/installer/release/lang_utf8/Simplified Chinese.lng
===================================================================
--- branches/unicode_buf/installer/release/lang_utf8/Simplified Chinese.lng	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/release/lang_utf8/Simplified Chinese.lng	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2019-09-11)
+; Updated by TeraTerm Project (2019-11-22)
 ; Last translated (Simplified Chinese language) by LiShaohui (2017-04-11)
 
 [Tera Term]
@@ -10,9 +10,11 @@
 MENU_FILE_DUPLICATE=复制会话(&U)\tAlt+D
 MENU_FILE_GYGWIN=Cygwin连接(&G)\tAlt+G
 MENU_FILE_LOG=日志(&L)...
+MENU_FILE_PAUSELOG=Pause Logg&ing
 MENU_FILE_COMMENTLOG=注释日志(&O)...
 MENU_FILE_VIEWLOG=查看日志(&V)
 MENU_FILE_SHOWLOGDIALOG=显示日志对话框(&W)...
+MENU_FILE_STOPLOG=Stop Logging (&Q)
 MENU_FILE_SENDFILE=发送文件(&S)...
 MENU_FILE_CHANGEDIR=更改目录(&C)...
 MENU_FILE_REPLAYLOG=重播日志(&R)...
@@ -213,6 +215,7 @@
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_READ=只读
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_WRITE=只写
 DLG_TAB_SEQUENCE_CLIPBOARD_NOTIFY=远程通知剪贴板访问(&N)
+DLG_TAB_SEQUENCE_ACCEPT_CLEAR_SBUFF=Accept clearing &scroll buffer from remote
 
 DLG_TAB_COPYPASTE_CONTINUE=多行复制(&L)
 DLG_TAB_COPYPASTE_MOUSEPASTE=禁用右键单击粘贴(&D)

Modified: branches/unicode_buf/installer/release/lang_utf8/Traditional Chinese.lng
===================================================================
--- branches/unicode_buf/installer/release/lang_utf8/Traditional Chinese.lng	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/release/lang_utf8/Traditional Chinese.lng	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2019-09-11)
+; Updated by TeraTerm Project (2019-11-22)
 ; Last translated (Traditional Chinese language) by kikiqqp (2014-09-20)
 
 [Tera Term]
@@ -10,9 +10,11 @@
 MENU_FILE_DUPLICATE=複製視窗(&U)\tAlt+D
 MENU_FILE_GYGWIN=Cygwin連線(&G)\tAlt+G
 MENU_FILE_LOG=日誌(&L)...
+MENU_FILE_PAUSELOG=Pause Logg&ing
 MENU_FILE_COMMENTLOG=註釋日誌(&O)...
 MENU_FILE_VIEWLOG=查看日誌(&V)
 MENU_FILE_SHOWLOGDIALOG=顯示日誌對話框(&W)...
+MENU_FILE_STOPLOG=Stop Logging (&Q)
 MENU_FILE_SENDFILE=發送文件(&S)...
 MENU_FILE_CHANGEDIR=更改目錄(&C)...
 MENU_FILE_REPLAYLOG=重播日誌(&R)...
@@ -213,6 +215,7 @@
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_READ=只讀
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_WRITE=只寫
 DLG_TAB_SEQUENCE_CLIPBOARD_NOTIFY=&Notify clipboard access from remote
+DLG_TAB_SEQUENCE_ACCEPT_CLEAR_SBUFF=Accept clearing &scroll buffer from remote
 
 DLG_TAB_COPYPASTE_CONTINUE=多行複製(&L)
 DLG_TAB_COPYPASTE_MOUSEPASTE=禁用右鍵單擊貼上(&D)

Modified: branches/unicode_buf/installer/release/lang_utf8/english.lng
===================================================================
--- branches/unicode_buf/installer/release/lang_utf8/english.lng	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/release/lang_utf8/english.lng	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,4 +1,4 @@
-; Updated by TeraTerm Project (2019-09-11)
+; Updated by TeraTerm Project (2019-11-22)
 
 [Tera Term]
 DLG_SYSTEM_FONT=System,14,0
@@ -9,9 +9,11 @@
 MENU_FILE_DUPLICATE=D&uplicate session\tAlt+D
 MENU_FILE_GYGWIN=Cy&gwin connection\tAlt+G
 MENU_FILE_LOG=&Log...
+MENU_FILE_PAUSELOG=Pause Logg&ing
 MENU_FILE_COMMENTLOG=C&omment to Log...
 MENU_FILE_VIEWLOG=&View Log
 MENU_FILE_SHOWLOGDIALOG=Sho&w Log dialog...
+MENU_FILE_STOPLOG=Stop Logging (&Q)
 MENU_FILE_SENDFILE=&Send file...
 MENU_FILE_CHANGEDIR=&Change directory...
 MENU_FILE_REPLAYLOG=&Replay Log...
@@ -212,6 +214,7 @@
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_READ=read only
 DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS_WRITE=write only
 DLG_TAB_SEQUENCE_CLIPBOARD_NOTIFY=&Notify clipboard access from remote
+DLG_TAB_SEQUENCE_ACCEPT_CLEAR_SBUFF=Accept clearing &scroll buffer from remote
 
 DLG_TAB_COPYPASTE_CONTINUE=Enable continued &line copy
 DLG_TAB_COPYPASTE_MOUSEPASTE=&Disable mouse R button paste

Modified: branches/unicode_buf/installer/teraterm.iss
===================================================================
--- branches/unicode_buf/installer/teraterm.iss	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/installer/teraterm.iss	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,30 +1,30 @@
 #define AppName "Tera Term"
 #define AppVer "5.0"
-;#define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', '');
+#define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', '');
 
 [InnoIDE_PreCompile]
 Name: makechm.bat
-;Name: build.bat
-Name: build.bat; Parameters: rebuild
+Name: build.bat
+;Name: build.bat; Parameters: rebuild
 
 [InnoIDE_PostCompile]
-Name: makearchive.bat; Parameters: release
+;Name: makearchive.bat; Parameters: release
 
 [PreCompile]
 Name: makechm.bat
-;Name: build.bat
-Name: build.bat; Parameters: rebuild
+Name: build.bat
+;Name: build.bat; Parameters: rebuild
 
 [PostCompile]
-Name: makearchive.bat; Parameters: release
+;Name: makearchive.bat; Parameters: release
 
 [_ISToolPreCompile]
 Name: makechm.bat
-;Name: build.bat
-Name: build.bat; Parameters: rebuild
+Name: build.bat
+;Name: build.bat; Parameters: rebuild
 
 [_ISToolPostCompile]
-Name: makearchive.bat; Parameters: release
+;Name: makearchive.bat; Parameters: release
 
 [Setup]
 AppCopyright=(C) 2004-2019 TeraTerm Project
@@ -51,6 +51,8 @@
 OutputBaseFilename=teraterm-{#snapshot}
 #endif
 PrivilegesRequired=none
+SolidCompression=yes
+Compression=lzma2/ultra64
 
 [Languages]
 Name: en; MessagesFile: compiler:Default.isl
@@ -71,7 +73,8 @@
 Source: ..\teraterm\release\ttpset.dll; DestDir: {app}; Components: TeraTerm; Flags: ignoreversion
 Source: ..\teraterm\release\ttptek.dll; DestDir: {app}; Components: TeraTerm; Flags: ignoreversion
 Source: release\TERATERM.INI; DestDir: {app}; Components: TeraTerm; Flags: onlyifdoesntexist uninsneveruninstall; Permissions: authusers-modify
-Source: release\TSPECIAL1.TTF; DestDir: {fonts}; Components: TeraTerm; Attribs: readonly; Flags: overwritereadonly uninsneveruninstall; FontInstall: Tera Special; Check: isAbleToInstallFont
+Source: release\TSPECIAL1.TTF; DestDir: {fonts}; Components: TeraTerm; Attribs: readonly; Flags: onlyifdoesntexist overwritereadonly uninsneveruninstall; FontInstall: Tera Special; Check: isAbleToInstallFont
+;Source: release\TSPECIAL1.TTF; DestDir: {app}; Components: TeraTerm
 Source: ..\doc\en\teraterm.chm; DestDir: {app}; Components: TeraTerm
 Source: ..\doc\ja\teratermj.chm; DestDir: {app}; Components: TeraTerm
 Source: release\license.txt; DestDir: {app}; Components: TeraTerm

Modified: branches/unicode_buf/teraterm/common/codeconv.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/codeconv.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/codeconv.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -31,6 +31,10 @@
 #include <windows.h>
 #include <string.h>
 #include <assert.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <stdlib.h>
 #include <crtdbg.h>
 #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) || !defined(_MSC_VER)
 #include <stdint.h>
@@ -47,13 +51,6 @@
 typedef unsigned int	uint32_t;
 #endif
 
-#if defined(_DEBUG) && !defined(_CRTDBG_MAP_ALLOC)
-#define malloc(l)     _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)       _free_dbg((p), _NORMAL_BLOCK)
-#define _strdup(s)	  _strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define _wcsdup(s)    _wcsdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#endif
-
 /*
  *	\x8C\xA9\x82‚\xA9\x82\xE7\x82Ȃ\xA2\x8Fꍇ\x82\xCD 0 \x82\xF0\x95Ԃ\xB7
  */

Modified: branches/unicode_buf/teraterm/common/compat_win.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/compat_win.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/compat_win.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -62,6 +62,7 @@
 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);
 
@@ -110,6 +111,7 @@
 	{ "IsValidDpiAwarenessContext", (void **)&pIsValidDpiAwarenessContext },
 	{ "GetDpiForWindow", (void **)&pGetDpiForWindow },
 	{ "MonitorFromRect", (void **)&pMonitorFromRect },
+	{ "AdjustWindowRectEx", (void **)&pAdjustWindowRectEx },
 	{ "AdjustWindowRectExForDpi", (void **)&pAdjustWindowRectExForDpi },
 	{ "SetDlgItemTextW", (void **)&pSetDlgItemTextW },
 	{ "GetDlgItemTextW", (void **)&pGetDlgItemTextW },

Modified: branches/unicode_buf/teraterm/common/compat_win.h
===================================================================
--- branches/unicode_buf/teraterm/common/compat_win.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/compat_win.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -90,6 +90,7 @@
 extern BOOL (WINAPI *pIsValidDpiAwarenessContext)(DPI_AWARENESS_CONTEXT dpiContext);
 extern UINT (WINAPI *pGetDpiForWindow)(HWND hwnd);
 extern HRESULT (WINAPI *pGetDpiForMonitor)(HMONITOR hmonitor, MONITOR_DPI_TYPE dpiType, UINT *dpiX, UINT *dpiY);
+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);

Modified: branches/unicode_buf/teraterm/common/dlglib.c
===================================================================
--- branches/unicode_buf/teraterm/common/dlglib.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/dlglib.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -36,14 +36,13 @@
 #include <stdio.h>
 #include <commctrl.h>
 #include <tchar.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <stdlib.h>
 #include <crtdbg.h>
 #include "ttlib.h"	// for get_lang_font()
 
-#if defined(_DEBUG) && !defined(_CRTDBG_MAP_ALLOC)
-#define malloc(l) _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)   _free_dbg((p), _NORMAL_BLOCK)
-#endif
-
 void EnableDlgItem(HWND HDlg, int FirstId, int LastId)
 {
 	int i;

Modified: branches/unicode_buf/teraterm/common/dlglib_cpp.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/dlglib_cpp.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/dlglib_cpp.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -29,16 +29,15 @@
 /* Routines for dialog boxes */
 
 #include <windows.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <stdlib.h>
 #include <crtdbg.h>
 
 #include "dlglib.h"
 #include "ttlib.h"
 
-#if defined(_DEBUG) && !defined(_CRTDBG_MAP_ALLOC)
-#define malloc(l) _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)   _free_dbg((p), _NORMAL_BLOCK)
-#endif
-
 // \x83_\x83C\x83A\x83\x8D\x83O\x83\x82\x81[\x83_\x83\x8B\x8F\xF3\x91Ԃ̎\x9E\x81AOnIdle()\x82\xF0\x8E\xC0\x8Ds\x82\xB7\x82\xE9
 //#define ENABLE_CALL_IDLE_MODAL	1
 

Modified: branches/unicode_buf/teraterm/common/dlglib_tmpl.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/dlglib_tmpl.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/dlglib_tmpl.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -32,15 +32,12 @@
 
 #include <wchar.h>
 #include <assert.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <stdlib.h>
 #include <crtdbg.h>
 
-#if defined(_DEBUG) && !defined(_CRTDBG_MAP_ALLOC)
-#define malloc(l) _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)   _free_dbg((p), _NORMAL_BLOCK)
-#endif
-
-//#define	_countof(ary)	(sizeof(ary)/sizeof(ary[0]))
-
 // https://docs.microsoft.com/ja-jp/windows/desktop/dlgbox/dlgtemplateex
 // https://www.pg-fl.jp/program/tips/dlgmem.htm
 #pragma pack(push, 1)

Modified: branches/unicode_buf/teraterm/common/tt_res.h
===================================================================
--- branches/unicode_buf/teraterm/common/tt_res.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/tt_res.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -242,14 +242,15 @@
 #define IDC_DAD_NOTE                    2588
 #define IDC_SELECT_ON_ACTIVATE          2589
 #define IDC_MIXED_THEME_FILE            2590
-#define IDC_DEBUG_POPUP_ENABLE          2591
-#define IDC_DEBUG_POPUP_KEY1            2592
-#define IDC_DEBUG_POPUP_KEY2            2593
-#define IDC_DEBUG_CONSOLE_BUTTON        2594
-#define IDC_SENDFILE_FILENAME_BUTTON    2595
-#define IDC_SENDFILE_CHECK_BINARY       2596
-#define IDC_SENDFILE_FILENAME_TITLE     2597
-#define IDC_SENDFILE_FILENAME_EDIT      2598
+#define IDC_ACCEPT_CLEAR_SBUFF          2591
+#define IDC_DEBUG_POPUP_ENABLE          2592
+#define IDC_DEBUG_POPUP_KEY1            2593
+#define IDC_DEBUG_POPUP_KEY2            2594
+#define IDC_DEBUG_CONSOLE_BUTTON        2595
+#define IDC_SENDFILE_FILENAME_BUTTON    2596
+#define IDC_SENDFILE_CHECK_BINARY       2597
+#define IDC_SENDFILE_FILENAME_TITLE     2598
+#define IDC_SENDFILE_FILENAME_EDIT      2599
 #define ID_ACC_SENDBREAK                50001
 #define ID_ACC_COPY                     50002
 #define ID_ACC_NEWCONNECTION            50003
@@ -268,6 +269,8 @@
 #define ID_FILE_COMMENTTOLOG            50121
 #define ID_FILE_VIEWLOG                 50122
 #define ID_FILE_SHOWLOGDIALOG           50123
+#define ID_FILE_PAUSELOG                50124
+#define ID_FILE_STOPLOG                 50125
 #define ID_FILE_SENDFILE                50130
 #define ID_FILE_KERMITRCV               50141
 #define ID_FILE_KERMITGET               50142
@@ -348,7 +351,7 @@
 #define _APS_NO_MFC                     1
 #define _APS_NEXT_RESOURCE_VALUE        128
 #define _APS_NEXT_COMMAND_VALUE         52031
-#define _APS_NEXT_CONTROL_VALUE         2599
+#define _APS_NEXT_CONTROL_VALUE         2600
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif

Modified: branches/unicode_buf/teraterm/common/ttlib.c
===================================================================
--- branches/unicode_buf/teraterm/common/ttlib.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/ttlib.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1916,9 +1916,54 @@
 }
 
 /**
- *	\x83E\x83B\x83\x93\x83h\x83E\x82𒆉\x9B\x82ɔz\x92u\x82\xB7\x82\xE9
+ *	\x83E\x83B\x83\x93\x83h\x83E\x82\xF0\x83f\x83B\x83X\x83v\x83\x8C\x83C\x82\xA9\x82\xE7\x82͂ݏo\x82\xB3\x82Ȃ\xA2\x82悤\x82Ɉړ\xAE\x82\xB7\x82\xE9
+ *	\x82͂ݏo\x82Ă\xA2\x82Ȃ\xA2\x8Fꍇ\x82͈ړ\xAE\x82\xB5\x82Ȃ\xA2
  *
  *	@param[in]	hWnd		\x88ʒu\x82𒲐\xAE\x82\xB7\x82\xE9\x83E\x83B\x83\x93\x83h\x83E
+ */
+void MoveWindowToDisplay(HWND hWnd)
+{
+	RECT desktop;
+	RECT win_rect;
+	int win_width;
+	int win_height;
+	int win_x;
+	int win_y;
+	BOOL modify = FALSE;
+
+	GetDesktopRect(hWnd, &desktop);
+
+	GetWindowRect(hWnd, &win_rect);
+	win_x = win_rect.left;
+	win_y = win_rect.top;
+	win_height = win_rect.bottom - win_rect.top;
+	win_width = win_rect.right - win_rect.left;
+	if (win_y < desktop.top) {
+		win_y = desktop.top;
+		modify = TRUE;
+	}
+	else if (win_y + win_height > desktop.bottom) {
+		win_y = desktop.bottom - win_height;
+		modify = TRUE;
+	}
+	if (win_x < desktop.left) {
+		win_x = desktop.left;
+		modify = TRUE;
+	}
+	else if (win_x + win_width > desktop.right) {
+		win_x = desktop.right - win_width;
+		modify = TRUE;
+	}
+
+	if (modify) {
+		SetWindowPos(hWnd, NULL, win_x, win_y, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
+	}
+}
+
+/**
+ *	\x83E\x83B\x83\x93\x83h\x83E\x82\xF0\x83f\x83B\x83X\x83v\x83\x8C\x83C\x82̒\x86\x89\x9B\x82ɔz\x92u\x82\xB7\x82\xE9
+ *
+ *	@param[in]	hWnd		\x88ʒu\x82𒲐\xAE\x82\xB7\x82\xE9\x83E\x83B\x83\x93\x83h\x83E
  *	@param[in]	hWndParent	\x82\xB1\x82̃E\x83B\x83\x93\x83h\x83E\x82̒\x86\x89\x9B\x82Ɉړ\xAE\x82\xB7\x82\xE9
  *							(NULL\x82̏ꍇ\x83f\x83B\x83X\x83v\x83\x8C\x83C\x82̒\x86\x89\x9B)
  *

Modified: branches/unicode_buf/teraterm/common/ttlib.h
===================================================================
--- branches/unicode_buf/teraterm/common/ttlib.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/ttlib.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -119,6 +119,7 @@
 DllExport void GetMessageboxFont(LOGFONTA *logfont);
 void GetDesktopRect(HWND hWnd, RECT *rect);
 void CenterWindow(HWND hWnd, HWND hWndParent);
+void MoveWindowToDisplay(HWND hWnd);
 
 #define CheckFlag(var, flag)	(((var) & (flag)) != 0)
 

Modified: branches/unicode_buf/teraterm/common/tttypes.h
===================================================================
--- branches/unicode_buf/teraterm/common/tttypes.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/common/tttypes.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -291,6 +291,7 @@
 #define TF_LOCKTUID           1024
 #define TF_INVALIDDECRPSS     2048
 #define TF_PRINTERCTRL        4096
+#define TF_REMOTECLEARSBUFF   8192
 
 // ANSI/Attribute color flags (used in ts.ColorFlag)
 #define CF_PCBOLD16     1
@@ -358,9 +359,11 @@
 #define ISO2022_SHIFT_ALL    (ISO2022_LS | ISO2022_LSR | ISO2022_SS)
 
 // Control Sequence flags (used in ts.CtrlFlag)
+#define CSF_CBNONE	0
 #define CSF_CBWRITE     1
 #define CSF_CBREAD      2
 #define CSF_CBRW        (CSF_CBREAD | CSF_CBWRITE)
+#define CSF_CBMASK	CSF_CBRW
 
 // Debug Flags (used in ts.DebugModes)
 #define DBGF_NONE	0
@@ -714,6 +717,9 @@
 	char DialogFontName[LF_FACESIZE];
 	int DialogFontPoint;
 	int DialogFontCharSet;
+	int ConfigVersion;
+	int RunningVersion;
+	DWORD SelectStartDelay;
 };
 
 typedef struct tttset TTTSet, *PTTSet;

Modified: branches/unicode_buf/teraterm/teraterm/WSAAsyncGetAddrInfo.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/WSAAsyncGetAddrInfo.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/WSAAsyncGetAddrInfo.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -29,12 +29,16 @@
  * WSAAsyncGetAddrInfo.c -- asynchronous version of getaddrinfo
  * Copyright(C) 2000-2003 Jun-ya Kato <kato****@win6*****>
  */
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
 #include <winsock2.h>
 #include <ws2tcpip.h>
+#include <stdlib.h>
+#include <crtdbg.h>
 #include <wspiapi.h>
 #include <windows.h>
 #include <process.h>
-#include <crtdbg.h>
 #include "WSAAsyncGetAddrInfo.h"
 #include "ttwsk.h"
 
@@ -48,12 +52,6 @@
   HANDLE *lpHandle;
 };
 
-#if defined(_DEBUG) && !defined(_CRTDBG_MAP_ALLOC)
-#define malloc(l)	_malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)		_free_dbg((p), _NORMAL_BLOCK)
-#define _strdup(s)	_strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#endif
-
 static unsigned __stdcall getaddrinfo_thread(void * p);
 
 HANDLE PASCAL WSAAsyncGetAddrInfo(HWND hWnd, unsigned int wMsg,

Modified: branches/unicode_buf/teraterm/teraterm/addsetting.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/addsetting.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/addsetting.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -38,6 +38,7 @@
 #include <time.h>
 #include <tchar.h>
 #define _CRTDBG_MAP_ALLOC
+#include <stdlib.h>
 #include <crtdbg.h>
 
 #include "teraterm.h"
@@ -241,6 +242,7 @@
 		{ IDC_CLIPBOARD_ACCESS_LABEL, "DLG_TAB_SEQUENCE_CLIPBOARD_ACCESS" },
 
 		{ IDC_CLIPBOARD_NOTIFY, "DLG_TAB_SEQUENCE_CLIPBOARD_NOTIFY" },
+		{ IDC_ACCEPT_CLEAR_SBUFF, "DLG_TAB_SEQUENCE_ACCEPT_CLEAR_SBUFF" },
 	};
 	SetDlgTexts(m_hWnd, TextInfos, _countof(TextInfos), ts.UILanguageFile);
 
@@ -306,6 +308,9 @@
 	SetCheck(IDC_CLIPBOARD_NOTIFY, ts.NotifyClipboardAccess);
 	EnableDlgItem(IDC_CLIPBOARD_NOTIFY, HasBalloonTipSupport() ? TRUE : FALSE);
 
+	// (10)IDC_ACCEPT_CLEAR_SBUFF
+	SetCheck(IDC_ACCEPT_CLEAR_SBUFF, (ts.TermFlag & TF_REMOTECLEARSBUFF) != 0);
+
 	// \x83_\x83C\x83A\x83\x8D\x83O\x82Ƀt\x83H\x81[\x83J\x83X\x82𓖂Ă\xE9 (2004.12.7 yutaka)
 	::SetFocus(::GetDlgItem(GetSafeHwnd(), IDC_ACCEPT_MOUSE_EVENT_TRACKING));
 }
@@ -388,6 +393,11 @@
 
 	// (9)IDC_CLIPBOARD_ACCESS
 	ts.NotifyClipboardAccess = GetCheck(IDC_CLIPBOARD_NOTIFY);
+
+	// (10)IDC_ACCEPT_CLEAR_SBUFF
+	if (((ts.TermFlag & TF_REMOTECLEARSBUFF) != 0) != GetCheck(IDC_ACCEPT_CLEAR_SBUFF)) {
+		ts.TermFlag ^= TF_REMOTECLEARSBUFF;
+	}
 }
 
 void CSequencePropPageDlg::OnHelp()

Modified: branches/unicode_buf/teraterm/teraterm/buffer.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/buffer.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/buffer.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -84,7 +84,7 @@
 int StatusLine;	//0: none 1: shown
 /* top, bottom, left & right margin */
 int CursorTop, CursorBottom, CursorLeftM, CursorRightM;
-BOOL Selected;
+BOOL Selected, Selecting;
 BOOL Wrap;
 
 static WORD TabStops[256];
@@ -110,7 +110,8 @@
 static LONG BufferSize;
 static int NumOfLinesInBuff;
 static int BuffStartAbs, BuffEndAbs;
-static POINT SelectStart, SelectEnd, SelectEndOld;
+static POINT SelectStart, SelectStartTmp, SelectEnd, SelectEndOld;
+static DWORD SelectStartTime;
 static BOOL BoxSelect;
 static POINT DblClkStart, DblClkEnd;
 
@@ -587,6 +588,7 @@
 	SelectEnd.y = BuffEnd;
 //	SelectEnd.x = NumOfColumns;
 //	SelectEnd.y = BuffEnd - 1;
+	Selecting = TRUE;
 }
 
 void BuffScreenSelect()
@@ -599,6 +601,7 @@
 	SelectEnd.y = SelectStart.y + NumOfLines;
 //	SelectEnd.x = X + NumOfColumns;
 //	SelectEnd.y = Y + PageStart + NumOfLines - 1;
+	Selecting = TRUE;
 }
 
 void BuffCancelSelection()
@@ -607,6 +610,7 @@
 	SelectStart.y = 0;
 	SelectEnd.x = 0;
 	SelectEnd.y = 0;
+	Selecting = FALSE;
 }
 
 void BuffReset()
@@ -4598,6 +4602,11 @@
 
 	CaretOff();
 
+	if (!Selecting) {
+		SelectStart = SelectStartTmp;
+		Selecting = TRUE;
+	}
+
 	DispConvWinToScreen(Xw,Yw,&X,&Y,NULL);
 	Y = Y + PageStart;
 	if ((Y<0) || (Y>=BuffEnd)) {
@@ -4869,31 +4878,23 @@
 	ChangeSelectRegion();
 	UnlockBuffer();
 
-	SelectStart.x = X;
-	SelectStart.y = Y;
-	if (SelectStart.x<0) {
-		SelectStart.x = 0;
-	}
-	if (SelectStart.x > NumOfColumns) {
-		SelectStart.x = NumOfColumns;
-	}
-	if (SelectStart.y < 0) {
-		SelectStart.y = 0;
-	}
-	if (SelectStart.y >= BuffEnd) {
-		SelectStart.y = BuffEnd - 1;
-	}
+	SelectStartTime = GetTickCount();
+	Selecting = FALSE;
 
+#define range_check(v, min, max)	((v)<(min) ? (min) : (v)>(max) ? (max) : (v))
+	SelectStartTmp.x = range_check(X, 0, NumOfColumns);
+	SelectStartTmp.y = range_check(Y, 0, BuffEnd-1);
+
 	TmpPtr = GetLinePtr(SelectStart.y);
 	// check if the cursor is on the right half of a character
-	if ((SelectStart.x>0) &&
-	    ((AttrBuff[TmpPtr+SelectStart.x-1] & AttrKanji) != 0) ||
-	    ((AttrBuff[TmpPtr+SelectStart.x] & AttrKanji) == 0) &&
+	if ((SelectStartTmp.x>0) &&
+	    ((AttrBuff[TmpPtr+SelectStartTmp.x-1] & AttrKanji) != 0) ||
+	    ((AttrBuff[TmpPtr+SelectStartTmp.x] & AttrKanji) == 0) &&
 	     Right) {
-		SelectStart.x++;
+		SelectStartTmp.x++;
 	}
 
-	SelectEnd = SelectStart;
+	SelectEnd = SelectStartTmp;
 	SelectEndOld = SelectEnd;
 	CaretOff();
 	Selected = TRUE;
@@ -4913,6 +4914,14 @@
 	BYTE b;
 	BOOL DBCS;
 
+	if (!Selecting) {
+		if (GetTickCount() - SelectStartTime < ts.SelectStartDelay) {
+			return;
+		}
+		SelectStart = SelectStartTmp;
+		Selecting = TRUE;
+	}
+
 	DispConvWinToScreen(Xw,Yw,&X,&Y,&Right);
 	Y = Y + PageStart;
 
@@ -5069,6 +5078,19 @@
 void BuffEndSelect()
 //  End text selection by mouse button up
 {
+	if (!Selecting) {
+		if (GetTickCount() - SelectStartTime < ts.SelectStartDelay) {
+			SelectEnd = SelectStart;
+			SelectEndOld = SelectEnd;
+			LockBuffer();
+			ChangeSelectRegion();
+			UnlockBuffer();
+			Selected = FALSE;
+			return;
+		}
+		SelectStart = SelectStartTmp;
+	}
+
 	Selected = (SelectStart.x!=SelectEnd.x) ||
 	           (SelectStart.y!=SelectEnd.y);
 	if (Selected) {

Modified: branches/unicode_buf/teraterm/teraterm/clipboar.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/clipboar.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/clipboar.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1388,8 +1388,7 @@
 		{ IDOK, "BTN_OK" },
 	};
 	POINT p;
-	RECT rc_dsk, rc_dlg;
-	int dlg_height, dlg_width;
+	RECT rc_dlg;
 	static int ok2right, edit2ok, edit2bottom;
 	RECT rc_edit, rc_ok, rc_cancel;
 	// for status bar
@@ -1425,45 +1424,9 @@
 			}
 
 			ClientToScreen(GetParent(hDlgWnd), &p);
-
-			// \x83L\x83\x83\x83\x8C\x83b\x83g\x82\xAA\x89\xE6\x96ʂ\xA9\x82\xE7\x82͂ݏo\x82\xB5\x82Ă\xA2\x82\xE9\x82Ƃ\xAB\x82ɓ\\x82\xE8\x95t\x82\xAF\x82\xF0\x82\xB7\x82\xE9\x82\xC6
-			// \x8Am\x94F\x83E\x83C\x83\x93\x83h\x83E\x82\xAA\x8C\xA9\x82\xA6\x82\xE9\x82Ƃ\xB1\x82\xEB\x82ɕ\\x8E\xA6\x82\xB3\x82\xEA\x82Ȃ\xA2\x82\xB1\x82Ƃ\xAA\x82\xA0\x82\xE9\x81B
-			// \x83E\x83C\x83\x93\x83h\x83E\x82\xA9\x82\xE7\x82͂ݏo\x82\xB5\x82\xBD\x8Fꍇ\x82ɒ\xB2\x90߂\xB7\x82\xE9 (2008.4.24 maya)
-			if (!HasMultiMonitorSupport()) {
-				// NT4.0, 95 \x82̓}\x83\x8B\x83`\x83\x82\x83j\x83^API\x82ɔ\xF1\x91Ή\x9E
-				SystemParametersInfo(SPI_GETWORKAREA, 0, &rc_dsk, 0);
-			}
-			else {
-				HMONITOR hm;
-				POINT pt;
-				MONITORINFO mi;
-
-				pt.x = p.x;
-				pt.y = p.y;
-				hm = MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST);
-
-				mi.cbSize = sizeof(MONITORINFO);
-				GetMonitorInfo(hm, &mi);
-				rc_dsk = mi.rcWork;
-			}
-			GetWindowRect(hDlgWnd, &rc_dlg);
-			dlg_height = rc_dlg.bottom-rc_dlg.top;
-			dlg_width  = rc_dlg.right-rc_dlg.left;
-			if (p.y < rc_dsk.top) {
-				p.y = rc_dsk.top;
-			}
-			else if (p.y + dlg_height > rc_dsk.bottom) {
-				p.y = rc_dsk.bottom - dlg_height;
-			}
-			if (p.x < rc_dsk.left) {
-				p.x = rc_dsk.left;
-			}
-			else if (p.x + dlg_width > rc_dsk.right) {
-				p.x = rc_dsk.right - dlg_width;
-			}
-
 			SetWindowPos(hDlgWnd, NULL, p.x, p.y,
 			             0, 0, SWP_NOSIZE | SWP_NOZORDER);
+			MoveWindowToDisplay(hDlgWnd);
 
 			// \x83_\x83C\x83A\x83\x8D\x83O\x82̏\x89\x8A\xFA\x83T\x83C\x83Y\x82\xF0\x95ۑ\xB6
 			GetWindowRect(hDlgWnd, &rc_dlg);

Modified: branches/unicode_buf/teraterm/teraterm/tekwin.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/tekwin.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/tekwin.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -796,7 +796,6 @@
 		break;
 	case WM_DESTROY:
 		OnDestroy();
-		PostQuitMessage(0);
 		break;
 	case WM_GETMINMAXINFO:
 		OnGetMinMaxInfo((MINMAXINFO *)lp);

Modified: branches/unicode_buf/teraterm/teraterm/ttermpro.rc
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttermpro.rc	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/ttermpro.rc	2019-12-13 15:12:00 UTC (rev 8438)
@@ -113,6 +113,8 @@
     COMBOBOX        IDC_CLIPBOARD_ACCESS,162,114,45,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     CONTROL         "&Notify clipboard access from remote",IDC_CLIPBOARD_NOTIFY,
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,130,220,10
+    CONTROL         "Accept clearing &scroll buffer from remote",IDC_ACCEPT_CLEAR_SBUFF,
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,145,220,10
 END
 
 IDD_TABSHEET_COPYPASTE DIALOGEX 0, 0, 258, 194
@@ -539,9 +541,11 @@
         MENUITEM "Cy&gwin connection\tAlt+G",   ID_FILE_CYGWINCONNECTION
         MENUITEM SEPARATOR
         MENUITEM "&Log...",                     ID_FILE_LOG
+        MENUITEM "Pause Logg&ing",              ID_FILE_PAUSELOG
         MENUITEM "C&omment to Log...",          ID_FILE_COMMENTTOLOG
         MENUITEM "&View Log",                   ID_FILE_VIEWLOG
         MENUITEM "Sho&w Log dialog...",         ID_FILE_SHOWLOGDIALOG
+        MENUITEM "Stop Logging (&Q)",           ID_FILE_STOPLOG
         MENUITEM "&Send file...",               ID_FILE_SENDFILE
         POPUP "&Transfer"
         BEGIN

Modified: branches/unicode_buf/teraterm/teraterm/ttime.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttime.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/ttime.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -30,20 +30,17 @@
 /* TERATERM.EXE, IME interface */
 
 #include <windows.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
 #include <stdlib.h>
+#include <crtdbg.h>
 #include <string.h>
 #include <imm.h>
-#include <crtdbg.h>
 #include <assert.h>
 
 #include "ttime.h"
 
-#ifdef _DEBUG
-#define malloc(l)	_malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define calloc(l,n)	_calloc_dbg((l), (n), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)		_free_dbg((p), _NORMAL_BLOCK)
-#endif
-
 // #define ENABLE_DUMP	1
 
 typedef LONG (WINAPI *TImmGetCompositionStringA)(HIMC, DWORD, LPVOID, DWORD);

Modified: branches/unicode_buf/teraterm/teraterm/ttwinman.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttwinman.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/ttwinman.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -83,7 +83,7 @@
 	unsigned char b;
 	WORD word;
 
-	if (strcmp(ts.Locale, DEFAULT_LOCALE) == 0) {
+	if (_stricmp(ts.Locale, DEFAULT_LOCALE) == 0) {
 		for (i = 0 ; i < len ; i++) {
 			b = str[i];
 			if (IS_SJIS(b) || IS_EUC(b)) {

Modified: branches/unicode_buf/teraterm/teraterm/vtterm.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/vtterm.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/vtterm.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -32,10 +32,13 @@
 #include "tttypes.h"
 #include <stdio.h>
 #include <string.h>
-#include <stdlib.h>
 #include <mbstring.h>
 #include <locale.h>
 #include <ctype.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <stdlib.h>
 #include <crtdbg.h>
 #include <tchar.h>
 #include <assert.h>
@@ -57,14 +60,6 @@
 
 #include "vtterm.h"
 
-#ifdef _DEBUG
-#define malloc(l)     _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define realloc(p, l) _realloc_dbg((p), (l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)       _free_dbg((p), _NORMAL_BLOCK)
-#define strdup(s)	  _strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define _strdup(s)	  _strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#endif
-
 #include "unicode_test.h"
 
 void ParseFirst(BYTE b);
@@ -1819,6 +1814,12 @@
 			}
 		}
 		break;
+
+	  case 3:
+		if (ts.TermFlag & TF_REMOTECLEARSBUFF) {
+			ClearBuffer();
+		}
+		break;
 	}
 }
 
@@ -1840,6 +1841,12 @@
 		// Erase entire screen
 		BuffSelectedEraseScreen();
 		break;
+
+	  case 3:
+		if (ts.TermFlag & TF_REMOTECLEARSBUFF) {
+			ClearBuffer();
+		}
+		break;
 	}
 }
 
@@ -5078,9 +5085,20 @@
 		  case 1: /* Change icon name */
 		  case 2: /* Change window title */
 			if (StrBuff && ts.AcceptTitleChangeRequest) {
-				strncpy_s(cv.TitleRemote, sizeof(cv.TitleRemote), StrBuff, _TRUNCATE);
-				// (2006.6.15 maya) \x83^\x83C\x83g\x83\x8B\x82ɓn\x82\xB7\x95\xB6\x8E\x9A\x97\xF1\x82\xF0SJIS\x82ɕϊ\xB7
-				ConvertToCP932(cv.TitleRemote, sizeof(cv.TitleRemote));
+				if ((ts.KanjiCode == IdUTF8 || ts.KanjiCode == IdUTF8m) || ts.Language == IdUtf8) {
+					char *titleTmp;
+
+					titleTmp = ToCharU8(StrBuff);
+					if (titleTmp) {
+						strncpy_s(cv.TitleRemote, sizeof(cv.TitleRemote), titleTmp, _TRUNCATE);
+						free(titleTmp);
+					}
+				}
+				else {
+					strncpy_s(cv.TitleRemote, sizeof(cv.TitleRemote), StrBuff, _TRUNCATE);
+					// (2006.6.15 maya) \x83^\x83C\x83g\x83\x8B\x82ɓn\x82\xB7\x95\xB6\x8E\x9A\x97\xF1\x82\xF0SJIS\x82ɕϊ\xB7
+					ConvertToCP932(cv.TitleRemote, sizeof(cv.TitleRemote));
+				}
 				ChangeTitle();
 			}
 			break;

Modified: branches/unicode_buf/teraterm/teraterm/vtwin.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/vtwin.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/vtwin.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1038,6 +1038,10 @@
 static char LogMeTTMenuString[] = "Log&MeTT";
 static char LogMeTT[MAX_PATH];
 
+#define IS_LOGMETT_NOTFOUND     0
+#define IS_LOGMETT_FOUND        1
+#define IS_LOGMETT_UNKNOWN      2
+
 static BOOL isLogMeTTExist()
 {
 	const char *LogMeTTexename = "LogMeTT.exe";
@@ -1049,6 +1053,12 @@
 	DWORD dwDisposition;
 	char *path;
 
+	static int status = IS_LOGMETT_UNKNOWN;
+
+	if (status != IS_LOGMETT_UNKNOWN) {
+		return status == IS_LOGMETT_FOUND;
+	}
+
 	/* LogMeTT 2.9.6\x82\xA9\x82\xE7\x82̓\x8C\x83W\x83X\x83g\x83\x8A\x82ɃC\x83\x93\x83X\x83g\x81[\x83\x8B\x83p\x83X\x82\xAA\x8A܂܂\xEA\x82\xE9\x81B*/
 	result = RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\LogMeTT", 0, NULL,
 				REG_OPTION_NON_VOLATILE, KEY_READ, NULL, &key, &dwDisposition);
@@ -1075,8 +1085,10 @@
 	}
 
 	if (_access(LogMeTT, 0) == -1) {
+		status = IS_LOGMETT_NOTFOUND;
 		return FALSE;
 	}
+	status = IS_LOGMETT_FOUND;
 	return TRUE;
 }
 
@@ -1097,6 +1109,8 @@
 		{ ID_FILE_COMMENTTOLOG, "MENU_FILE_COMMENTLOG" },
 		{ ID_FILE_VIEWLOG, "MENU_FILE_VIEWLOG" },
 		{ ID_FILE_SHOWLOGDIALOG, "MENU_FILE_SHOWLOGDIALOG" },
+		{ ID_FILE_PAUSELOG, "MENU_FILE_PAUSELOG" },
+		{ ID_FILE_STOPLOG, "MENU_FILE_STOPLOG" },
 		{ ID_FILE_SENDFILE, "MENU_FILE_SENDFILE" },
 		{ ID_FILE_REPLAYLOG, "MENU_FILE_REPLAYLOG" },
 		{ ID_FILE_CHANGEDIR, "MENU_FILE_CHANGEDIR" },
@@ -1105,7 +1119,7 @@
 		{ ID_FILE_DISCONNECT, "MENU_FILE_DISCONNECT" },
 		{ ID_FILE_EXIT, "MENU_FILE_EXIT" },
 		{ ID_FILE_EXITALL, "MENU_FILE_EXITALL" },
-		{ 9, "MENU_TRANS" },
+		{ 11, "MENU_TRANS" },
 		{ ID_FILE_KERMITRCV, "MENU_TRANS_KERMIT_RCV" },
 		{ ID_FILE_KERMITGET, "MENU_TRANS_KERMIT_GET" },
 		{ ID_FILE_KERMITSEND, "MENU_TRANS_KERMIT_SEND" },
@@ -1256,11 +1270,23 @@
 			EnableMenuItem(FileMenu,ID_FILE_COMMENTTOLOG, MF_BYCOMMAND | MF_ENABLED);
 			EnableMenuItem(FileMenu,ID_FILE_VIEWLOG, MF_BYCOMMAND | MF_ENABLED);
 			EnableMenuItem(FileMenu,ID_FILE_SHOWLOGDIALOG, MF_BYCOMMAND | MF_ENABLED);
+			EnableMenuItem(FileMenu,ID_FILE_PAUSELOG, MF_BYCOMMAND | MF_ENABLED);
+			EnableMenuItem(FileMenu,ID_FILE_STOPLOG, MF_BYCOMMAND | MF_ENABLED);
+			if (cv.FilePause & OpLog) {
+				CheckMenuItem(FileMenu,ID_FILE_PAUSELOG, MF_BYCOMMAND | MF_CHECKED);
+			}
+			else {
+				CheckMenuItem(FileMenu,ID_FILE_PAUSELOG, MF_BYCOMMAND | MF_UNCHECKED);
+			}
 		} else {
 			EnableMenuItem(FileMenu,ID_FILE_LOG,MF_BYCOMMAND | MF_ENABLED);
 			EnableMenuItem(FileMenu,ID_FILE_COMMENTTOLOG, MF_BYCOMMAND | MF_GRAYED);
 			EnableMenuItem(FileMenu,ID_FILE_VIEWLOG, MF_BYCOMMAND | MF_GRAYED);
 			EnableMenuItem(FileMenu,ID_FILE_SHOWLOGDIALOG, MF_BYCOMMAND | MF_GRAYED);
+			EnableMenuItem(FileMenu,ID_FILE_PAUSELOG, MF_BYCOMMAND | MF_GRAYED);
+			EnableMenuItem(FileMenu,ID_FILE_STOPLOG, MF_BYCOMMAND | MF_GRAYED);
+
+			CheckMenuItem(FileMenu,ID_FILE_PAUSELOG, MF_BYCOMMAND | MF_UNCHECKED);
 		}
 
 	}
@@ -4165,7 +4191,18 @@
 	ShowFTDlg(OpLog);
 }
 
+// \x83\x8D\x83O\x8E擾\x82𒆒f/\x8DĊJ\x82\xB7\x82\xE9
+void CVTWindow::OnPauseLog()
+{
+	FLogChangeButton(!(cv.FilePause & OpLog));
+}
 
+// \x83\x8D\x83O\x8E擾\x82\xF0\x8FI\x97\xB9\x82\xB7\x82\xE9
+void CVTWindow::OnStopLog()
+{
+	FileTransEnd(OpLog);
+}
+
 // \x83\x8D\x83O\x82̍Đ\xB6 (2006.12.13 yutaka)
 void CVTWindow::OnReplayLog()
 {
@@ -6481,12 +6518,37 @@
 	//AdjustScrollBar();
 
 	// \x83X\x83N\x83\x8A\x81[\x83\x93\x83T\x83C\x83Y(=Client Area\x82̃T\x83C\x83Y)\x82\xA9\x82\xE7\x83E\x83B\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82\xF0\x8EZ\x8Fo
-	const LONG_PTR Style = ::GetWindowLongPtr(m_hWnd, GWL_STYLE);
-	const LONG_PTR ExStyle = ::GetWindowLongPtr(m_hWnd, GWL_EXSTYLE);
-	RECT Rect = {0, 0, ScreenWidth, ScreenHeight};
-	pAdjustWindowRectExForDpi(&Rect, Style, TRUE/*menu*/, ExStyle, NewDPI);
-	const int NewWindowWidth = Rect.right - Rect.left;
-	const int NewWindowHeight = Rect.bottom - Rect.top;
+	int NewWindowWidth;
+	int NewWindowHeight;
+	if (pAdjustWindowRectExForDpi != NULL || pAdjustWindowRectEx != NULL) {
+		const LONG_PTR Style = ::GetWindowLongPtr(m_hWnd, GWL_STYLE);
+		const LONG_PTR ExStyle = ::GetWindowLongPtr(m_hWnd, GWL_EXSTYLE);
+		const BOOL bMenu = (ts.PopupMenu != 0) ? FALSE : TRUE;
+		RECT Rect = {0, 0, ScreenWidth, ScreenHeight};
+		if (pAdjustWindowRectExForDpi != NULL) {
+			// Windows 10, version 1607+
+			pAdjustWindowRectExForDpi(&Rect, Style, bMenu, ExStyle, NewDPI);
+		}
+		else {
+			// Windows 2000+
+			pAdjustWindowRectEx(&Rect, Style, bMenu, ExStyle);
+		}
+		NewWindowWidth = Rect.right - Rect.left;
+		NewWindowHeight = Rect.bottom - Rect.top;
+	}
+	else {
+		// WM_DPICHANGED\x82\xAA\x94\xAD\x90\xB6\x82\xB5\x82Ȃ\xA2\x8A‹\xAB\x82̂͂\xB8\x81A\x94O\x82̈׎\xC0\x91\x95
+		RECT WindowRect;
+		GetWindowRect(&WindowRect);
+		const int WindowWidth = WindowRect.right - WindowRect.left;
+		const int WindowHeight = WindowRect.bottom - WindowRect.top;
+		RECT ClientRect;
+		GetClientRect(&ClientRect);
+		const int ClientWidth =  ClientRect.right - ClientRect.left;
+		const int ClientHeight = ClientRect.bottom - ClientRect.top;
+		NewWindowWidth = WindowWidth - ClientWidth + ScreenWidth;
+		NewWindowHeight = WindowHeight - ClientHeight + ScreenHeight;
+	}
 
 	// \x90V\x82\xB5\x82\xA2\x83E\x83B\x83\x93\x83h\x83E\x97̈\xE6\x8C\xF3\x95\xE2
 	RECT NewWindowRect[5];
@@ -6774,6 +6836,8 @@
 		case ID_FILE_COMMENTTOLOG: OnCommentToLog(); break;
 		case ID_FILE_VIEWLOG: OnViewLog(); break;
 		case ID_FILE_SHOWLOGDIALOG: OnShowLogDialog(); break;
+		case ID_FILE_PAUSELOG: OnPauseLog(); break;
+		case ID_FILE_STOPLOG: OnStopLog(); break;
 		case ID_FILE_REPLAYLOG: OnReplayLog(); break;
 		case ID_FILE_SENDFILE: OnFileSend(); break;
 		case ID_FILE_KERMITRCV: OnFileKermitRcv(); break;

Modified: branches/unicode_buf/teraterm/teraterm/vtwin.h
===================================================================
--- branches/unicode_buf/teraterm/teraterm/vtwin.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/vtwin.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -168,6 +168,8 @@
 	void OnCommentToLog();
 	void OnViewLog();
 	void OnShowLogDialog();
+	void OnPauseLog();
+	void OnStopLog();
 	void OnReplayLog();
 	void OnExternalSetup();
 	void OnFileSend();

Modified: branches/unicode_buf/teraterm/teraterm/winjump.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/winjump.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/teraterm/winjump.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -53,6 +53,10 @@
 #include <stdio.h>
 #include <string.h>
 #include <shlobj.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <stdlib.h>
 #include <crtdbg.h>
 
 #include "winjump.h"
@@ -59,12 +63,6 @@
 #include "teraterm.h"
 #include "tttypes.h"
 
-#ifdef _DEBUG
-#define malloc(l)	_malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)		_free_dbg((p), _NORMAL_BLOCK)
-#define _strdup(s)	_strdup_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__)
-#endif
-
 #define MAX_JUMPLIST_ITEMS 30 /* PuTTY will never show more items in
                                * the jumplist than this, regardless of
                                * user preferences. */
@@ -515,6 +513,8 @@
 			OutputDebugPrintf("Release shell link failed. (%ld)\n", result);
 	}
 
+	free(app_path);
+
 	return ret;
 }
 

Modified: branches/unicode_buf/teraterm/ttpcmn/ttpcmn.def
===================================================================
--- branches/unicode_buf/teraterm/ttpcmn/ttpcmn.def	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpcmn/ttpcmn.def	2019-12-13 15:12:00 UTC (rev 8438)
@@ -41,7 +41,7 @@
   NotifyMessage @79
   SetCustomNotifyIcon @85
   GetCustomNotifyIcon @86
-  
+
   SJIS2JIS @30
   SJIS2EUC @31
   JIS2SJIS @32

Modified: branches/unicode_buf/teraterm/ttpfile/ttfile.c
===================================================================
--- branches/unicode_buf/teraterm/ttpfile/ttfile.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpfile/ttfile.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -129,7 +129,7 @@
 
 	switch (FuncId) {
 	case GSF_SAVE:
-		ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT;
+		ofn.Flags = OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT | OFN_HIDEREADONLY | OFN_SHOWHELP;
 		// \x8F\x89\x8A\xFA\x83t\x83@\x83C\x83\x8B\x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82\xF0\x83v\x83\x8D\x83O\x83\x89\x83\x80\x96{\x91̂\xAA\x82\xA0\x82\xE9\x89ӏ\x8A\x82ɌŒ肷\x82\xE9 (2005.1.6 yutaka)
 		// \x93ǂݍ\x9E\x82܂ꂽteraterm.ini\x82\xAA\x82\xA0\x82\xE9\x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82ɌŒ肷\x82\xE9\x81B
 		// \x82\xB1\x82\xEA\x82ɂ\xE6\x82\xE8\x81A/F= \x82Ŏw\x92肳\x82ꂽ\x88ʒu\x82ɕۑ\xB6\x82\xB3\x82\xEA\x82\xE9\x82悤\x82ɂȂ\xE9\x81B(2005.1.26 yutaka)
@@ -145,7 +145,7 @@
 			strncpy_s(ts->SetupFName, sizeof(ts->SetupFName),Name, _TRUNCATE);
 		break;
 	case GSF_RESTORE:
-		ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
+		ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_SHOWHELP;
 		get_lang_msg("FILEDLG_RESTORE_SETUP_TITLE", uimsg, sizeof(uimsg), "Tera Term: Restore setup", UILanguageFile);
 		ofn.lpstrTitle = uimsg;
 		Ok = GetOpenFileName(&ofn);
@@ -153,7 +153,7 @@
 			strncpy_s(ts->SetupFName, sizeof(ts->SetupFName),Name, _TRUNCATE);
 		break;
 	case GSF_LOADKEY:
-		ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
+		ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_SHOWHELP;
 		get_lang_msg("FILEDLG_LOAD_KEYMAP_TITLE", uimsg, sizeof(uimsg), "Tera Term: Load key map", UILanguageFile);
 		ofn.lpstrTitle = uimsg;
 		Ok = GetOpenFileName(&ofn);
@@ -162,8 +162,6 @@
 		break;
 	}
 
-	ofn.Flags |= OFN_SHOWHELP;
-
 #if defined(_DEBUG)
 	if (!Ok) {
 		DWORD Err = GetLastError();

Modified: branches/unicode_buf/teraterm/ttpmacro/CMakeLists.txt
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/CMakeLists.txt	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/CMakeLists.txt	2019-12-13 15:12:00 UTC (rev 8438)
@@ -56,6 +56,7 @@
   msgdlg.h
   statdlg.cpp
   statdlg.h
+  macrodlgbase.h
   ttl.c
   ttl.h
   ttm_res.h

Modified: branches/unicode_buf/teraterm/ttpmacro/ListDlg.cpp
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ListDlg.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ListDlg.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -37,7 +37,6 @@
 #include "tttypes.h"
 #include "dlglib.h"
 #include "ttmdlg.h"
-#include "ttmacro.h"
 
 #include "ListDlg.h"
 
@@ -53,10 +52,8 @@
 	PosY = y;
 }
 
-INT_PTR CListDlg::DoModal()
+INT_PTR CListDlg::DoModal(HINSTANCE hInst, HWND hWndParent)
 {
-	HINSTANCE hInst = GetInstance();
-	HWND hWndParent = GetHWND();
 	return TTCDialog::DoModal(hInst, hWndParent, IDD);
 }
 
@@ -199,21 +196,7 @@
 	::MoveWindow(HOk,CONTROL_GAP_W+CONTROL_GAP_W+LW,BH/2,BW,BH,TRUE);
 	::MoveWindow(HCancel,CONTROL_GAP_W+CONTROL_GAP_W+LW,BH*2,BW,BH,TRUE);
 
-	// PosX\x82\xAA\x83f\x83B\x83X\x83v\x83\x8C\x83C\x82̊O\x82\xCC-100\x88ȉ\xBA\x82̈ʒu\x82ɂ\xA0\x82\xE9\x8Fꍇ
-	if (PosX<=GetMonitorLeftmost(PosX, PosY)-100) {
-		// \x83E\x83B\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82\xF0\x83Z\x83b\x83g
-		::SetWindowPos(m_hWnd, HWND_TOP,0,0,WW,WH,SWP_NOMOVE);
-		// \x92\x86\x89\x9B\x82Ɉړ\xAE\x82\xB7\x82\xE9
-		CenterWindow(m_hWnd, NULL);
-		// \x88ʒu\x82\xF0\x95ۑ\xB6
-		RECT rcWnd;
-		GetWindowRect(&rcWnd);
-		PosX = rcWnd.left;
-		PosY = rcWnd.top;
-	} else {
-		// \x83E\x83B\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82\xF0\x83Z\x83b\x83g + \x8Ew\x92\xE8\x88ʒu\x82ֈړ\xAE
-		::SetWindowPos(m_hWnd, HWND_TOP,PosX,PosY,WW,WH, 0);
-	}
+	SetDlgPos();
 
 	::InvalidateRect(m_hWnd, NULL, TRUE);
 }

Modified: branches/unicode_buf/teraterm/ttpmacro/ListDlg.h
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ListDlg.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ListDlg.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2017 TeraTerm Project
+ * Copyright (C) 2013-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -27,12 +27,15 @@
  */
 #pragma once
 
+#include "../common/tmfc.h"
+#include "macrodlgbase.h"
+
 // CListDlg \x83_\x83C\x83A\x83\x8D\x83O
-class CListDlg : public TTCDialog
+class CListDlg : public CMacroDlgBase
 {
 public:
 	CListDlg(PCHAR Text, PCHAR Caption, const CHAR **Lists, int Selected, int x, int y);
-	INT_PTR DoModal();
+	INT_PTR DoModal(HINSTANCE hInst, HWND hWndParent);
 	int m_SelectItem;
 
 private:
@@ -41,7 +44,7 @@
 	PCHAR m_Caption;
 	const CHAR **m_Lists;
 	int m_Selected;
-	int PosX, PosY, init_WW, WW, WH, TW, TH, BH, BW, LW, LH;
+	int init_WW, TW, TH, BH, BW, LW, LH;
 	SIZE s;
 
 	void Relocation(BOOL is_init, int WW);

Modified: branches/unicode_buf/teraterm/ttpmacro/errdlg.cpp
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/errdlg.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/errdlg.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2007-2017 TeraTerm Project
+ * (C) 2007-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,6 @@
 #include "ttmparse.h"
 #include "htmlhelp.h"
 #include "dlglib.h"
-#include "ttmacro.h"
 
 #include "errdlg.h"
 
@@ -61,11 +60,9 @@
 	MacroFileName = FileName;
 }
 
-INT_PTR CErrDlg::DoModal()
+INT_PTR CErrDlg::DoModal(HINSTANCE hInst, HWND hWndParent)
 {
-	HINSTANCE hInst = GetInstance();
-	HWND parent = GetHWND();
-	return TTCDialog::DoModal(hInst, parent, CErrDlg::IDD);
+	return TTCDialog::DoModal(hInst, hWndParent, CErrDlg::IDD);
 }
 
 BOOL CErrDlg::OnInitDialog()
@@ -75,10 +72,7 @@
 		{ IDCANCEL, "BTN_CONTINUE" },
 		{ IDC_MACROERRHELP, "BTN_HELP" },
 	};
-	RECT R;
-	HDC TmpDC;
 	char buf[MaxLineLen*2], buf2[10];
-	int i, len;
 
 	SetDlgTexts(m_hWnd, TextInfos, _countof(TextInfos), UILanguageFile);
 
@@ -90,9 +84,9 @@
 	_snprintf_s(buf, sizeof(buf), _TRUNCATE, "%s:%d:", MacroFileName, LineNo);
 	SetDlgItemText(IDC_ERRLINE, buf);
 
-	len = strlen(LineStr);
+	size_t len = strlen(LineStr);
 	buf[0] = 0;
-	for (i = 0 ; i < len ; i++) {
+	for (size_t i = 0 ; i < len ; i++) {
 		if (i == StartPos)
 			strncat_s(buf, sizeof(buf), "<<<", _TRUNCATE);
 		if (i == EndPos)
@@ -105,14 +99,8 @@
 		strncat_s(buf, sizeof(buf), ">>>", _TRUNCATE);
 	SetDlgItemText(IDC_EDIT_ERRLINE, buf);
 
-	if (PosX<=GetMonitorLeftmost(PosX, PosY)-100) {
-		GetWindowRect(&R);
-		TmpDC = ::GetDC(GetSafeHwnd());
-		PosX = (GetDeviceCaps(TmpDC,HORZRES)-R.right+R.left) / 2;
-		PosY = (GetDeviceCaps(TmpDC,VERTRES)-R.bottom+R.top) / 2;
-		::ReleaseDC(GetSafeHwnd(),TmpDC);
-	}
-	SetWindowPos(HWND_TOP, PosX, PosY, 0, 0, SWP_NOSIZE);
+	SetDlgPos();
+
 	::SetForegroundWindow(m_hWnd);
 
 	return TRUE;

Modified: branches/unicode_buf/teraterm/ttpmacro/errdlg.h
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/errdlg.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/errdlg.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2007-2017 TeraTerm Project
+ * (C) 2007-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -31,12 +31,13 @@
 
 // CErrDlg dialog
 #include "tmfc.h"
+#include "macrodlgbase.h"
 
-class CErrDlg : public TTCDialog
+class CErrDlg : public CMacroDlgBase
 {
 public:
 	CErrDlg(const char *Msg, PCHAR Line, int x, int y, int lineno, int start, int end, PCHAR FileName);
-	INT_PTR DoModal();
+	INT_PTR DoModal(HINSTANCE hInst, HWND hWndParent);
 
 private:
 	enum { IDD = IDD_ERRDLG };
@@ -43,7 +44,6 @@
 
 	const char* MsgStr;
 	PCHAR LineStr;
-	int PosX, PosY;
 	int LineNo;
 	int StartPos, EndPos;
 	PCHAR MacroFileName;

Modified: branches/unicode_buf/teraterm/ttpmacro/inpdlg.cpp
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/inpdlg.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/inpdlg.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2006-2017 TeraTerm Project
+ * (C) 2006-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,6 @@
 #include "ttm_res.h"
 #include "ttmlib.h"
 #include "dlglib.h"
-#include "ttmacro.h"
 #include "compat_win.h"
 
 #include "inpdlg.h"
@@ -54,11 +53,9 @@
 	PosY = y;
 }
 
-INT_PTR CInpDlg::DoModal()
+INT_PTR CInpDlg::DoModal(HINSTANCE hInst, HWND hWndParent)
 {
-	HINSTANCE hInst = GetInstance();
-	HWND parent = GetHWND();
-	return TTCDialog::DoModal(hInst, parent, CInpDlg::IDD);
+	return TTCDialog::DoModal(hInst, hWndParent, CInpDlg::IDD);
 }
 
 // msgdlg \x82̂悤\x82ɁA\x83\x81\x83b\x83Z\x81[\x83W\x82\xAA\x92\xB7\x82\xA2\x8Fꍇ\x82ɂ̓_\x83C\x83A\x83\x8D\x83O\x82\xF0\x8Ag\x82\xB0\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD (2006.7.29 maya)
@@ -130,7 +127,6 @@
 void CInpDlg::Relocation(BOOL is_init, int new_WW)
 {
 	RECT R;
-	HDC TmpDC;
 	HWND HText, HOk, HEdit;
 	int CW, CH;
 
@@ -171,14 +167,7 @@
 
 	SendDlgItemMessage(IDC_INPEDIT, EM_LIMITTEXT, MaxStrLen, 0);
 
-	if (PosX<=GetMonitorLeftmost(PosX, PosY)-100) {
-		GetWindowRect(&R);
-		TmpDC = ::GetDC(GetSafeHwnd());
-		PosX = (GetDeviceCaps(TmpDC,HORZRES)-R.right+R.left) / 2;
-		PosY = (GetDeviceCaps(TmpDC,VERTRES)-R.bottom+R.top) / 2;
-		::ReleaseDC(GetSafeHwnd(),TmpDC);
-	}
-	SetWindowPos(HWND_TOP,PosX,PosY,WW,WH,0);
+	SetDlgPos();
 
 	InvalidateRect(NULL, TRUE);
 }

Modified: branches/unicode_buf/teraterm/ttpmacro/inpdlg.h
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/inpdlg.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/inpdlg.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2006-2017 TeraTerm Project
+ * (C) 2006-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -29,15 +29,18 @@
 
 /* TTMACRO.EXE, input dialog box */
 
+#pragma once
+
 #include "../common/tmfc.h"
+#include "macrodlgbase.h"
 
-class CInpDlg : public TTCDialog
+class CInpDlg : public CMacroDlgBase
 {
 public:
 	CInpDlg(PCHAR Input, PCHAR Text, PCHAR Title,
 	        PCHAR Default, BOOL Paswd,
 	        int x, int y);
-	INT_PTR DoModal();
+	INT_PTR DoModal(HINSTANCE hInst, HWND hWndParent);
 
 private:
 	enum { IDD = IDD_INPDLG };
@@ -44,7 +47,7 @@
 
 	PCHAR InputStr, TextStr, TitleStr, DefaultStr;
 	BOOL PaswdFlag;
-	int PosX, PosY, init_WW, WW, WH, TW, TH, BH, BW, EW, EH;
+	int init_WW, TW, TH, BH, BW, EW, EH;
 	SIZE s;
 
 	virtual BOOL OnInitDialog();

Added: branches/unicode_buf/teraterm/ttpmacro/macrodlgbase.h
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/macrodlgbase.h	                        (rev 0)
+++ branches/unicode_buf/teraterm/ttpmacro/macrodlgbase.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2019 TeraTerm Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include "../common/tmfc.h"
+#include "ttmlib.h"
+
+class CMacroDlgBase : public TTCDialog
+{
+protected:
+	int PosX, PosY;  // \x83E\x83B\x83\x93\x83h\x83E\x88ʒu
+	int WW, WH;		 // \x83E\x83B\x83\x93\x83h\x83E\x95\x9D
+
+	CMacroDlgBase()
+	{
+		PosX = 0;
+		PosY = 0;
+		WW = 0;
+		WH = 0;
+	}
+
+	/**
+	 *	\x83_\x83C\x83A\x83\x8D\x83O\x82̃T\x83C\x83Y\x82ƈʒu\x82\xF0\x90ݒ肷\x82\xE9
+	 */
+	void SetDlgPos()
+	{
+		if (WW == 0 || WH == 0) {
+			// \x83E\x83B\x83\x93\x83h\x83E\x88ʒu\x82̂ݐݒ肷\x82\xE9 errdlg
+			if (IsValidPos()) {
+				::SetWindowPos(m_hWnd, HWND_TOP, PosX, PosY, 0, 0, SWP_NOSIZE);
+				MoveWindowToDisplay(m_hWnd);
+			}
+			else {
+				// \x92\x86\x89\x9B\x82Ɉړ\xAE\x82\xB7\x82\xE9
+				CenterWindow(m_hWnd, NULL);
+				// \x88ʒu\x82\xF0\x95ۑ\xB6
+				RECT rcWnd;
+				GetWindowRect(&rcWnd);
+				PosX = rcWnd.left;
+				PosY = rcWnd.top;
+			}
+		}
+		else {
+			// \x83E\x83B\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82\xE0\x8D\x87\x82킹\x82Đݒ肷\x82\xE9
+			if (IsValidPos()) {
+				// \x83E\x83B\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82\xF0\x83Z\x83b\x83g + \x8Ew\x92\xE8\x88ʒu\x82ֈړ\xAE
+				::SetWindowPos(m_hWnd, HWND_TOP, PosX, PosY, WW, WH, 0);
+				MoveWindowToDisplay(m_hWnd);
+			}
+			else {
+				// \x83E\x83B\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82\xF0\x83Z\x83b\x83g
+				::SetWindowPos(m_hWnd, HWND_TOP, 0, 0, WW, WH, SWP_NOMOVE);
+				// \x83f\x83B\x83X\x83v\x83\x8C\x83C\x82̒\x86\x89\x9B\x82Ɉړ\xAE\x82\xB7\x82\xE9
+				CenterWindow(m_hWnd, NULL);
+				// \x88ʒu\x82\xF0\x95ۑ\xB6
+				RECT rcWnd;
+				GetWindowRect(&rcWnd);
+				PosX = rcWnd.left;
+				PosY = rcWnd.top;
+			}
+		}
+	}
+
+private:
+	/**
+	 *	\x83_\x83C\x83A\x83\x8D\x83O\x88ʒu\x82\xAA\x97L\x8C\xF8?
+	 *	@retval TRUE	\x97L\x8C\xF8
+	 *	@retval FALSE	\x96\xB3\x8C\xF8
+	 */
+	BOOL IsValidPos()
+	{
+		// return !(PosX <= GetMonitorLeftmost(PosX, PosY) - 100);
+		return !((PosX == CW_USEDEFAULT) || (PosY == CW_USEDEFAULT));
+	}
+};

Modified: branches/unicode_buf/teraterm/ttpmacro/msgdlg.cpp
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/msgdlg.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/msgdlg.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2006-2017 TeraTerm Project
+ * (C) 2006-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -38,7 +38,6 @@
 #include "tmfc.h"
 #include "dlglib.h"
 #include "ttmdlg.h"
-#include "ttmacro.h"
 #include "compat_win.h"
 
 #include "msgdlg.h"
@@ -55,10 +54,8 @@
 	PosY = y;
 }
 
-INT_PTR CMsgDlg::DoModal()
+INT_PTR CMsgDlg::DoModal(HINSTANCE hInst, HWND hWndParent)
 {
-	HINSTANCE hInst = GetInstance();
-	HWND hWndParent = GetHWND();
 	return TTCDialog::DoModal(hInst, hWndParent, CMsgDlg::IDD);
 }
 
@@ -125,7 +122,6 @@
 void CMsgDlg::Relocation(BOOL is_init, int new_WW)
 {
 	RECT R;
-	HDC TmpDC;
 	HWND HText, HOk, HNo;
 	int CW, CH;
 
@@ -166,13 +162,8 @@
 		::MoveWindow(HOk,(TW-BW)/2,TH+BH,BW,BH,TRUE);
 	}
 
-	if (PosX<=GetMonitorLeftmost(PosX, PosY)-100) {
-		TmpDC = ::GetDC(GetSafeHwnd());
-		PosX = (GetDeviceCaps(TmpDC,HORZRES)-WW) / 2;
-		PosY = (GetDeviceCaps(TmpDC,VERTRES)-WH) / 2;
-		::ReleaseDC(GetSafeHwnd(),TmpDC);
-	}
-	SetWindowPos(HWND_TOP,PosX,PosY,WW,WH,0);
+	SetDlgPos();
+
 	InvalidateRect(NULL);
 }
 

Modified: branches/unicode_buf/teraterm/ttpmacro/msgdlg.h
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/msgdlg.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/msgdlg.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2006-2017 TeraTerm Project
+ * (C) 2006-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -29,13 +29,15 @@
 
 /* TTMACRO.EXE, message dialog box */
 
+#include "../common/tmfc.h"
+#include "macrodlgbase.h"
 #include "ttm_res.h"
 
-class CMsgDlg : public TTCDialog
+class CMsgDlg : public CMacroDlgBase
 {
 public:
 	CMsgDlg(const TCHAR *Text, const TCHAR *Title, BOOL YesNo, int x, int y);
-	INT_PTR DoModal();
+	INT_PTR DoModal(HINSTANCE hInst, HWND hWndParent);
 
 private:
 	enum { IDD = IDD_MSGDLG };
@@ -43,7 +45,7 @@
 	const TCHAR *TextStr;
 	const TCHAR *TitleStr;
 	BOOL YesNoFlag;
-	int  PosX, PosY, init_WW, WW, WH, TW, TH, BH, BW;
+	int  init_WW, TW, TH, BH, BW;
 	SIZE s;
 
 	virtual BOOL OnInitDialog();

Modified: branches/unicode_buf/teraterm/ttpmacro/statdlg.cpp
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/statdlg.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/statdlg.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2006-2017 TeraTerm Project
+ * (C) 2006-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -37,20 +37,18 @@
 #include "ttmlib.h"
 #include "tmfc.h"
 #include "tttypes.h"
-#include "ttmacro.h"
 
 #include "statdlg.h"
 
 // CStatDlg dialog
 
-BOOL CStatDlg::Create(PCHAR Text, PCHAR Title, int x, int y)
+BOOL CStatDlg::Create(HINSTANCE hInst, PCHAR Text, PCHAR Title, int x, int y)
 {
 	TextStr = Text;
 	TitleStr = Title;
 	PosX = x;
 	PosY = y;
-	HINSTANCE hInst = GetInstance();
-	return TTCDialog::Create(hInst, GetDesktopWindow(), CStatDlg::IDD);
+	return TTCDialog::Create(hInst, NULL, CStatDlg::IDD);
 }
 
 void CStatDlg::Update(PCHAR Text, PCHAR Title, int x, int y)
@@ -176,7 +174,6 @@
 void CStatDlg::Relocation(BOOL is_init, int new_WW)
 {
 	RECT R;
-	HDC TmpDC;
 	HWND HText;
 	int CW, CH;
 
@@ -206,13 +203,7 @@
 		::MoveWindow(HText,(TW-s.cx)/2,5,TW,TH,TRUE);
 	}
 
-	if (PosX<=GetMonitorLeftmost(PosX, PosY)-100) {
-		TmpDC = ::GetDC(GetSafeHwnd());
-		PosX = (GetDeviceCaps(TmpDC,HORZRES)-WW) / 2;
-		PosY = (GetDeviceCaps(TmpDC,VERTRES)-WH) / 2;
-		::ReleaseDC(GetSafeHwnd(),TmpDC);
-	}
-	SetWindowPos(HWND_TOP,PosX,PosY,WW,WH,SWP_NOZORDER);
+	SetDlgPos();
 
 	InvalidateRect(NULL, TRUE);
 }

Modified: branches/unicode_buf/teraterm/ttpmacro/statdlg.h
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/statdlg.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/statdlg.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2007-2017 TeraTerm Project
+ * (C) 2007-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -29,16 +29,18 @@
 
 /* TTMACRO.EXE, status dialog box */
 
-class CStatDlg : public TTCDialog
+#include "macrodlgbase.h"
+
+class CStatDlg : public CMacroDlgBase
 {
 public:
-	BOOL Create(PCHAR Text, PCHAR Title, int x, int y);
+	BOOL Create(HINSTANCE hInst, PCHAR Text, PCHAR Title, int x, int y);
 	void Update(PCHAR Text, PCHAR Title, int x, int y);
 	void Bringup();
 	enum { IDD = IDD_STATDLG };
 private:
 	PCHAR TextStr, TitleStr;
-	int  PosX, PosY, init_WW, WW, WH, TW, TH;
+	int  init_WW, TW, TH;
 	SIZE s;
 
 	virtual BOOL OnInitDialog();

Modified: branches/unicode_buf/teraterm/ttpmacro/ttl.c
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttl.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttl.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1045,6 +1045,7 @@
 					Str[0] = LOBYTE(Val);
 					Str[1] = 0;
 					strncat_s(buff, MaxStrLen, Str, _TRUNCATE);
+					/* Falls through. */
 				case TypString:
 					strncat_s(buff, MaxStrLen, StrVarPtr((TVarId)Val), _TRUNCATE);
 					break;
@@ -4323,16 +4324,22 @@
 
 WORD TTLSetDlgPos()
 {
-	WORD Err;
-	int x, y;
+	WORD Err = 0;
 
-	Err = 0;
-	GetIntVal(&x,&Err);
-	GetIntVal(&y,&Err);
-	if ((Err==0) && (GetFirstChar()!=0))
-		Err = ErrSyntax;
-	if (Err!=0) return Err;
-	SetDlgPos(x,y);
+	if (CheckParameterGiven()) {
+		// \x83p\x83\x89\x83\x81\x81[\x83^\x82\xAA\x82\xA0\x82\xEA\x82΁Ax  y \x82\xCC2\x82‚̃p\x83\x89\x83\x81\x81[\x83^\x82\xAA\x82\xA0\x82\xE9
+		int x, y;
+		GetIntVal(&x,&Err);
+		GetIntVal(&y,&Err);
+		if ((Err==0) && (GetFirstChar()!=0))
+			Err = ErrSyntax;
+		if (Err!=0) return Err;
+		SetDlgPos(x,y);
+	}
+	else {
+		// \x83p\x83\x89\x83\x81\x81[\x83^\x82\xAA\x82Ȃ\xAF\x82\xEA\x82΃f\x83t\x83H\x83\x8B\x83g\x88ʒu\x82ɖ߂\xB7
+		SetDlgPos(CW_USEDEFAULT, CW_USEDEFAULT);
+	}
 	return Err;
 }
 
@@ -4554,6 +4561,7 @@
 				case 'x':
 				case 'X':
 					type = INTEGER;
+					/* Falls through. */
 
 				case 'e':
 				case 'E':
@@ -4565,6 +4573,7 @@
 					if (type == NONE) {
 						type = DOUBLE;
 					}
+					/* Falls through. */
 
 				case 's':
 					if (type == NONE) {
@@ -6560,7 +6569,7 @@
 		SetStrVal(VarId,p);
 }
 
-void SetInputStr(PCHAR Str)
+void SetInputStr(const char *Str)
 {
 	WORD VarType;
 	TVarId VarId;

Modified: branches/unicode_buf/teraterm/ttpmacro/ttl.h
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttl.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttl.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2005-2017 TeraTerm Project
+ * (C) 2005-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -49,7 +49,7 @@
 void Exec();
 void SetMatchStr(PCHAR Str);
 void SetGroupMatchStr(int no, PCHAR Str);
-void SetInputStr(PCHAR Str);
+void SetInputStr(const char *Str);
 void SetResult(int ResultCode);
 BOOL CheckTimeout();
 BOOL TestWakeup(int Wakeup);

Modified: branches/unicode_buf/teraterm/ttpmacro/ttmacro.cpp
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttmacro.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttmacro.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -138,7 +138,7 @@
 	init();
 
 	Busy = TRUE;
-	pCCtrlWindow = new CCtrlWindow();
+	pCCtrlWindow = new CCtrlWindow(hInst);
 	pCCtrlWindow->Create();
 	Busy = FALSE;
 

Modified: branches/unicode_buf/teraterm/ttpmacro/ttmbuff.c
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttmbuff.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttmbuff.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -31,6 +31,9 @@
 
 #include "teraterm.h"
 #include <string.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
 #include <stdlib.h>
 #include <crtdbg.h>
 #include "ttmparse.h"
@@ -39,11 +42,6 @@
 
 #include "ttmbuff.h"
 
-#ifdef _DEBUG
-#define malloc(l)     _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)       _free_dbg((p), _NORMAL_BLOCK)
-#endif
-
 int EndWhileFlag;
 int BreakFlag;
 BOOL ContinueFlag;

Modified: branches/unicode_buf/teraterm/ttpmacro/ttmdlg.cpp
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttmdlg.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttmdlg.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2006-2017 TeraTerm Project
+ * (C) 2006-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,6 +32,10 @@
 #include <windows.h>
 #include <direct.h>
 #include <commdlg.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <stdlib.h>
 #include <crtdbg.h>
 #include <assert.h>
 
@@ -50,15 +54,6 @@
 
 #include "ttmdlg.h"
 
-#ifdef _DEBUG
-#define malloc(l)     _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define realloc(p, l) _realloc_dbg((p), (l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define calloc(c, s)  _calloc_dbg((c), (s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)       _free_dbg((p), _NORMAL_BLOCK)
-#define strdup(s)	  _strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define _strdup(s)	  _strdup_dbg((s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#endif
-
 char HomeDir[MAX_PATH];
 char FileName[MAX_PATH];
 char TopicName[11];
@@ -68,8 +63,9 @@
 int ParamsSize;
 BOOL SleepFlag;
 
-static int DlgPosX = -10000;
-static int DlgPosY = 0;
+// (x,y) = (CW_USEDEFAULT, CW_USEDEFAULT)\x82̂Ƃ\xAB\x83Z\x83\x93\x83^\x81[\x82ɕ\\x8E\xA6
+static int DlgPosX = CW_USEDEFAULT;
+static int DlgPosY = CW_USEDEFAULT;
 
 static CStatDlg *StatDlg = NULL;
 
@@ -226,27 +222,34 @@
 void OpenInpDlg(PCHAR Buff, PCHAR Text, PCHAR Caption,
                 PCHAR Default, BOOL Paswd)
 {
+	HINSTANCE hInst = GetInstance();
+	HWND hWndParent = GetHWND();
 	CInpDlg InpDlg(Buff,Text,Caption,Default,Paswd,DlgPosX,DlgPosY);
-	InpDlg.DoModal();
+	InpDlg.DoModal(hInst, hWndParent);
 }
 
 int OpenErrDlg(const char *Msg, PCHAR Line, int lineno, int start, int end, PCHAR FileName)
 {
+	HINSTANCE hInst = GetInstance();
+	HWND hWndParent = GetHWND();
 	CErrDlg ErrDlg(Msg,Line,DlgPosX,DlgPosY, lineno, start, end, FileName);
-	return ErrDlg.DoModal();
+	return ErrDlg.DoModal(hInst, hWndParent);
 }
 
 int OpenMsgDlg(PCHAR Text, PCHAR Caption, BOOL YesNo)
 {
+	HINSTANCE hInst = GetInstance();
+	HWND hWndParent = GetHWND();
 	CMsgDlg MsgDlg(Text,Caption,YesNo,DlgPosX,DlgPosY);
-	return MsgDlg.DoModal();
+	return MsgDlg.DoModal(hInst, hWndParent);
 }
 
 void OpenStatDlg(PCHAR Text, PCHAR Caption)
 {
 	if (StatDlg==NULL) {
+		HINSTANCE hInst = GetInstance();
 		StatDlg = new CStatDlg();
-		StatDlg->Create(Text,Caption,DlgPosX,DlgPosY);
+		StatDlg->Create(hInst,Text,Caption,DlgPosX,DlgPosY);
 	}
 	else {// if status box already exists,
 		// update text and caption only.
@@ -280,8 +283,10 @@
  */
 int OpenListDlg(PCHAR Text, PCHAR Caption, const CHAR **Lists, int Selected)
 {
+	HINSTANCE hInst = GetInstance();
+	HWND hWndParent = GetHWND();
 	CListDlg ListDlg(Text, Caption, Lists, Selected, DlgPosX, DlgPosY);
-	INT_PTR r = ListDlg.DoModal();
+	INT_PTR r = ListDlg.DoModal(hInst, hWndParent);
 	if (r == IDOK) {
 		return ListDlg.m_SelectItem;
 	}

Modified: branches/unicode_buf/teraterm/ttpmacro/ttmmain.cpp
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttmmain.cpp	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttmmain.cpp	2019-12-13 15:12:00 UTC (rev 8438)
@@ -81,17 +81,15 @@
 }
 
 // CCtrlWindow dialog
-CCtrlWindow::CCtrlWindow()
+CCtrlWindow::CCtrlWindow(HINSTANCE hInst)
 {
-	HINSTANCE hInst = GetInstance();
+	m_hInst = hInst;
 	m_hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_TTMACRO));
 }
 
 BOOL CCtrlWindow::Create()
 {
-	HINSTANCE hInst = GetInstance();
-	HWND parent = NULL;
-	if (! TTCDialog::Create(hInst, parent, CCtrlWindow::IDD)) {
+	if (! TTCDialog::Create(m_hInst, NULL, CCtrlWindow::IDD)) {
 		PostQuitMessage(0);
 		return FALSE;
 	}
@@ -244,27 +242,6 @@
 	return FALSE;
 }
 
-#if 0
-BEGIN_MESSAGE_MAP(CCtrlWindow, CDialog)
-	//{{AFX_MSG_MAP(CCtrlWindow)
-	ON_WM_CLOSE()
-	ON_WM_DESTROY()
-	ON_WM_ERASEBKGND()
-	ON_WM_PAINT()
-	ON_WM_SIZE()
-	ON_WM_GETMINMAXINFO()
-	ON_WM_QUERYDRAGICON()
-	ON_WM_SYSCOLORCHANGE()
-	ON_WM_TIMER()
-	ON_MESSAGE(WM_USER_DDECMNDEND,OnDdeCmndEnd)
-	ON_MESSAGE(WM_USER_DDECOMREADY,OnDdeComReady)
-	ON_MESSAGE(WM_USER_DDEREADY,OnDdeReady)
-	ON_MESSAGE(WM_USER_MACROBRINGUP,OnMacroBringup)
-	ON_MESSAGE(WM_USER_DDEEND,OnDdeEnd)
-	//}}AFX_MSG_MAP
-END_MESSAGE_MAP()
-#endif
-
 // CCtrlWindow message handler
 
 BOOL CCtrlWindow::OnInitDialog()
@@ -273,9 +250,6 @@
 		{ IDC_CTRLPAUSESTART, "BTN_PAUSE" },
 		{ IDC_CTRLEND, "BTN_END" },
 	};
-	HDC TmpDC;
-	int CRTWidth, CRTHeight;
-	RECT Rect;
 	char Temp[MAX_PATH + 8]; // MAX_PATH + "MACRO - "(8)
 	BOOL IOption, VOption;
 	int CmdShow;
@@ -282,32 +256,20 @@
 	int fuLoad = LR_DEFAULTCOLOR;
 	RECT rc_dlg, rc_filename, rc_lineno;
 	LONG dlg_len, len;
-	HINSTANCE hInst = GetInstance();
 
 	SetDlgTexts(m_hWnd, TextInfos, _countof(TextInfos), UILanguageFile);
 
 	Pause = FALSE;
 
-	// \x83Z\x83\x93\x83^\x81[\x82Ɏ\x9D\x82\xC1\x82Ă\xA2\x82\xAD
-	TmpDC = ::GetDC(GetSafeHwnd());
-	CRTWidth = ::GetDeviceCaps(TmpDC,HORZRES);
-	CRTHeight = ::GetDeviceCaps(TmpDC,VERTRES);
-	::GetWindowRect(m_hWnd, &Rect);
-	::ReleaseDC(GetSafeHwnd(), TmpDC);
-	::SetWindowPos(GetSafeHwnd(),HWND_TOP,
-	               (CRTWidth-Rect.right+Rect.left) / 2,
-	               (CRTHeight-Rect.bottom+Rect.top) / 2,
-	               0,0,SWP_NOSIZE | SWP_NOZORDER);
-
 	if (IsWindowsNT4()) {
 		fuLoad = LR_VGACOLOR;
 	}
 	::PostMessage(GetSafeHwnd(),WM_SETICON,ICON_SMALL,
-	              (LPARAM)LoadImage(hInst,
+	              (LPARAM)LoadImage(m_hInst,
 	                                MAKEINTRESOURCE(IDI_TTMACRO),
 	                                IMAGE_ICON,16,16,fuLoad));
 	::PostMessage(GetSafeHwnd(),WM_SETICON,ICON_BIG,
-	              (LPARAM)LoadImage(hInst,
+	              (LPARAM)LoadImage(m_hInst,
 	                                MAKEINTRESOURCE(IDI_TTMACRO),
 	                                IMAGE_ICON,0,0,fuLoad));
 
@@ -364,6 +326,8 @@
 		WS_CHILD | WS_VISIBLE |
 		CCS_BOTTOM | SBARS_SIZEGRIP, NULL, GetSafeHwnd(), 1);
 
+	CenterWindow(m_hWnd, NULL);
+
 	if (VOption) {
 		return TRUE;
 	}
@@ -378,13 +342,12 @@
 	return TRUE;
 }
 
-BOOL CCtrlWindow::OnCancel( )
+// \x83_\x83C\x83A\x83\x8D\x83O\x8F\xE3\x82ɃL\x83\x83\x83\x93\x83Z\x83\x8B\x83{\x83^\x83\x93 IDCANCEL \x82\xAA\x82Ȃ\xA2\x82̂ŁA
+// ESC\x82\xAA\x89\x9F\x82\xB3\x82ꂽ\x82Ƃ\xAB\x82\xBE\x82\xAF\x8CĂяo\x82\xB3\x82\xEA\x82\xE9
+BOOL CCtrlWindow::OnCancel()
 {
-#if 1
-	::DestroyWindow(m_hStatus);
-	DestroyWindow();
-#endif
-	return TRUE;	// cancel(ESC\x89\x9F\x89\xBA)\x82𖳎\x8B
+	// \x89\xBD\x82\xE0\x82\xB9\x82\xB8\x82\xC9TRUE\x82\xF0\x95Ԃ\xB7 -> ESC\x83L\x81[\x82𖳌\xF8\x89\xBB
+	return TRUE;
 }
 
 BOOL CCtrlWindow::OnCommand(WPARAM wParam, LPARAM lParam)
@@ -414,8 +377,7 @@
 
 BOOL CCtrlWindow::OnClose()
 {
-	EndTTL();
-	EndDDE();
+	DestroyWindow();
 	return TRUE;
 }
 
@@ -425,7 +387,7 @@
 
 	EndTTL();
 	EndDDE();
-//	CDialog::OnDestroy();
+	::DestroyWindow(m_hStatus);
 }
 
 // for icon drawing in Win NT 3.5
@@ -529,13 +491,6 @@
 	return m_hIcon;
 }
 
-#if 0
-void CCtrlWindow::OnSysColorChange()
-{
-	CDialog::OnSysColorChange();
-}
-#endif
-
 void CCtrlWindow::OnTimer(UINT_PTR nIDEvent)
 {
 	BOOL TimeOut;
@@ -619,16 +574,6 @@
 	return TRUE;
 }
 
-#if 0
-BOOL CCtrlWindow::PreTranslateMessage(MSG* pMsg)
-{
-	if ((pMsg->message==WM_KEYDOWN) && (pMsg->wParam==VK_ESCAPE)) { // ignore ESC key
-		return FALSE;
-	}
-	return CDialog::PreTranslateMessage(pMsg);
-}
-#endif
-
 LRESULT CCtrlWindow::OnDdeCmndEnd(WPARAM wParam, LPARAM lParam)
 {
 	if (TTLStatus == IdTTLWaitCmndResult) {
@@ -752,11 +697,6 @@
 {
 	switch(msg)
 	{
-#if 0	// tmfc\x82ŏ\x88\x97\x9D\x82\xB3\x82\xEA\x82\xE9
-	case WM_CLOSE:
-		OnClose();
-		break;
-#endif
 	case WM_DESTROY:
 		OnDestroy();
 		PostQuitMessage(0);
@@ -768,15 +708,11 @@
 		OnPaint();
 		break;
 	case WM_SIZE:
-		OnSize(wp, LOWORD(lp), HIWORD(lp));
+		OnSize((UINT)wp, LOWORD(lp), HIWORD(lp));
 		break;
 	case WM_GETMINMAXINFO:
 		OnGetMinMaxInfo((MINMAXINFO *)lp);
 		break;
-#if 0
-	case WM_QUERYDRAGICON:
-	case WM_SYSCOLORCHANGE:
-#endif
 	case WM_TIMER:
 		OnTimer(wp);
 		break;

Modified: branches/unicode_buf/teraterm/ttpmacro/ttmmain.h
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttmmain.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttmmain.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2007-2017 TeraTerm Project
+ * (C) 2007-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -39,23 +39,17 @@
 {
 public:
 	BOOL Pause;
-	CCtrlWindow();
+	CCtrlWindow(HINSTANCE hInst);
 	int Create();
 	BOOL OnIdle();
 
-// Dialog Data
-	//{{AFX_DATA(CCtrlWindow)
 	enum { IDD = IDD_CTRLWIN };
-	//}}AFX_DATA
 
-	//{{AFX_VIRTUAL(CCtrlWindow)
-	protected:
-	virtual BOOL OnCancel( );
+protected:
+	virtual BOOL OnCancel();
 	virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
 	virtual BOOL PostNcDestroy();
 	virtual BOOL OnInitDialog();
-	//	virtual BOOL PreTranslateMessage(MSG* pMsg);		// TODO
-	//}}AFX_VIRTUAL
 	virtual LRESULT DlgProc(UINT msg, WPARAM wp, LPARAM lp);
 
 protected:
@@ -66,23 +60,19 @@
 	LONG m_filename_ratio, m_lineno_ratio;
 	HWND m_hStatus;
 
-	//{{AFX_MSG(CCtrlWindow)
-#define afx_msg
-	afx_msg BOOL OnClose();
-	afx_msg void OnDestroy();
-	afx_msg BOOL OnEraseBkgnd(HDC DC);
-	afx_msg void OnPaint();
-	afx_msg void OnSize(UINT nType, int cx, int cy);
-	afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
-	afx_msg HCURSOR OnQueryDragIcon();
-	afx_msg void OnSysColorChange();
-	afx_msg void OnTimer(UINT_PTR nIDEvent);
-	afx_msg LRESULT OnDdeCmndEnd(WPARAM wParam, LPARAM lParam);
-	afx_msg LRESULT OnDdeComReady(WPARAM wParam, LPARAM lParam);
-	afx_msg LRESULT OnDdeReady(WPARAM wParam, LPARAM lParam);
-	afx_msg LRESULT OnDdeEnd(WPARAM wParam, LPARAM lParam);
-	afx_msg LRESULT OnMacroBringup(WPARAM wParam, LPARAM lParam);
-	//}}AFX_MSG
-//	DECLARE_MESSAGE_MAP()
+	BOOL OnClose();
+	void OnDestroy();
+	BOOL OnEraseBkgnd(HDC DC);
+	void OnPaint();
+	void OnSize(UINT nType, int cx, int cy);
+	void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
+	HCURSOR OnQueryDragIcon();
+	void OnSysColorChange();
+	void OnTimer(UINT_PTR nIDEvent);
+	LRESULT OnDdeCmndEnd(WPARAM wParam, LPARAM lParam);
+	LRESULT OnDdeComReady(WPARAM wParam, LPARAM lParam);
+	LRESULT OnDdeReady(WPARAM wParam, LPARAM lParam);
+	LRESULT OnDdeEnd(WPARAM wParam, LPARAM lParam);
+	LRESULT OnMacroBringup(WPARAM wParam, LPARAM lParam);
 };
 

Modified: branches/unicode_buf/teraterm/ttpmacro/ttmparse.c
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttmparse.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttmparse.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2005-2017 TeraTerm Project
+ * (C) 2005-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -33,17 +33,15 @@
 #include <string.h>
 #include <stdio.h>
 #include <ctype.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <stdlib.h>
 #include <crtdbg.h>
 #include "ttmdlg.h"
 #include "ttmparse.h"
 #include "ttmbuff.h"
 
-#ifdef _DEBUG
-#define calloc(c, s)  _calloc_dbg((c), (s), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define malloc(l)     _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)       _free_dbg((p), _NORMAL_BLOCK)
-#endif
-
 /* C\x8C\xBE\x8C\xEA\x83X\x83^\x83C\x83\x8B\x82̃R\x83\x81\x83\x93\x83g\x82\xF0\x83T\x83|\x81[\x83g\x82\xB7\x82邩\x82ǂ\xA4\x82\xA9 (2009.7.2 yutaka) */
 #define SUPPORT_C_STYLE_COMMENT
 static int commenting = 0;   /* C\x8C\xBE\x8C\xEA\x83R\x83\x81\x83\x93\x83g */
@@ -725,71 +723,73 @@
 	return (strlen(Name)>0);
 }
 
-	int GetQuotedStr(PCHAR Str, BYTE q, LPWORD i)
+static int GetQuotedStr(PCHAR Str, BYTE q, LPWORD i)
+{
+	BYTE b;
+
+	b=0;
+	if (LinePtr<LineLen) b = LineBuff[LinePtr];
+	while ((LinePtr<LineLen) && (b>=' '||b=='\t') && (b!=q))
 	{
-		BYTE b;
+		if (*i<MaxStrLen-1)
+		{
+			Str[*i] = b;
+			(*i)++;
+		}
 
-		b=0;
+		LinePtr++;
 		if (LinePtr<LineLen) b = LineBuff[LinePtr];
-		while ((LinePtr<LineLen) && (b>=' '||b=='\t') && (b!=q))
-		{
-			if (*i<MaxStrLen-1)
-			{
-				Str[*i] = b;
-				(*i)++;
-			}
+	}
+	if (b==q) {
+		if (LinePtr<LineLen)
+			LinePtr++;
+	}
+	else
+		return (ErrSyntax);
 
+	return 0;
+}
+
+static WORD GetCharByCode(PCHAR Str, LPWORD i)
+{
+	BYTE b;
+	WORD n;
+
+	b=0;
+	n = 0;
+	if (LinePtr<LineLen) b = LineBuff[LinePtr];
+	if (!isdigit(b) && (b!='$')) return ErrSyntax;
+
+	if (b!='$') { /* decimal */
+		while ((LinePtr<LineLen) && isdigit(b)) { // [0-9]
+			n = n * 10 + b - '0';
 			LinePtr++;
 			if (LinePtr<LineLen) b = LineBuff[LinePtr];
 		}
-		if (b==q)
-			if (LinePtr<LineLen) LinePtr++;
-		else
-			return (ErrSyntax);
-
-		return 0;
 	}
-
-	WORD GetCharByCode(PCHAR Str, LPWORD i)
-	{
-		BYTE b;
-		WORD n;
-
-		b=0;
-		n = 0;
+	else { /* hexadecimal */
+		LinePtr++;
 		if (LinePtr<LineLen) b = LineBuff[LinePtr];
-		if (!isdigit(b) && (b!='$')) return ErrSyntax;
-
-		if (b!='$') { /* decimal */
-			while ((LinePtr<LineLen) && isdigit(b)) { // [0-9]
-				n = n * 10 + b - '0';
-				LinePtr++;
-				if (LinePtr<LineLen) b = LineBuff[LinePtr];
-			}
-		}
-		else { /* hexadecimal */
+		while ((LinePtr<LineLen) && isxdigit(b)) { // [0-9A-Fa-f]
+			if (isalpha(b))
+				b = (b|0x20) - 'a' + 10;
+			else
+				b = b - '0';
+			n = n * 16 + b;
 			LinePtr++;
 			if (LinePtr<LineLen) b = LineBuff[LinePtr];
-			while ((LinePtr<LineLen) && isxdigit(b)) { // [0-9A-Fa-f]
-				if (isalpha(b))
-					b = (b|0x20) - 'a' + 10;
-				else
-					b = b - '0';
-				n = n * 16 + b;
-				LinePtr++;
-				if (LinePtr<LineLen) b = LineBuff[LinePtr];
-			}
 		}
+	}
 
-		if ((n==0) || (n>255)) return ErrSyntax;
+	if ((n==0) || (n>255)) return ErrSyntax;
 
-		if (*i<MaxStrLen-1)
-		{
-			Str[*i] = (char)n;
-			(*i)++;
-		}
-		return 0;
+	if (*i<MaxStrLen-1)
+	{
+		Str[*i] = (char)n;
+		(*i)++;
 	}
+	return 0;
+}
 
 BOOL GetString(PCHAR Str, LPWORD Err)
 {
@@ -1790,7 +1790,7 @@
 		*Err = ErrSyntax;
 }
 
-void SetStrVal(TVarId VarId, PCHAR Str)
+void SetStrVal(TVarId VarId, const char *Str)
 {
 	// StrBuf \x82̉^\x97p\x8F\xE3 MaxStrLen \x82\xAA\x90\xB3\x82\xB5\x82\xA2\x83T\x83C\x83Y\x82Ȃ̂ŃT\x83C\x83Y\x82\xF0\x8CŒ\xE8
 	// (2007.6.23 maya)

Modified: branches/unicode_buf/teraterm/ttpmacro/ttmparse.h
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttmparse.h	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttmparse.h	2019-12-13 15:12:00 UTC (rev 8438)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 1994-1998 T. Teranishi
- * (C) 2005-2017 TeraTerm Project
+ * (C) 2005-2019 TeraTerm Project
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -346,7 +346,7 @@
 void GetStrVal(PCHAR Str, LPWORD Err);
 void GetStrVal2(PCHAR Str, LPWORD Err, BOOL AutoConversion);
 void GetStrVar(PVarId VarId, LPWORD Err);
-void SetStrVal(TVarId VarId, PCHAR Str);
+void SetStrVal(TVarId VarId, const char *Str);
 PCHAR StrVarPtr(TVarId VarId);
 void GetVarType(LPWORD ValType, int far *Val, LPWORD Err);
 TVarId GetIntVarFromArray(TVarId VarId, int Index, LPWORD Err);

Modified: branches/unicode_buf/teraterm/ttpmacro/ttpmacro.rc
===================================================================
--- branches/unicode_buf/teraterm/ttpmacro/ttpmacro.rc	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpmacro/ttpmacro.rc	2019-12-13 15:12:00 UTC (rev 8438)
@@ -54,7 +54,7 @@
 // Dialog
 //
 
-IDD_CTRLWIN DIALOGEX 20, 20, 116, 51
+IDD_CTRLWIN DIALOGEX 20, 20, 116, 61
 STYLE DS_SETFONT | DS_3DLOOK | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
 CAPTION "MACRO"
 FONT 14, "System", 0, 0, 0x0
@@ -61,8 +61,8 @@
 BEGIN
     DEFPUSHBUTTON   "&Pau&se",IDC_CTRLPAUSESTART,21,14,30,14
     PUSHBUTTON      "&End",IDC_CTRLEND,65,14,30,14
-    LTEXT           "LineNo:",IDC_LINENO,42,34,70,8
-    RTEXT           "FILENAME",IDC_FILENAME,3,34,35,8,SS_ENDELLIPSIS
+    LTEXT           "LineNo:",IDC_LINENO,42,36,70,8
+    RTEXT           "FILENAME",IDC_FILENAME,3,36,35,8,SS_ENDELLIPSIS
 END
 
 IDD_ERRDLG DIALOGEX 20, 20, 263, 49
@@ -91,8 +91,8 @@
 STYLE DS_SETFONT | DS_3DLOOK | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
 FONT 14, "System", 0, 0, 0x0
 BEGIN
+    LTEXT           "",IDC_MSGTEXT,0,8,65,9,SS_NOPREFIX
     DEFPUSHBUTTON   "OK",IDOK,0,31,35,12
-    LTEXT           "",IDC_MSGTEXT,0,8,65,9,SS_NOPREFIX
     PUSHBUTTON      "No",IDCANCEL,45,31,35,12,NOT WS_VISIBLE
 END
 
@@ -125,7 +125,7 @@
 BEGIN
     IDD_CTRLWIN, DIALOG
     BEGIN
-        BOTTOMMARGIN, 42
+        BOTTOMMARGIN, 56
     END
 
     IDD_ERRDLG, DIALOG

Modified: branches/unicode_buf/teraterm/ttpset/ttset.c
===================================================================
--- branches/unicode_buf/teraterm/ttpset/ttset.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/teraterm/ttpset/ttset.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -711,7 +711,7 @@
 {
 	int i;
 	HDC TmpDC;
-	char Temp[MAX_PATH], Temp2[MAX_PATH];
+	char Temp[MAX_PATH], Temp2[MAX_PATH], *p;
 
 	ts->Minimize = 0;
 	ts->HideWindow = 0;
@@ -729,10 +729,24 @@
 
 	ts->DisableTCPEchoCR = FALSE;
 
-	/* Version number */
-/*  GetPrivateProfileString(Section,"Version","",
-			  Temp,sizeof(Temp),FName); */
+	/*
+	 * Version number
+	 * \x90ݒ\xE8\x83t\x83@\x83C\x83\x8B\x82\xAA\x82ǂ̃o\x81[\x83W\x83\x87\x83\x93\x82\xCC Tera Term \x82ŕۑ\xB6\x82\xB3\x82ꂽ\x82\xA9\x82\xF0\x95\\x82\xB7
+	 * \x90ݒ\xE8\x83t\x83@\x83C\x83\x8B\x82̕ۑ\xB6\x8E\x9E\x82͂\xB1\x82̒l\x82ł͂Ȃ\xAD\x81A\x8C\xBB\x8D݂\xCC Tera Term \x82̃o\x81[\x83W\x83\x87\x83\x93\x82\xAA\x8Eg\x82\xED\x82\xEA\x82\xE9
+	 */
+	GetPrivateProfileString(Section, "Version", TT_VERSION_STR("."), Temp, sizeof(Temp), FName);
+	p = strchr(Temp, '.');
+	if (p) {
+		*p++ = 0;
+		ts->ConfigVersion = atoi(Temp) * 10000 + atoi(p);
+	}
+	else {
+		ts->ConfigVersion = 0;
+	}
 
+	// TTX \x82\xC5 \x8Am\x94F\x82ł\xAB\x82\xE9\x82悤\x81ATera Term \x82̃o\x81[\x83W\x83\x87\x83\x93\x82\xF0\x8Ai\x94[\x82\xB5\x82Ă\xA8\x82\xAD
+	ts->RunningVersion = TT_VERSION_MAJOR * 10000 + TT_VERSION_MINOR;
+
 	/* Language */
 	GetPrivateProfileString(Section, "Language", "",
 	                        Temp, sizeof(Temp), FName);
@@ -1999,6 +2013,7 @@
 	}
 
 	// Clipboard Access from Remote
+	ts->CtrlFlag &= ~CSF_CBMASK;
 	GetPrivateProfileString(Section, "ClipboardAccessFromRemote", "off", Temp, sizeof(Temp), FName);
 	if (_stricmp(Temp, "on") == 0 || _stricmp(Temp, "readwrite") == 0)
 		ts->CtrlFlag |= CSF_CBRW;
@@ -2006,6 +2021,8 @@
 		ts->CtrlFlag |= CSF_CBREAD;
 	else if (_stricmp(Temp, "write") == 0)
 		ts->CtrlFlag |= CSF_CBWRITE;
+	else
+		ts->CtrlFlag |= CSF_CBNONE; // \x8E\xC0\x8E\xBF\x89\xBD\x82\xE0\x82\xB5\x82Ȃ\xA2
 
 	// Notify Clipboard Access from Remote
 	ts->NotifyClipboardAccess = GetOnOff(Section, "NotifyClipboardAccess", FName, TRUE);
@@ -2210,6 +2227,14 @@
 	else
 		ts->TerminalOutputSpeed = ts->TerminalInputSpeed;
 
+	// Clear scroll buffer from remote -- special option
+	if (GetOnOff(Section, "ClearScrollBufferFromRemote", FName, TRUE))
+		ts->TermFlag |= TF_REMOTECLEARSBUFF;
+
+	// Delay for start of mouse selection
+	ts->SelectStartDelay =
+		GetPrivateProfileInt(Section, "MouseSelectStartDelay", 0, FName);
+
 	// Fallback to CP932 (Experimental)
 	ts->FallbackToCP932 = GetOnOff(Section, "FallbackToCP932", FName, FALSE);
 
@@ -3356,7 +3381,7 @@
 	WritePrivateProfileString(Section, "TabStopModifySequence", Temp, FName);
 
 	// Clipboard Access from Remote
-	switch (ts->CtrlFlag & CSF_CBRW) {
+	switch (ts->CtrlFlag & CSF_CBMASK) {
 	case CSF_CBREAD:
 		WritePrivateProfileString(Section, "ClipboardAccessFromRemote", "read", FName);
 		break;
@@ -3530,6 +3555,13 @@
 			ts->TerminalInputSpeed, ts->TerminalOutputSpeed);
 	}
 
+	// Clear scroll buffer from remote -- special option
+	WriteOnOff(Section, "ClearScrollBufferFromRemote", FName,
+		(WORD) (ts->PasteFlag & TF_REMOTECLEARSBUFF));
+
+	// Delay for start of mouse selection
+	WriteInt(Section, "MouseSelectStartDelay", FName, ts->SelectStartDelay);
+
 	// CygTerm Configuration File
 	WriteCygtermConfFile(ts);
 
@@ -4278,6 +4310,17 @@
 			ts->LogFN[0] = '\0';
 			ts->LogAutoStart = 0;
 		}
+		else if (_strnicmp(Temp, "/OSC52=", 7) == 0) {	/* Clipboard access */
+			ts->CtrlFlag &= ~CSF_CBMASK;
+			if (_stricmp(&Temp[7], "on") == 0 || _stricmp(&Temp[7], "readwrite") == 0)
+				ts->CtrlFlag |= CSF_CBRW;
+			else if (_stricmp(&Temp[7], "read") == 0)
+				ts->CtrlFlag |= CSF_CBREAD;
+			else if (_stricmp(&Temp[7], "write") == 0)
+				ts->CtrlFlag |= CSF_CBWRITE;
+			else if (_stricmp(&Temp[7], "off") == 0)
+				ts->CtrlFlag |= CSF_CBNONE;
+		}
 		else if (_strnicmp(Temp, "/P=", 3) == 0) {	/* TCP port num */
 			ParamPort = IdTCPIP;
 			ParamTCP = ParsePortName(&Temp[3]);

Modified: branches/unicode_buf/ttssh2/ttxssh/auth.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/auth.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/auth.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -39,6 +39,10 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <lmcons.h>		// for UNLEN
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <stdlib.h>
 #include <crtdbg.h>
 
 #include "resource.h"
@@ -48,11 +52,6 @@
 #include "auth.h"
 #include "helpid.h"
 
-#if defined(_DEBUG) && !defined(_CRTDBG_MAP_ALLOC)
-#define malloc(l) _malloc_dbg((l), _NORMAL_BLOCK, __FILE__, __LINE__)
-#define free(p)   _free_dbg((p), _NORMAL_BLOCK)
-#endif
-
 #define AUTH_START_USER_AUTH_ON_ERROR_END 1
 
 #define MAX_AUTH_CONTROL IDC_SSHUSEPAGEANT

Modified: branches/unicode_buf/ttssh2/ttxssh/cipher-ctr.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/cipher-ctr.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/cipher-ctr.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -471,18 +471,6 @@
 	return (1);
 }
 
-void
-ssh_camellia_ctr_iv(EVP_CIPHER_CTX *evp, int doset, unsigned char * iv, unsigned int len)
-{
-	struct ssh_camellia_ctr_ctx *c;
-
-	if ((c = EVP_CIPHER_CTX_get_app_data(evp)) != NULL)
-		if(doset)
-			memcpy(c->camellia_counter, iv, len);
-		else
-			memcpy(iv, c->camellia_counter, len);
-}
-
 const EVP_CIPHER *
 evp_camellia_128_ctr(void)
 {

Modified: branches/unicode_buf/ttssh2/ttxssh/ssh.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ssh.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ssh.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -33,6 +33,7 @@
 #include "libputty.h"
 #include "key.h"
 #include "ttcommon.h"
+#include "codeconv.h"
 
 #include <openssl/bn.h>
 #include <openssl/evp.h>
@@ -4103,8 +4104,18 @@
 	if (direction == TOREMOTE) {  // copy local to remote
 		fp = fopen(sendfile, "rb");
 		if (fp == NULL) {
-			char buf[80];
-			_snprintf_s(buf, sizeof(buf), _TRUNCATE, "fopen: %d", GetLastError());
+			char buf[1024];
+			int len;
+			strcpy_s(buf, sizeof(buf), "Can't open file for reading: ");
+			len = strlen(buf);
+			FormatMessage(
+			    FORMAT_MESSAGE_FROM_SYSTEM,
+			    NULL,
+			    GetLastError(),
+			    0,
+			    buf+len,
+			    sizeof(buf)-len,
+			    NULL);
 			MessageBox(NULL, buf, "TTSSH: file open error", MB_OK | MB_ICONERROR);
 			goto error;
 		}
@@ -4159,9 +4170,19 @@
 
 		fp = fopen(c->scp.localfilefull, "wb");
 		if (fp == NULL) {
-			char buf[512];
-			_snprintf_s(buf, sizeof(buf), _TRUNCATE, "fopen: %d", GetLastError());
-			MessageBox(NULL, buf, "TTSSH: file open write error", MB_OK | MB_ICONERROR);
+			char buf[1024];
+			int len;
+			strcpy_s(buf, sizeof(buf), "Can't open file for writing: ");
+			len = strlen(buf);
+			FormatMessage(
+			    FORMAT_MESSAGE_FROM_SYSTEM,
+			    NULL,
+			    GetLastError(),
+			    0,
+			    buf+len,
+			    sizeof(buf)-len,
+			    NULL);
+			MessageBox(NULL, buf, "TTSSH: file open error", MB_OK | MB_ICONERROR);
 			goto error;
 		}
 
@@ -7544,7 +7565,7 @@
 	}
 
 	if (msglen > 0) {
-		unsigned char *msg;
+		char *msg, *msgA;
 
 		if (pvar->authbanner_buffer == NULL) {
 			pvar->authbanner_buffer = buffer_init();
@@ -7569,6 +7590,27 @@
 			break;
 		case 1:
 			if (pvar->authbanner_buffer != NULL) {
+				if (pvar->ts->Language == IdJapanese) { // \x82Ƃ肠\x82\xA6\x82\xB8\x93\xFA\x96{\x8Cꃂ\x81[\x83h\x82̂ݑΉ\x9E
+					switch (pvar->ts->KanjiCode) {
+					case IdSJIS:
+						msgA = ToCharU8(msg);
+						if (msgA) {
+							msg = msgA;
+							msglen = strlen(msg);
+						}
+						break;
+					case IdEUC:
+						// CP51932 \x82ւ̕ϊ\xB7\x82Ŏ蔲\x82\xAB\x82\xB5\x82悤\x82Ƃ\xB5\x82\xBD\x82\xAA
+						// \x8Eg\x82\xA6\x82Ȃ\xA9\x82\xC1\x82\xBD\x82̂łƂ肠\x82\xA6\x82\xB8\x94\xF1\x91Ή\x9E
+						break;
+					case IdJIS:
+						// \x8Eg\x82\xED\x82\xEA\x82鎖\x82\xAA\x8F\xAD\x82Ȃ\xA2\x82̂Ɩʓ|\x82Ȃ̂łƂ肠\x82\xA6\x82\xB8\x94\xF1\x91Ή\x9E
+						break;
+					default:
+						// nothing to do
+						break;
+					}
+				}
 				new_payload_buffer = msg;
 				pvar->ssh_state.payload_datastart = 0;
 				pvar->ssh_state.payload_datalen = msglen;
@@ -7579,10 +7621,18 @@
 			}
 			break;
 		case 2:
-			MessageBox(pvar->cv->HWin, msg, "Authentication Banner", MB_OK | MB_ICONINFORMATION);
+			msgA = ToCharU8(msg);
+			if (msgA) {
+				MessageBox(pvar->cv->HWin, msgA, "Authentication Banner", MB_OK | MB_ICONINFORMATION);
+				free(msgA);
+			}
 			break;
 		case 3:
-			NotifyInfoMessage(pvar->cv, msg, "Authentication Banner");
+			msgA = ToCharU8(msg);
+			if (msgA) {
+				NotifyInfoMessage(pvar->cv, msgA, "Authentication Banner");
+				free(msgA);
+			}
 			break;
 		}
 		logprintf(LOG_LEVEL_NOTICE, "Banner len: %d, Banner message: %s.", msglen, msg);

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.c	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.c	2019-12-13 15:12:00 UTC (rev 8438)
@@ -994,7 +994,7 @@
 			char tmp[26];
 
 			_write(file, strtime, strlen(strtime));
-			GetWindowThreadProcessId(pvar->cv->HWin, &processid);
+			processid = GetCurrentProcessId();
 			_snprintf_s(tmp, sizeof(tmp), _TRUNCATE, " [%lu] ",processid);
 			_write(file, tmp, strlen(tmp));
 			_write(file, msg, strlen(msg));

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.rc
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.rc	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.rc	2019-12-13 15:12:00 UTC (rev 8438)
@@ -61,7 +61,7 @@
     LTEXT           "User &name:",IDC_SSHUSERNAMELABEL,17,31,46,8
     EDITTEXT        IDC_SSHUSERNAME,73,29,146,12,ES_AUTOHSCROLL
     PUSHBUTTON      "",IDC_USERNAME_OPTION,224,28,14,14,BS_ICON
-    LTEXT           "&Passphrase:",IDC_SSHPASSWORDCAPTION,17,46,47,8
+    LTEXT           "&Passphrase:",IDC_SSHPASSWORDCAPTION,17,46,54,8
     EDITTEXT        IDC_SSHPASSWORD,73,44,146,12,ES_PASSWORD | ES_AUTOHSCROLL
     PUSHBUTTON      "",IDC_SSHPASSWORD_OPTION,224,43,14,14,BS_ICON
     CONTROL         "Remember password in &memory",IDC_REMEMBER_PASSWORD,

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.v10.vcxproj.filters
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.v10.vcxproj.filters	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.v10.vcxproj.filters	2019-12-13 15:12:00 UTC (rev 8438)
@@ -109,6 +109,9 @@
     <ClCompile Include="..\..\teraterm\common\ttlib.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\teraterm\common\codeconv.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="arc4random.h">
@@ -195,6 +198,9 @@
     <ClInclude Include="x11util.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\teraterm\common\codeconv.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Image Include="ttsecure.ico">

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.v11.vcxproj.filters
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.v11.vcxproj.filters	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.v11.vcxproj.filters	2019-12-13 15:12:00 UTC (rev 8438)
@@ -109,6 +109,9 @@
     <ClCompile Include="..\..\teraterm\common\ttlib.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\teraterm\common\codeconv.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="arc4random.h">
@@ -195,6 +198,9 @@
     <ClInclude Include="x11util.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\teraterm\common\codeconv.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Image Include="ttsecure.ico">

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.v12.vcxproj.filters
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.v12.vcxproj.filters	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.v12.vcxproj.filters	2019-12-13 15:12:00 UTC (rev 8438)
@@ -195,6 +195,9 @@
     <ClInclude Include="x11util.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\teraterm\common\codeconv.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Image Include="ttsecure.ico">

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.v14.vcxproj.filters
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.v14.vcxproj.filters	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.v14.vcxproj.filters	2019-12-13 15:12:00 UTC (rev 8438)
@@ -109,6 +109,9 @@
     <ClCompile Include="..\..\teraterm\common\ttlib.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\teraterm\common\codeconv.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="arc4random.h">
@@ -195,6 +198,9 @@
     <ClInclude Include="x11util.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\teraterm\common\codeconv.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Image Include="ttsecure.ico">

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.v15.vcxproj.filters
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.v15.vcxproj.filters	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.v15.vcxproj.filters	2019-12-13 15:12:00 UTC (rev 8438)
@@ -109,6 +109,9 @@
     <ClCompile Include="..\..\teraterm\common\ttlib.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\teraterm\common\codeconv.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="arc4random.h">
@@ -195,6 +198,9 @@
     <ClInclude Include="x11util.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\teraterm\common\codeconv.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Image Include="ttsecure.ico">
@@ -236,4 +242,4 @@
       <Filter>Def File</Filter>
     </None>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.v16.vcxproj.filters	2019-12-13 15:12:00 UTC (rev 8438)
@@ -109,6 +109,9 @@
     <ClCompile Include="..\..\teraterm\common\ttlib.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\teraterm\common\codeconv.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="arc4random.h">
@@ -195,6 +198,9 @@
     <ClInclude Include="x11util.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\teraterm\common\codeconv.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <Image Include="ttsecure.ico">
@@ -236,4 +242,4 @@
       <Filter>Def File</Filter>
     </None>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.v9.vcproj
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.v9.vcproj	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.v9.vcproj	2019-12-13 15:12:00 UTC (rev 8438)
@@ -247,6 +247,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\teraterm\common\codeconv.h"
+				>
+			</File>
+			<File
 				RelativePath="config.h"
 				>
 			</File>
@@ -367,6 +371,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\teraterm\common\codeconv.cpp"
+				>
+			</File>
+			<File
 				RelativePath="crypt.c"
 				>
 			</File>

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.vcproj
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.vcproj	2019-12-13 03:11:16 UTC (rev 8437)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.vcproj	2019-12-13 15:12:00 UTC (rev 8438)
@@ -236,6 +236,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\teraterm\common\codeconv.h"
+				>
+			</File>
+			<File
 				RelativePath="config.h"
 				>
 			</File>
@@ -368,6 +372,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\teraterm\common\codeconv.cpp"
+				>
+			</File>
+			<File
 				RelativePath="crypt.c"
 				>
 			</File>


Ttssh2-commit メーリングリストの案内