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

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 10月 15日 (火) 01:29:13 JST


Revision: 8306
          https://osdn.net/projects/ttssh2/scm/svn/commits/8306
Author:   zmatsuo
Date:     2019-10-15 01:29:12 +0900 (Tue, 15 Oct 2019)
Log Message:
-----------
Merge branch 'trunk' into unicode_buf

# Conflicts:
#	installer/teraterm.iss
#	teraterm/common/compat_win.cpp
#	teraterm/common/tipwin.cpp
#	teraterm/common/tipwin.h
#	teraterm/teraterm/sizetip.c
#	teraterm/ttpdlg/ttdlg.c
#	ttssh2/ttxssh/auth.c

Modified Paths:
--------------
    branches/unicode_buf/CMakeLists.txt
    branches/unicode_buf/doc/en/html/about/history.html
    branches/unicode_buf/doc/en/html/about/writer.html
    branches/unicode_buf/doc/en/html/menu/setup-serialport.html
    branches/unicode_buf/doc/en/html/uninstall.html
    branches/unicode_buf/doc/ja/html/about/history.html
    branches/unicode_buf/doc/ja/html/about/writer.html
    branches/unicode_buf/doc/ja/html/menu/setup-serialport.html
    branches/unicode_buf/doc/ja/html/uninstall.html
    branches/unicode_buf/teraterm/common/codeconv.cpp
    branches/unicode_buf/teraterm/common/compat_win.cpp
    branches/unicode_buf/teraterm/common/dllutil.cpp
    branches/unicode_buf/teraterm/common/tipwin.cpp
    branches/unicode_buf/teraterm/common/tipwin.h
    branches/unicode_buf/teraterm/teraterm/addsetting.cpp
    branches/unicode_buf/teraterm/teraterm/commlib.c
    branches/unicode_buf/teraterm/teraterm/sizetip.c
    branches/unicode_buf/teraterm/teraterm/tekwin.cpp
    branches/unicode_buf/teraterm/teraterm/ttsetup.h
    branches/unicode_buf/teraterm/teraterm/vtwin.cpp
    branches/unicode_buf/teraterm/teraterm/vtwin.h
    branches/unicode_buf/teraterm/ttpdlg/ttdlg.c
    branches/unicode_buf/teraterm/ttpfile/ttfile.c
    branches/unicode_buf/teraterm/ttpset/ttpset.def
    branches/unicode_buf/teraterm/ttpset/ttset.c
    branches/unicode_buf/ttssh2/ttxssh/auth.c
    branches/unicode_buf/ttssh2/ttxssh/ttxssh.c
    branches/unicode_buf/ttssh2/ttxssh/util.c
    branches/unicode_buf/ttssh2/ttxssh/util.h

Added Paths:
-----------
    branches/unicode_buf/teraterm/ttpset/ttset.h

-------------- next part --------------
Modified: branches/unicode_buf/CMakeLists.txt
===================================================================
--- branches/unicode_buf/CMakeLists.txt	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/CMakeLists.txt	2019-10-14 16:29:12 UTC (rev 8306)
@@ -68,7 +68,7 @@
 endif()
 
 ### create version_info.h
-if(EXISTS "${CMAKE_SOURCE_DIR}/.git")
+if(EXISTS "${CMAKE_SOURCE_DIR}/.git/svn")
   # git-svn
   find_package(Git)
   if(Git_FOUND)
@@ -115,13 +115,8 @@
 ####
 # ソースツリー内に生成ファイルが存在していたら削除する
 if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/teraterm/ttpdlg/svnversion.h")
-  # r7517より前
   file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/teraterm/ttpdlg/svnversion.h")
 endif()
-if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/teraterm/teraterm/svnversion.h")
-  # r7517以後
-  file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/teraterm/teraterm/svnversion.h")
-endif()
 if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/ttssh2/ttxssh/puttyversion.h")
   file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/ttssh2/ttxssh/puttyversion.h")
 endif()

Modified: branches/unicode_buf/doc/en/html/about/history.html
===================================================================
--- branches/unicode_buf/doc/en/html/about/history.html	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/doc/en/html/about/history.html	2019-10-14 16:29:12 UTC (rev 8306)
@@ -35,26 +35,34 @@
 <ul class="history">
   <li>Changes
     <ul>
-      <li>Added support for hardware flow control DSR/DTR with serial connection.
-        <ul>
-          <li>The hardware is renamed to RTS/CTS, and DSR/DTR is newly added on the Flow control of <a href="../menu/setup-serialport.html">Serial port ([Setup] menu)</a>.</li>
-          <li>MACRO: The DSR/DTR can be specified in <a href="../macro/command/setflowctrl.html">setflowctrl</a> command.</li>
-        </ul></li>
       <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>Added slider for specify the opacity values on the Visual tab of the <a href="../menu/setup-additional.html">Additional settings dialog</a>.</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>The <a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> dialog can be called even while TCP/IP connection.</li>
-      <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 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>
+      <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>Serial port connection
+        <ul>
+          <li>Added support for hardware flow control DSR/DTR with serial connection.
+            <ul>
+              <li>The hardware is renamed to RTS/CTS, and DSR/DTR is newly added on the Flow control of <a href="../menu/setup-serialport.html">Serial port ([Setup] menu)</a>.</li>
+              <li>MACRO: The DSR/DTR can be specified in <a href="../macro/command/setflowctrl.html">setflowctrl</a> command.</li>
+            </ul></li>
+          <li>The <a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> dialog can be called even while TCP/IP connection.</li>
+          <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 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>
+      
     </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>
@@ -65,6 +73,7 @@
 
   <li>Misc
     <ul>
+      <li>Bug fix: A font(TSPECIAL1.TTF) copy may fail when Tera Term installs from the installer.</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>
     </ul>
@@ -617,7 +626,7 @@
   <li>Bug fixes
     <ul>
       <li>When the host name includes a comment on new connection dialog, it will not connect to the remote host.</li>
-      <li>When the USB serial cable is inserted and extracted while the serial connection is doing, new serial connection will be failed. However, this fix is supported on the Windows XP or later. 
+      <li>When the USB serial cable is inserted and extracted while the serial connection is doing, new serial connection will be failed. However, this fix is supported on the Windows XP or later.
         <ul>
           <li>added the <a href="../setup/teraterm-com.html#AutoComPortReconnect">AutoComPortReconnect</a> entry in the teraterm.ini file. The default value is on.</li>
         </ul></li>
@@ -974,7 +983,7 @@
         </ul></li>
     </ul>
   </li>
-  
+
   <li>Bug fixes
     <ul>
       <li>When the UseNomalBGColor is on, the OSC 111(Resetting standard background color) control string after the OSC 11(Setting standard background color) can not reset the background color of characters including bold attribute and so on.</li>
@@ -984,7 +993,7 @@
       <li>When second Tera Term is launched, the keyboard configuration file can not be read.</li>
       <li>When the file is sent by D&D, the help button of the dialog can not be worked well.</li>
       <li>MACRO <a href="../macro/command/exec.html">exec</a>: The show parameter will be ignored when the wait parameter is 1(4.63 later) or the parameter is not 1(4.78 later).</li>
-    </ul> 
+    </ul>
   </li>
 
   <li>Misc
@@ -3247,11 +3256,11 @@
     </ul>
   </li>
 
-  <li>Misc
+  <!--li>Misc
     <ul>
       <li>upgraded OpenSSL to 1.0.2t.</li>
     </ul>
-  </li>
+  </li-->
 </ul>
 
 <h3 id="ttssh_2.89">2019.06.15 (Ver 2.89)</h3>
@@ -3758,7 +3767,7 @@
       <li>The SCP transfer is always aborted when the Tera Term window is minimized.</li>
     </ul>
   </li>
-  
+
   <li>Misc
     <ul>
       <li>upgraded OpenSSL to 1.0.1f</li>
@@ -4859,12 +4868,12 @@
 
 <h3 id="ttproxy_1.0.0.26">2019.xx.xx (Ver 1.0.0.26)</h3>
 <ul class="history">
-  <li>Changes
+  <!-- li>Changes
     <ul>
       <li></li>
     </ul>
-  </li>
-  
+  </li -->
+
   <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>
@@ -4879,7 +4888,7 @@
       <li>When the negotiation is failed with SOCKS4 and 5, an error information is added to message.</li>
     </ul>
   </li>
-  
+
   <li>Bug fixes
     <ul>
       <li>Bug fix: Depending on OS, setup dialog is not working correctly. This bug was introduced in 4.103.</li>

Modified: branches/unicode_buf/doc/en/html/about/writer.html
===================================================================
--- branches/unicode_buf/doc/en/html/about/writer.html	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/doc/en/html/about/writer.html	2019-10-14 16:29:12 UTC (rev 8306)
@@ -15,7 +15,7 @@
   <li><A HREF="http://www.geocities.jp/mki_ltd/">Masateru KUWATA</A> mkuwa****@excit*****</li>
   <li><A HREF="http://hp.vector.co.jp/authors/VA013320/">Yutaka Hirata</A> yutak****@gmail*****</li>
   <li>IWAMOTO Kouichi sue****@iwmt*****</li>
-  <li>NAGATA Shinya maya.****@gmail*****</li>
+  <li>NAGATA Shinya</li>
   <li>2Y -Yuta Yamashita- yuta****@user*****</li>
 </ul>
 

Modified: branches/unicode_buf/doc/en/html/menu/setup-serialport.html
===================================================================
--- branches/unicode_buf/doc/en/html/menu/setup-serialport.html	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/doc/en/html/menu/setup-serialport.html	2019-10-14 16:29:12 UTC (rev 8306)
@@ -58,6 +58,9 @@
 	  protocols are disabled. If Flow control is Xon/Xoff, the XMODEM
 	  and Quick-VAN protocols are disabled.
 	</p>
+	<p>
+	  Note: The "hardware" prior to version 4.104 applies to RTS/CTS.
+	</p>
       </dd>
 
       <dt id="Delay">Transmit delay</dt>

Modified: branches/unicode_buf/doc/en/html/uninstall.html
===================================================================
--- branches/unicode_buf/doc/en/html/uninstall.html	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/doc/en/html/uninstall.html	2019-10-14 16:29:12 UTC (rev 8306)
@@ -14,6 +14,7 @@
 
 <p>
 To uninstall Tera Term, run "Programs and Features" in Control Panel, or run unins000.exe in the Tera Term directory.<br>
+Next, remove the "Tera Special" font from "Fonts" in Control Panel.<br>
 If the uninstaller does not work, you can uninstall Tera Term manually.<br>
 </p>
 

Modified: branches/unicode_buf/doc/ja/html/about/history.html
===================================================================
--- branches/unicode_buf/doc/ja/html/about/history.html	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/doc/ja/html/about/history.html	2019-10-14 16:29:12 UTC (rev 8306)
@@ -35,26 +35,34 @@
 <ul class="history">
   <li>\x95ύX
     <ul>
-      <li>\x83V\x83\x8A\x83A\x83\x8B\x90ڑ\xB1\x82Ńn\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[\x90\xA7\x8C\xE4DSR/DTR\x82\xF0\x83T\x83|\x81[\x83g\x82\xB5\x82\xBD\x81B
-        <ul>
-          <li><a href="../menu/setup-serialport.html">Serial port ([Setup] \x83\x81\x83j\x83\x85\x81[)</a>\x82\xCCFlow control\x82\xC5hardware\x82\xF0RTS/CTS\x82ɕύX\x82\xB5\x81A\x90V\x82\xB5\x82\xADDSR/DTR\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
-          <li><a href="../macro/command/setflowctrl.html">setflowctrl</a>\x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82\xC5 DSR/DTR \x82\xF0\x8Ew\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
-        </ul></li>
       <li>\x83o\x81[\x83W\x83\x87\x83\x93\x8F\xEE\x95\xF1\x83_\x83C\x83A\x83\x8D\x83O\x82\xC9SFMT\x82̕\\x8BL\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
       <li><a href="../menu/file-new.html">New connection\x83_\x83C\x83A\x83\x8D\x83O</a>\x82̕\\x8BL\x82\xF0\x81uProtocol\x81v\x82\xA9\x82\xE7\x81uIP version\x81v\x82ɁA\x81uUNSPEC\x81v\x82\xF0\x81uAUTO\x81v\x82ɕύX\x82\xB5\x82\xBD\x81B</li>
       <li>VT \x83E\x83B\x83\x93\x83h\x83E\x82̃^\x83C\x83g\x83\x8B\x83o\x81[\x8F\xE3\x82Ń}\x83E\x83X\x83z\x83C\x81[\x83\x8B\x82𑀍삵\x82ăE\x83B\x83\x93\x83h\x83E\x82̕s\x93\xA7\x96\xBE\x93x\x82\xF0\x88ꎞ\x93I\x82ɕύX\x82\xB7\x82\xE9\x82Ƃ\xAB\x81A\x95s\x93\xA7\x96\xBE\x93x\x82\xF0\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
-      <li><a href="../menu/setup-additional.html">Additional settings\x83_\x83C\x83A\x83\x8D\x83O</a>\x82\xCCVisual\x83^\x83u\x82ŁA\x95s\x93\xA7\x96\xBE\x93x\x82\xF0\x83X\x83\x89\x83C\x83_\x81[\x82Ŏw\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+      <li><a href="../menu/setup-additional.html">Additional settings\x83_\x83C\x83A\x83\x8D\x83O</a>\x82\xCCVisual\x83^\x83u\x82ŁA\x95s\x93\xA7\x96\xBE\x93x\x82\xF0\x83X\x83\x89\x83C\x83_\x81[\x82Ŏw\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B\x94\xBC\x93\xA7\x96\xBE\x89\xBB\x82\xAA\x97\x98\x97p\x82ł\xAB\x82Ȃ\xA2\x82Ƃ\xAB\x95s\x93\xA7\x96\xBE\x93x\x82\xF0\x95ύX\x82ł\xAB\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <li>\x83\x8A\x83T\x83C\x83Y\x92\x86\x82̏c\x89\xA1\x83T\x83C\x83Y\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82̕\\x8E\xA6\x88ʒu\x82\xF0\x83\x8A\x83T\x83C\x83Y\x8C\xE3\x82̍\xC0\x95W\x82ɒǏ]\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
       <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>TCP/IP\x90ڑ\xB1\x92\x86\x82ɂ\xA8\x82\xA2\x82Ă\xE0<a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x8CĂяo\x82\xB9\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
-      <li><a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82̃^\x83C\x83g\x83\x8B\x82\xF0\x81u\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x81v\x82\xA9\x82\xE7\x81u\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x82Ɛڑ\xB1\x81v\x82ɕύX\x82\xB5\x82\xBD\x81B</li>
-      <li><a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xC9COM\x83|\x81[\x83g\x82̏ڍ׏\xEE\x95\xF1\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
-      <li><a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82̃X\x83s\x81[\x83h\x90ݒ\xE8\x82Ńc\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
-      <li><a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xCCOK\x83{\x83^\x83\x93\x82̕\\x8BL\x82\xF0\x90ڑ\xB1\x8F\xF3\x91ԂŐ؂\xE8\x91ւ\xA6\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
-      <li>\x8Eg\x97p\x89”\\x82\xC8COM\x83|\x81[\x83g\x82\xAA\x91\xB6\x8D݂\xB5\x82Ȃ\xA2\x8Fꍇ\x81A<a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xCCOK\x83{\x83^\x83\x93\x82\xF0\x89\x9F\x82\xB9\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
-      <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>
+      <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>\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ڑ\xB1
+        <ul>
+          <li>\x83V\x83\x8A\x83A\x83\x8B\x90ڑ\xB1\x82Ńn\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[\x90\xA7\x8C\xE4DSR/DTR\x82\xF0\x83T\x83|\x81[\x83g\x82\xB5\x82\xBD\x81B
+            <ul>
+              <li><a href="../menu/setup-serialport.html">Serial port ([Setup] \x83\x81\x83j\x83\x85\x81[)</a>\x82\xCCFlow control\x82\xC5hardware\x82\xF0RTS/CTS\x82ɕύX\x82\xB5\x81A\x90V\x82\xB5\x82\xADDSR/DTR\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
+              <li><a href="../macro/command/setflowctrl.html">setflowctrl</a>\x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82\xC5 DSR/DTR \x82\xF0\x8Ew\x92\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+            </ul></li>
+          <li>TCP/IP\x90ڑ\xB1\x92\x86\x82ɂ\xA8\x82\xA2\x82Ă\xE0<a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xF0\x8CĂяo\x82\xB9\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+          <li><a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82̃^\x83C\x83g\x83\x8B\x82\xF0\x81u\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x81v\x82\xA9\x82\xE7\x81u\x83V\x83\x8A\x83A\x83\x8B\x83|\x81[\x83g\x90ݒ\xE8\x82Ɛڑ\xB1\x81v\x82ɕύX\x82\xB5\x82\xBD\x81B</li>
+          <li><a href="../menu/setup-serialport.html#Information">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xC9COM\x83|\x81[\x83g\x82̏ڍ׏\xEE\x95\xF1\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
+          <li><a href="../menu/setup-serialport.html">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82̃X\x83s\x81[\x83h\x90ݒ\xE8\x82Ńc\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+          <li><a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xCCOK\x83{\x83^\x83\x93\x82̕\\x8BL\x82\xF0\x90ڑ\xB1\x8F\xF3\x91ԂŐ؂\xE8\x91ւ\xA6\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+          <li>\x8Eg\x97p\x89”\\x82\xC8COM\x83|\x81[\x83g\x82\xAA\x91\xB6\x8D݂\xB5\x82Ȃ\xA2\x8Fꍇ\x81A<a href="../menu/setup-serialport.html#OK">[Setup]-[Serial port]</a> \x83_\x83C\x83A\x83\x8D\x83O\x82\xCCOK\x83{\x83^\x83\x93\x82\xF0\x89\x9F\x82\xB9\x82Ȃ\xA2\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
+          <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>
+      
     </ul>
   </li>
+
   <li>\x83o\x83O\x8FC\x90\xB3
     <ul>
       <li>\x83\x8A\x83T\x83C\x83Y\x92\x86\x82̏c\x89\xA1\x83T\x83C\x83Y\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xAA\x81A\x83f\x83X\x83N\x83g\x83b\x83v\x82̍\xB6\x92[\x82Ə\xE3\x92[\x82ŕ\\x8E\xA6\x82\xB3\x82\xEA\x82Ȃ\xAD\x82Ȃ\xC1\x82Ă\xA2\x82\xBD\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B4.103\x82ł̃G\x83\x93\x83o\x83O\x81B</li>
@@ -65,6 +73,7 @@
 
   <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><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>
     </ul>
@@ -919,7 +928,7 @@
         </ul></li>
     </ul>
   </li>
-  
+
   <li>\x83o\x83O\x8FC\x90\xB3
     <ul>
       <li>\x92[\x96\x96\x83T\x83C\x83Y\x95ύX\x8E\x9E\x82ɍ\xB6\x89E\x83}\x81[\x83W\x83\x93\x83\x82\x81[\x83h(DECLRMM)\x82\xAA\x89\xF0\x8F\x9C\x82\xB3\x82\xEA\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
@@ -974,7 +983,7 @@
         </ul></li>
     </ul>
   </li>
-  
+
   <li>\x83o\x83O\x8FC\x90\xB3
     <ul>
       <li>UseNomalBGColor=on\x82̎\x9E\x81AOSC 11(\x95W\x8F\x80\x94w\x8Ci\x90F\x90ݒ\xE8)\x90\xA7\x8C䕶\x8E\x9A\x97\xF1\x82̌\xE3\x82\xCCOSC 111(\x95W\x8F\x80\x94w\x8Ci\x90F\x83\x8A\x83Z\x83b\x83g)\x90\xA7\x8C䕶\x8E\x9A\x97\xF1\x82ő\xBE\x8E\x9A\x93\x99\x82̑\xAE\x90\xAB\x95t\x82\xAB\x95\xB6\x8E\x9A\x82̔w\x8Ci\x90F\x82\xAA\x90\xB3\x82\xB5\x82\xAD\x83\x8A\x83Z\x83b\x83g\x82\xB3\x82\xEA\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
@@ -3253,11 +3262,11 @@
     </ul>
   </li>
 
-  <li>\x82\xBB\x82̑\xBC
+  <!--li>\x82\xBB\x82̑\xBC
     <ul>
       <li>OpenSSL 1.0.2t\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li>
     </ul>
-  </li>
+  </li-->
 </ul>
 
 <h3 id="ttssh_2.89">2019.06.15 (Ver 2.89)</h3>
@@ -3763,7 +3772,7 @@
       <li>SCP\x82Ńt\x83@\x83C\x83\x8B\x93]\x91\x97\x82\xAA Tera Term \x83E\x83B\x83\x93\x83h\x83E\x82̍ŏ\xAC\x89\xBB\x82Œ\x86\x92f\x82\xB3\x82\xEA\x82\xE9\x81B</li>
     </ul>
   </li>
-  
+
   <li>\x82\xBB\x82̑\xBC
     <ul>
       <li>OpenSSL 1.0.1f\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD</li>
@@ -3788,7 +3797,7 @@
       <li>SSH SCP: SCP\x83t\x83@\x83C\x83\x8B\x8E\xF3\x90M\x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82\xF0\x95ύX\x82\xB5\x82\xBD\x8DہAteraterm.ini\x82\xCC FileDir \x83G\x83\x93\x83g\x83\x8A\x82\xE0\x8DX\x90V\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
-  
+
   <li>\x82\xBB\x82̑\xBC
     <ul>
       <li>PuTTY 0.63\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD</li>
@@ -4864,12 +4873,12 @@
 
 <h3 id="ttproxy_1.0.0.26">2019.xx.xx (Ver 1.0.0.26)</h3>
 <ul class="history">
-  <li>\x95ύX
+  <!--li>\x95ύX
     <ul>
       <li></li>
     </ul>
-  </li>
-  
+  </li -->
+
   <li>\x83o\x83O\x8FC\x90\xB3
     <ul>
       <li>HTTP\x83v\x83\x8D\x83L\x83V\x90ڑ\xB1\x82\xAA\x83G\x83\x89\x81[\x82ƂȂ\xE8\x81A\x83X\x83e\x81[\x83^\x83X\x83R\x81[\x83h\x82\xAA400,401,403,405,406,407\x88ȊO\x82\xBE\x82\xC1\x82\xBD\x8Fꍇ\x81A\x83\x81\x83b\x83Z\x81[\x83W\x83{\x83b\x83N\x83X\x82ɃS\x83~\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>
@@ -4884,7 +4893,7 @@
       <li>SOCKS4/5\x82ƃl\x83S\x83V\x83G\x81[\x83V\x83\x87\x83\x93\x82\xAA\x8E\xB8\x94s\x82\xB5\x82\xBD\x8Fꍇ\x81A\x83G\x83\x89\x81[\x8F\xEE\x95\xF1\x82\xF0\x83\x81\x83b\x83Z\x81[\x83W\x82ɒlj\xC1\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
-  
+
   <li>\x83o\x83O\x8FC\x90\xB3
     <ul>
       <li>OS\x82ɂ\xE6\x82\xC1\x82Đݒ\xE8\x83_\x83C\x83A\x83\x8D\x83O\x82\xAA\x90\xB3\x82\xB5\x82\xAD\x93\xAE\x8D삵\x82Ȃ\xA2\x95s\x8B\x82\xF0\x8FC\x90\xB3\x81B<a href="#teraterm_4.103">teraterm 4.103</a>\x82ł̃G\x83\x93\x83o\x83O\x81B</li>

Modified: branches/unicode_buf/doc/ja/html/about/writer.html
===================================================================
--- branches/unicode_buf/doc/ja/html/about/writer.html	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/doc/ja/html/about/writer.html	2019-10-14 16:29:12 UTC (rev 8306)
@@ -16,7 +16,7 @@
   <li>\x8Es\x91\xBA \x8C\xF5\x8DN(Mitsuyasu Ichimura) (JG8NID) jg8ni****@gmail*****</li>
   <li><A HREF="http://hp.vector.co.jp/authors/VA013320/">\x95\xBD\x93c\x96L</A>(Yutaka Hirata) yutak****@gmail*****</li>
   <li>\x90_\x91\xBA\x8Dq(Wataru Kamimura) wkami****@gmail*****</li>
-  <li>\x89i\x93c\x90^\x96\xE7(NAGATA Shinya) maya.****@gmail*****</li>
+  <li>\x89i\x93c\x90^\x96\xE7(NAGATA Shinya)</li>
   <li>\x8A\xE2\x96{ \x8D_\x88\xEA(IWAMOTO Kouichi) sue****@iwmt*****</li>
 </ul>
 

Modified: branches/unicode_buf/doc/ja/html/menu/setup-serialport.html
===================================================================
--- branches/unicode_buf/doc/ja/html/menu/setup-serialport.html	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/doc/ja/html/menu/setup-serialport.html	2019-10-14 16:29:12 UTC (rev 8306)
@@ -58,6 +58,9 @@
 	  \x82܂\xBD Flow control \x82\xF0 Xon/Xoff \x82ɂ\xB7\x82\xE9\x82ƁAXMODEM, Quick-VAN
 	  \x82ɂ\xE6\x82\xE9\x83t\x83@\x83C\x83\x8B\x93]\x91\x97\x82͂ł\xAB\x82܂\xB9\x82\xF1\x81B
 	</p>
+	<p>
+	  \x92\x8D: \x83o\x81[\x83W\x83\x87\x83\x934.104\x88ȑO\x82\xCC"hardware"\x82\xCDRTS/CTS\x82ɊY\x93\x96\x82\xB5\x82܂\xB7\x81B
+	</p>
       </dd>
 
       <dt id="Delay">Transmit delay</dt>

Modified: branches/unicode_buf/doc/ja/html/uninstall.html
===================================================================
--- branches/unicode_buf/doc/ja/html/uninstall.html	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/doc/ja/html/uninstall.html	2019-10-14 16:29:12 UTC (rev 8306)
@@ -14,6 +14,7 @@
 
 <p>
 Tera Term \x82\xF0\x8D폜\x82\xB7\x82\xE9\x82ɂ́A\x83R\x83\x93\x83g\x83\x8D\x81[\x83\x8B\x83p\x83l\x83\x8B\x82́u\x83v\x83\x8D\x83O\x83\x89\x83\x80\x82Ƌ@\x94\\x81v\x82\xF0\x8E\xC0\x8Ds\x82\xB7\x82邩\x81ATera Term \x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82ɂ\xA0\x82\xE9 unins000.exe \x82\xF0\x8E\xC0\x8Ds\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B<br>
+\x8E\x9F\x82ɁA\x83R\x83\x93\x83g\x83\x8D\x81[\x83\x8B\x83p\x83l\x83\x8B\x82́u\x83t\x83H\x83\x93\x83g\x81v\x82\xA9\x82\xE7 "Tera Special" \x83t\x83H\x83\x93\x83g\x82\xF0\x8D폜\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B<br>
 \x82\xE0\x82\xB5\x82\xB1\x82̃A\x83\x93\x83C\x83\x93\x83X\x83g\x81[\x83\x89\x81[\x82\xAA\x93\xAE\x82\xA9\x82Ȃ\xA2\x8Fꍇ\x82́A\x8E蓮\x82ł\xE0Tera Term\x82\xF0\x83A\x83\x93\x83C\x83\x93\x83X\x83g\x81[\x83\x8B\x82\xB7\x82邱\x82Ƃ\xAA\x82ł\xAB\x82܂\xB7\x81B<br>
 </p>
 

Modified: branches/unicode_buf/teraterm/common/codeconv.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/codeconv.cpp	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/common/codeconv.cpp	2019-10-14 16:29:12 UTC (rev 8306)
@@ -930,6 +930,7 @@
 
 char *ToCharW(const wchar_t *strW)
 {
+	if (strW == NULL) return NULL;
 	char *strA = _WideCharToMultiByte(strW, 0, CP_ACP, NULL);
 	return strA;
 }
@@ -936,11 +937,13 @@
 
 char *ToCharA(const char *strA)
 {
+	if (strA == NULL) return NULL;
 	return _strdup(strA);
 }
 
 char *ToCharU8(const char *strU8)
 {
+	if (strU8 == NULL) return NULL;
 	wchar_t *strW = _MultiByteToWideChar(strU8, 0, CP_UTF8, NULL);
 	if (strW == NULL) {
 		return NULL;
@@ -952,6 +955,7 @@
 
 wchar_t *ToWcharA(const char *strA)
 {
+	if (strA == NULL) return NULL;
 	wchar_t *strW = _MultiByteToWideChar(strA, 0, CP_ACP, NULL);
 	return strW;
 }
@@ -958,11 +962,13 @@
 
 wchar_t *ToWcharW(const wchar_t *strW)
 {
+	if (strW == NULL) return NULL;
 	return _wcsdup(strW);
 }
 
 wchar_t *ToWcharU8(const char *strU8)
 {
+	if (strU8 == NULL) return NULL;
 	wchar_t *strW = _MultiByteToWideChar(strU8, 0, CP_UTF8, NULL);
 	return strW;
 }
@@ -969,6 +975,7 @@
 
 char *ToU8W(const wchar_t *strW)
 {
+	if (strW == NULL) return NULL;
 	char *strU8 = _WideCharToMultiByte(strW, 0, CP_UTF8, NULL);
 	return strU8;
 }
@@ -975,6 +982,7 @@
 
 char *ToU8A(const char *strA)
 {
+	if (strA == NULL) return NULL;
 	wchar_t *strW = _MultiByteToWideChar(strA, 0, CP_ACP, NULL);
 	if (strW == NULL) {
 		return NULL;

Modified: branches/unicode_buf/teraterm/common/compat_win.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/compat_win.cpp	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/common/compat_win.cpp	2019-10-14 16:29:12 UTC (rev 8306)
@@ -69,12 +69,12 @@
 	{ "SetWindowTextW", (void **)&pSetWindowTextW },
 	{ "ModifyMenuW", (void **)&pModifyMenuW },
 	{ "SendDlgItemMessageW", (void **)&pSendDlgItemMessageW },
-	{ NULL, NULL },
+	{},
 };
 
 static const APIInfo Lists_msimg32[] = {
 	{ "AlphaBlend", (void **)&pAlphaBlend },
-	{ NULL, NULL },
+	{},
 };
 
 static const APIInfo Lists_gdi32[] = {
@@ -82,29 +82,29 @@
 	{ "RemoveFontResourceExA", (void **)&pRemoveFontResourceExA },
 	{ "AddFontResourceExW", (void **)&pAddFontResourceExW },
 	{ "RemoveFontResourceExW", (void **)&pRemoveFontResourceExW },
-	{ NULL, NULL },
+	{},
 };
 
 static const APIInfo Lists_Shcore[] = {
 	{ "GetDpiForMonitor", (void **)&pGetDpiForMonitor },
-	{ NULL, NULL },
+	{},
 };
 
 static const APIInfo Lists_kernel32[] = {
 	{ "GetFileAttributesW", (void **)&pGetFileAttributesW },
 	{ "GetPrivateProfileStringW", (void **)&pGetPrivateProfileStringW },
-	{ NULL, NULL },
+	{},
 };
 
 static const APIInfo Lists_shell32[] = {
 	{ "DragQueryFileW", (void **)&pDragQueryFileW },
-	{ NULL, NULL },
+	{},
 };
 
 static const APIInfo Lists_comctl32[] = {
 	{ "CreatePropertySheetPageW", (void **)&pCreatePropertySheetPageW },
 	{ "PropertySheetW", (void **)&pPropertySheetW },
-	{ NULL, NULL },
+	{},
 };
 
 static const DllInfo DllInfos[] = {
@@ -115,7 +115,7 @@
 	{ _T("kernel32.dll"), DLL_LOAD_LIBRARY_SYSTEM, DLL_ACCEPT_NOT_EXIST, Lists_kernel32 },
 	{ _T("shell32.dll"), DLL_LOAD_LIBRARY_SYSTEM, DLL_ACCEPT_NOT_EXIST, Lists_shell32 },
 	{ _T("Comctl32.dll"), DLL_LOAD_LIBRARY_SYSTEM, DLL_ACCEPT_NOT_EXIST, Lists_comctl32 },
-	{ NULL, DLL_GET_MODULE_HANDLE, DLL_ACCEPT_NOT_EXIST, NULL },
+	{},
 };
 
 void WinCompatInit()

Modified: branches/unicode_buf/teraterm/common/dllutil.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/dllutil.cpp	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/common/dllutil.cpp	2019-10-14 16:29:12 UTC (rev 8306)
@@ -29,17 +29,13 @@
 #include <windows.h>
 #include <tchar.h>
 #include <assert.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
 #include <crtdbg.h>
 
 #include "dllutil.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__)
-#define	realloc(p, l) _realloc_dbg((p), (l),  _NORMAL_BLOCK, __FILE__, __LINE__)
-#endif
-
 typedef struct {
 	const TCHAR *dllName;
 	DLLLoadFlag LoadFlag;

Modified: branches/unicode_buf/teraterm/common/tipwin.cpp
===================================================================
--- branches/unicode_buf/teraterm/common/tipwin.cpp	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/common/tipwin.cpp	2019-10-14 16:29:12 UTC (rev 8306)
@@ -59,16 +59,16 @@
 #include <stdio.h>
 #include <tchar.h>
 #include <assert.h>
+#if !defined(_CRTDBG_MAP_ALLOC)
+#define _CRTDBG_MAP_ALLOC
+#endif
+#include <crtdbg.h>
 
 #include "ttlib.h"		// for GetMessageboxFont()
 
 #include "tipwin.h"
 
-#ifdef _WIN64
-        typedef LONG_PTR WINDOW_LONG_PTR;
-#else
-        typedef LONG WINDOW_LONG_PTR;
-#endif
+#define TipWinClassName _T("TeraTermTipWinClass")
 
 typedef struct tagTipWinData {
 	HFONT tip_font;
@@ -75,8 +75,6 @@
 	COLORREF tip_bg;
 	COLORREF tip_text;
 	HWND tip_wnd;
-	HWND hParentWnd;
-	int tip_enabled;
 	const TCHAR *str;
 	size_t str_len;
 	RECT str_rect;
@@ -83,7 +81,6 @@
 	RECT rect;
 	int px;
 	int py;
-	BOOL auto_destroy;
 } TipWin;
 
 VOID CTipWin::CalcStrRect(VOID)
@@ -92,7 +89,7 @@
 	SelectObject(hdc, tWin->tip_font);
 	tWin->str_rect.top = 0;
 	tWin->str_rect.left = 0;
-	DrawText(hdc, tWin->str, tWin->str_len,
+	DrawText(hdc, tWin->str, (int)tWin->str_len,
 			 &tWin->str_rect, DT_LEFT|DT_CALCRECT);
 	DeleteDC(hdc);
 }
@@ -115,7 +112,7 @@
 			return TRUE;
 
 		case WM_PAINT:
-			{
+			if(self) {
 				HBRUSH hbr;
 				HGDIOBJ holdbr;
 				RECT cr;
@@ -138,11 +135,11 @@
 
 				{
 					RECT rect = self->tWin->str_rect;
-					rect.left = rect.left + FRAME_WIDTH;
-					rect.right = rect.right + FRAME_WIDTH;
-					rect.top = rect.top + FRAME_WIDTH;
-					rect.bottom = rect.bottom + FRAME_WIDTH;
-					DrawText(hdc, self->tWin->str, self->tWin->str_len, &rect, DT_LEFT);
+					rect.left = rect.left + TIP_WIN_FRAME_WIDTH;
+					rect.right = rect.right + TIP_WIN_FRAME_WIDTH;
+					rect.top = rect.top + TIP_WIN_FRAME_WIDTH;
+					rect.bottom = rect.bottom + TIP_WIN_FRAME_WIDTH;
+					DrawText(hdc, self->tWin->str, (int)self->tWin->str_len, &rect, DT_LEFT);
 				}
 
 				SelectObject(hdc, holdbr);
@@ -154,54 +151,14 @@
 
 		case WM_NCHITTEST:
 			return HTTRANSPARENT;
-
-		case WM_DESTROY:
-			if(self->IsExists()) {
-				DeleteObject(self->tWin->tip_font);
-				self->tWin->tip_font = NULL;
+		case WM_TIMER:
+			if(self) {
+				if(self->timerid > 0)
+					KillTimer(hWnd, self->timerid);
+				self->timerid = 0;
+				self->SetVisible(FALSE);
 			}
 			break;
-
-		case WM_SETTEXT:
-			{
-				LPCTSTR str = (LPCTSTR) lParam;
-				const int str_width = self->tWin->str_rect.right - self->tWin->str_rect.left;
-				const int str_height = self->tWin->str_rect.bottom - self->tWin->str_rect.top;
-
-				free((void *)(self->tWin->str));
-				self->tWin->str_len = _tcslen(str);
-				self->tWin->str = _tcsdup(str);
-				self->CalcStrRect();
-
-				SetWindowPos(hWnd, NULL,
-							 0, 0,
-							 str_width + FRAME_WIDTH * 2, str_height + FRAME_WIDTH * 2,
-				             SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
-				InvalidateRect(hWnd, NULL, FALSE);
-
-			}
-			break;
-
-		case WM_NCDESTROY:
-			if (self->IsExists() && self->tWin->auto_destroy) {
-				free((void *)self->tWin->str);
-				free(self->tWin);
-				self->tWin = NULL;
-				delete self;
-				/*
-				 * use-after-free\x82ɂ\xE6\x82\xE8Tera Term\x82̓\xAE\x8D삪\x95s\x88\xC0\x92\xE8\x82ƂȂ\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B
-				 *
-				 * WinMain\x82\xC5 CVTWindow \x83N\x83\x89\x83X\x82̃R\x83\x93\x83X\x83g\x83\x89\x83N\x83^\x82ŁA\x83A\x83\x8D\x83P\x81[\x83g\x82\xB5\x82\xBD
-				 * TipWin\x83\x81\x83\x93\x83o\x81[\x82\xF0\x81A\x82\xB1\x82\xB1\x82̃^\x83C\x83~\x83\x93\x83O\x82ʼn\xF0\x95\xFA\x82\xB5\x82Ă\xA2\x82\xBD\x82\xBD\x82߁B
-				 * \x90\xB3\x82\xB5\x82\xAD\x82\xCD CVTWindow \x83N\x83\x89\x83X\x82̃f\x83X\x83g\x83\x89\x83N\x83^\x82ʼn\xF0\x95\xFA\x82\xB7\x82\xE9\x81B
-				 */
-			}
-			break;
-		case WM_TIMER:
-			KillTimer(hWnd, self->timerid);
-			self->timerid = NULL;
-			self->SetVisible(FALSE);
-			break;
 		default:
 			break;
 	}
@@ -209,53 +166,63 @@
 	return DefWindowProc(hWnd, nMsg, wParam, lParam);
 }
 
-CTipWin::CTipWin(HWND src)
+CTipWin::CTipWin(HINSTANCE hInstance): hInstance(hInstance)
 {
-	Create(src, 0, 0, "");
-	SetVisible(FALSE);
+	tWin = (TipWin *)malloc(sizeof(TipWin));
+	memset(tWin, 0, sizeof(TipWin));
+	*class_name = NULL;
 }
 
-CTipWin::CTipWin(HWND src, int cx, int cy, const TCHAR *str)
+CTipWin::~CTipWin()
 {
-	Create(src, cx, cy, str);
-	SetVisible(TRUE);
+	if(IsExists()) {
+		Destroy();
+	}
+	if(tWin != NULL) {
+		free((void*)tWin->str);
+		tWin->str = NULL;
+		free(tWin);
+		tWin = NULL;
+		*class_name = NULL;
+	}
 }
 
-CTipWin::~CTipWin()
+ATOM CTipWin::RegisterClass()
 {
-	Destroy();
+	WNDCLASS wc;
+	wc.style = CS_HREDRAW | CS_VREDRAW;
+	wc.lpfnWndProc = WndProc;
+	wc.cbClsExtra = 0;
+	wc.cbWndExtra = 0;
+	wc.hInstance = hInstance;
+	wc.hIcon = NULL;
+	wc.hCursor = NULL;
+	wc.hbrBackground = NULL;
+	wc.lpszMenuName = NULL;
+	wc.lpszClassName = class_name;
+	return ::RegisterClass(&wc);
 }
 
-ATOM CTipWin::tip_class;
-
-VOID CTipWin::Create(HWND src, int cx, int cy, const TCHAR *str)
+VOID CTipWin::Create(HWND pHwnd)
 {
-	const HINSTANCE hInst = (HINSTANCE)GetWindowLongPtr(src, GWLP_HINSTANCE);
 	LOGFONTA logfont;
-	const UINT uDpi = GetMonitorDpiFromWindow(src);
+	const UINT uDpi = GetMonitorDpiFromWindow(pHwnd);
 
-	if (!tip_class) {
-		WNDCLASS wc;
-		wc.style = CS_HREDRAW | CS_VREDRAW;
-		wc.lpfnWndProc = WndProc;
-		wc.cbClsExtra = 0;
-		wc.cbWndExtra = 0;
-		wc.hInstance = hInst;
-		wc.hIcon = NULL;
-		wc.hCursor = NULL;
-		wc.hbrBackground = NULL;
-		wc.lpszMenuName = NULL;
-		wc.lpszClassName = _T("TipWinClass");
-
-		tip_class = RegisterClass(&wc);
+	if(hInstance == NULL) {
+		hInstance = (HINSTANCE)GetWindowLongPtr(pHwnd, GWLP_HINSTANCE);
 	}
-
-	tWin = (TipWin *)malloc(sizeof(TipWin));
-	if (tWin == NULL) return;
-	tWin->str_len = _tcslen(str);
-	tWin->str = _tcsdup(str);
-	tWin->px = cx;
-	tWin->py = cy;
+	if (class_name[0] == 0) {
+		_snprintf_s(class_name, _countof(class_name), _TRUNCATE, _T("%s_%p"), TipWinClassName, hInstance);
+	}
+	RegisterClass();
+	if (tWin == NULL) {
+		return;
+	}
+	tWin->str_len = 0;
+	tWin->str = (TCHAR*)malloc(sizeof(TCHAR));
+	memset((void*)tWin->str, 0, sizeof(TCHAR));
+	tWin->px = 0;
+	tWin->py = 0;
 	tWin->tip_bg = GetSysColor(COLOR_INFOBK);
 	tWin->tip_text = GetSysColor(COLOR_INFOTEXT);
 	GetMessageboxFont(&logfont);
@@ -262,44 +229,34 @@
 	logfont.lfWidth = MulDiv(logfont.lfWidth, uDpi, 96);
 	logfont.lfHeight = MulDiv(logfont.lfHeight, uDpi, 96);
 	tWin->tip_font = CreateFontIndirect(&logfont);
-	CalcStrRect();
-
-	const int str_width = tWin->str_rect.right - tWin->str_rect.left;
-	const int str_height = tWin->str_rect.bottom - tWin->str_rect.top;
-
-	/*
-	 * RegisterClass()\x82\xAA\x8E\xB8\x94s\x82\xB5\x82\xBD\x8Fꍇ\x82́ACreateWindowEx()\x82\xAA 87 (ERROR_INVALID_PARAMETER)\x82\xC5
-	 * \x83G\x83\x89\x81[\x82ƂȂ邽\x82߁A\x8CĂяo\x82\xB3\x82Ȃ\xA2\x82悤\x82ɂ\xB7\x82\xE9\x81B
-	 *
-	 * WindowsMe(9x)\x82ł́ASSH\x94F\x8F؃_\x83C\x83A\x83\x8D\x83O\x82̃c\x81[\x83\x8B\x83`\x83b\x83v\x95\\x8E\xA6\x82\xC5 RegisterClass() \x82\xAA
-	 * \x8E\xB8\x94s\x82\xB7\x82\xE9\x81B\x8C\xB4\x88\xF6\x95s\x96\xBE\x81B
-	 */
-	tWin->tip_wnd = NULL;
-	if (tip_class) {
-		tWin->tip_wnd =
-			CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
-						   MAKEINTRESOURCE(tip_class),
-						   str, WS_POPUP,
-						   cx, cy,
-						   str_width + FRAME_WIDTH * 2, str_height + FRAME_WIDTH * 2,
-						   src, NULL, hInst, this);
-	}
-
-	tWin->hParentWnd = src;
-	tWin->auto_destroy = TRUE;
-
-	pts.x = cx;
-	pts.y = cy;
-	timerid = NULL;
+	tWin->tip_wnd =
+		CreateWindowEx(WS_EX_TOOLWINDOW | WS_EX_TOPMOST,
+					   class_name,
+					   NULL, WS_POPUP,
+					   0, 0,
+					   0, 0,
+					   pHwnd, NULL, hInstance, this);
+	timerid = 0;
 }
 
-VOID CTipWin::GetTextWidthHeight(HWND src, const TCHAR *str, int *width, int *height)
+VOID CTipWin::Destroy()
 {
-	TipWinGetTextWidthHeight(src, str, width, height);
+	if(IsExists()) {
+		// \x83t\x83H\x83\x93\x83g\x82̔j\x8A\xFC
+		DeleteObject(tWin->tip_font);
+		tWin->tip_font = NULL;
+		// \x83E\x83B\x83\x93\x83h\x83E\x82̔j\x8A\xFC
+		SetWindowLongPtr(tWin->tip_wnd, GWLP_USERDATA, NULL);
+		DestroyWindow(tWin->tip_wnd);
+		tWin->tip_wnd = NULL;
+	}
 }
 
 POINT CTipWin::GetPos(void)
 {
+	POINT pts;
+	pts.x = tWin->px;
+	pts.y = tWin->py;
 	return pts;
 }
 
@@ -306,27 +263,34 @@
 VOID CTipWin::SetPos(int x, int y)
 {
 	if(IsExists()) {
-		pts.x = x;
-		pts.y = y;
+		tWin->px = x;
+		tWin->py = y;
 		SetWindowPos(tWin->tip_wnd, 0, x, y, 0, 0, SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE);
-
 	}
 }
 
-VOID CTipWin::SetText(const char *str)
+VOID CTipWin::SetText(const TCHAR *str)
 {
-	if(IsExists()) {
-		SetWindowText(tWin->tip_wnd, str);
-		// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82̃e\x83L\x83X\x83g\x82ƃE\x83B\x83\x93\x83h\x83E\x82̕`\x89揇\x82̊֌W\x82Ńe\x83L\x83X\x83g\x82\xF02\x93x\x95`\x89悵\x82ăc\x81[\x83\x8B\x83`\x83b\x83v\x83E\x83B\x83\x93\x83h\x83E\x82\xF0\x83\x8A\x83T\x83C\x83Y\x82\xB7\x82\xE9
-		SetWindowText(tWin->tip_wnd, str);
+	if(!IsExists()) {
+		return;
 	}
-}
 
-VOID CTipWin::Destroy(void)
-{
-	if(IsExists()) {
-		DestroyWindow(tWin->tip_wnd);
-	}
+	TipWin* self = tWin;
+	self->str_len = _tcslen(str);
+	self->str = _tcsdup(str);
+	CalcStrRect();
+
+	// \x83E\x83B\x83\x93\x83h\x83E\x82̃T\x83C\x83Y\x82͕\xB6\x8E\x9A\x83T\x83C\x83Y+\x8D\xB6\x89E(\x8F㉺)\x82̃t\x83\x8C\x81[\x83\x80
+	const int str_width = self->str_rect.right - self->str_rect.left;
+	const int str_height = self->str_rect.bottom - self->str_rect.top;
+	const int win_width = str_width + TIP_WIN_FRAME_WIDTH * 2;
+	const int win_height = str_height + TIP_WIN_FRAME_WIDTH * 2;
+	SetWindowPos(tWin->tip_wnd, NULL,
+				 0, 0, win_width, win_height,
+				 SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);
+
+	// WM_PAINT\x82ŕ`\x89悷\x82\xE9
+	InvalidateRect(tWin->tip_wnd, NULL, FALSE);
 }
 
 VOID CTipWin::SetHideTimer(int ms)
@@ -339,7 +303,11 @@
 
 BOOL CTipWin::IsExists(void)
 {
-	return (tWin != NULL);
+	if(tWin == NULL)
+		return FALSE;
+	if(tWin->tip_wnd == NULL)
+		return FALSE;
+	return TRUE;
 }
 
 VOID CTipWin::SetVisible(BOOL bVisible)
@@ -362,12 +330,23 @@
 	return FALSE;
 }
 
-TipWin* TipWinCreate(HWND src)
+TipWin *TipWinCreate(HINSTANCE hInstance, HWND src)
 {
-	CTipWin* tipwin = new CTipWin(src, 0, 0, "");
+	CTipWin* tipwin = new CTipWin(hInstance);
+	tipwin->Create(src);
 	return (TipWin*)tipwin;
 }
 
+TipWin *TipWinCreateA(HINSTANCE hInstance, HWND src, int cx, int cy, const char *str)
+{
+	CTipWin* tipwin = new CTipWin(hInstance);
+	tipwin->Create(src);
+	tipwin->SetText(str);
+	tipwin->SetPos(cx, cy);
+	tipwin->SetVisible(TRUE);
+	return (TipWin*)tipwin;
+}
+
 /*
  * \x95\xB6\x8E\x9A\x97\xF1\x82\xF0\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82ɕ`\x89悵\x82\xBD\x8E\x9E\x82̉\xA1\x82Əc\x82̃T\x83C\x83Y\x82\xF0\x8E擾\x82\xB7\x82\xE9\x81B
  *
@@ -389,7 +368,7 @@
 
 	/* \x95\xB6\x8E\x9A\x97\xF1\x82̒\xB7\x82\xB3\x82\xF0\x8Cv\x8EZ\x82\xB7\x82\xE9 */
 	str_len = _tcslen(str);
-	
+
 	/* DPI\x82\xF0\x8E擾\x82\xB7\x82\xE9 */
 	uDpi = GetMonitorDpiFromWindow(src);
 
@@ -404,7 +383,7 @@
 	SelectObject(hdc, tip_font);
 	str_rect.top = 0;
 	str_rect.left = 0;
-	DrawText(hdc, str, str_len, &str_rect, DT_LEFT|DT_CALCRECT);
+	DrawText(hdc, str, (int)str_len, &str_rect, DT_LEFT|DT_CALCRECT);
 	*width = str_rect.right - str_rect.left;
 	*height = str_rect.bottom - str_rect.top;
 	DeleteDC(hdc);
@@ -427,7 +406,7 @@
 	tipwin->SetPos(x, y);
 }
 
-void TipWinSetText(TipWin* tWin, const char *str)
+void TipWinSetTextA(TipWin* tWin, const char *str)
 {
 	CTipWin* tipwin = (CTipWin*) tWin;
 	tipwin->SetText(str);
@@ -448,7 +427,8 @@
 void TipWinDestroy(TipWin* tWin)
 {
 	CTipWin* tipwin = (CTipWin*) tWin;
-	tipwin->Destroy();
+	delete(tipwin);
+	tipwin = NULL;
 }
 
 int TipWinIsExists(TipWin *tWin)

Modified: branches/unicode_buf/teraterm/common/tipwin.h
===================================================================
--- branches/unicode_buf/teraterm/common/tipwin.h	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/common/tipwin.h	2019-10-14 16:29:12 UTC (rev 8306)
@@ -35,12 +35,14 @@
 extern "C" {
 #endif
 
-#define	FRAME_WIDTH	6
+#define	TIP_WIN_FRAME_WIDTH	6
 
 typedef struct tagTipWinData TipWin;
 
-TipWin *TipWinCreate(HWND src);
-void TipWinSetText(TipWin *tWin, const char *text);
+TipWin *TipWinCreate(HINSTANCE hInstance, HWND src);
+TipWin *TipWinCreateA(HINSTANCE hInstance, HWND src, int cx, int cy, const char *str);
+TipWin *TipWinCreateW(HINSTANCE hInstance, HWND src, int cx, int cy, const wchar_t *str);
+void TipWinSetTextA(TipWin *tWin, const char *text);
 void TipWinSetTextW(TipWin *tWin, const wchar_t *text);
 void TipWinDestroy(TipWin *tWin);
 void TipWinGetTextWidthHeight(HWND src, const TCHAR *str, int *width, int *height);
@@ -51,6 +53,14 @@
 int TipWinIsExists(TipWin *tWin);
 int TipWinIsVisible(TipWin *tWin);
 
+#if !defined(_UNICODE)
+#define	TipWinCreateT(p1, p2, p3, p4, p5)	TipWinCreateA(p1, p2, p3, p4, p5)
+#define TipWinSetText(p1, p2)				TipWinSetTextA(p1, p2)
+#else
+#define	TipWinCreateT(p1, p2, p3, p4, p5)	TipWinCreateW(p1, p2, p3, p4, p5)
+#define TipWinSetText(p1, p2)				TipWinSetTextW(p1, p2)
+#endif
+
 #ifdef __cplusplus
 }
 #endif
@@ -59,26 +69,28 @@
 class CTipWin
 {
 public:
-	CTipWin(HWND hWnd, int x, int y, const TCHAR *str);
-	CTipWin(HWND hWnd);
-	~CTipWin(VOID);
+	CTipWin(HINSTANCE hInstance);
+	~CTipWin();
+	VOID Create(HWND pHwnd);
+	VOID Destroy();
 	VOID SetText(const char *str);
-	VOID Destroy(VOID);
-	VOID GetTextWidthHeight(HWND src, const TCHAR *str, int *width, int *height);
-	POINT GetPos(VOID);
+	VOID SetText(const wchar_t *str);
+	POINT GetPos();
 	VOID SetPos(int x, int y);
 	VOID SetHideTimer(int ms);
-	VOID Create(HWND src, int x, int y, const TCHAR *str);
-	BOOL IsExists(VOID);
+	BOOL IsExists();
 	VOID SetVisible(BOOL bVisible);
 	BOOL IsVisible();
 private:
-	POINT pts;
-	UINT timerid;
+	UINT_PTR timerid;
 	TipWin* tWin;
-	static ATOM tip_class;
+	HINSTANCE hInstance;
+	TCHAR class_name[32];
 	static LRESULT CALLBACK WndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam);
-	VOID CalcStrRect(VOID);
+	VOID CalcStrRect();
+	ATOM RegisterClass();
+	BOOL UnregisterClass();
+	BOOL IsClassRegistered();
 };
 #endif
 #endif

Modified: branches/unicode_buf/teraterm/teraterm/addsetting.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/addsetting.cpp	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/teraterm/addsetting.cpp	2019-10-14 16:29:12 UTC (rev 8306)
@@ -635,7 +635,7 @@
 				  L"Visual", ts.UILanguageFile);
 	m_psp.pszTitle = _wcsdup(UIMsg);
 	m_psp.dwFlags |= (PSP_USETITLE | PSP_HASHELP);
-	TipWin = new CTipWin(m_hWnd);
+	TipWin = new CTipWin(inst);
 }
 
 CVisualPropPageDlg::~CVisualPropPageDlg()
@@ -642,6 +642,8 @@
 {
 	free((void *)m_psp.pszTitle);
 	TipWin->Destroy();
+	delete TipWin;
+	TipWin = NULL;
 }
 
 // CVisualPropPageDlg \x83\x81\x83b\x83Z\x81[\x83W \x83n\x83\x93\x83h\x83\x89
@@ -700,7 +702,11 @@
 	SendDlgItemMessage(IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, TBM_SETRANGE, TRUE, MAKELPARAM(0, 255));
 	SendDlgItemMessage(IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, TBM_SETPOS, TRUE, ts.AlphaBlendInactive);
 
-	TipWin->SetVisible(FALSE);
+	BOOL isLayeredWindowSupported = (pSetLayeredWindowAttributes != NULL);
+	EnableDlgItem(IDC_ALPHA_BLEND_ACTIVE, isLayeredWindowSupported);
+	EnableDlgItem(IDC_ALPHA_BLEND_ACTIVE_TRACKBAR, isLayeredWindowSupported);
+	EnableDlgItem(IDC_ALPHA_BLEND_INACTIVE, isLayeredWindowSupported);
+	EnableDlgItem(IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, isLayeredWindowSupported);
 
 	// (2)[BG] BGEnable
 	SetCheck(IDC_ETERM_LOOKFEEL, ts.EtermLookfeel.BGEnable);
@@ -809,6 +815,9 @@
 
 	// \x83_\x83C\x83A\x83\x8D\x83O\x82Ƀt\x83H\x81[\x83J\x83X\x82𓖂Ă\xE9
 	::SetFocus(GetDlgItem(IDC_ALPHA_BLEND_ACTIVE));
+
+	// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x8D쐬
+	TipWin->Create(m_hWnd);
 }
 
 void CVisualPropPageDlg::OnHScroll(UINT nSBCode, UINT nPos, HWND pScrollBar)
@@ -1036,7 +1045,7 @@
 				TCHAR uimsg[MAX_UIMSG];
 				RECT rc;
 				get_lang_msg("TOOLTIP_TITLEBAR_OPACITY", uimsg, sizeof(uimsg), "Opacity %.1f %%", ts.UILanguageFile);
-				_stprintf_s(tipbuf, _countof(tipbuf), _T(uimsg), (pos / 255.0) * 100);
+				_stprintf_s(tipbuf, _countof(tipbuf), uimsg, (pos / 255.0) * 100);
 
 				::GetWindowRect(GetDlgItem(IDC_ALPHA_BLEND_ACTIVE), &rc);
 				TipWin->SetText(tipbuf);
@@ -1064,7 +1073,7 @@
 				TCHAR tipbuf[32], uimsg[MAX_UIMSG];
 				RECT rc;
 				get_lang_msg("TOOLTIP_TITLEBAR_OPACITY", uimsg, sizeof(uimsg), "Opacity %.1f %%", ts.UILanguageFile);
-				_stprintf_s(tipbuf, _countof(tipbuf), _T(uimsg), (pos / 255.0) * 100);
+				_stprintf_s(tipbuf, _countof(tipbuf), uimsg, (pos / 255.0) * 100);
 
 				::GetWindowRect(GetDlgItem(IDC_ALPHA_BLEND_INACTIVE), &rc);
 				TipWin->SetText(tipbuf);

Modified: branches/unicode_buf/teraterm/teraterm/commlib.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/commlib.c	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/teraterm/commlib.c	2019-10-14 16:29:12 UTC (rev 8306)
@@ -1120,7 +1120,7 @@
 
 		case IdFile:
 			if (! PWriteFile(cv->ComID, &(cv->OutBuff[cv->OutPtr]), C, (LPDWORD)&D, NULL)) {
-				if (! GetLastError() == ERROR_IO_PENDING) {
+				if (! (GetLastError() == ERROR_IO_PENDING)) {
 					D = C; /* ignore data */
 				}
 			}

Modified: branches/unicode_buf/teraterm/teraterm/sizetip.c
===================================================================
--- branches/unicode_buf/teraterm/teraterm/sizetip.c	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/teraterm/sizetip.c	2019-10-14 16:29:12 UTC (rev 8306)
@@ -137,16 +137,14 @@
 		GetWindowRect(src, &wr);
 
 		// sizetip\x82\xF0\x8Fo\x82\xB7\x88ʒu\x82́A\x83E\x83B\x83\x93\x83h\x83E\x8D\xB6\x8F\xE3(X, Y)\x82ɑ΂\xB5\x82āA
-		// (X, Y - \x95\xB6\x8E\x9A\x97\xF1\x82̍\x82\x82\xB3 - FRAME_WIDTH * 2) \x82Ƃ\xB7\x82\xE9\x81B
+		// (X, Y - \x95\xB6\x8E\x9A\x97\xF1\x82̍\x82\x82\xB3 - TIP_WIN_FRAME_WIDTH * 2) \x82Ƃ\xB7\x82\xE9\x81B
 		point.x = wr.left;
-		point.y = wr.top - (h + FRAME_WIDTH * 2);
+		point.y = wr.top - (h + TIP_WIN_FRAME_WIDTH * 2);
 		FixPosFromFrame(&point, 16, FALSE);
 		cx = point.x;
 		cy = point.y;
 
-		SizeTip = TipWinCreate(src);
-		TipWinSetPos(SizeTip, cx, cy);
-		TipWinSetText(SizeTip, str);
+		SizeTip = TipWinCreateT(NULL, src, cx, cy, str);
 
 		//OutputDebugPrintf("Created: (%d,%d)\n", cx, cy);
 
@@ -159,7 +157,7 @@
 
 		// \x83E\x83B\x83\x93\x83h\x83E\x82̍\xB6\x8Fオ\x88ړ\xAE\x82\xB7\x82\xE9\x8Fꍇ
 		if (tooltip_movable) {
-			TipWinSetPos(SizeTip, newX + FRAME_WIDTH*2, newY + FRAME_WIDTH*2);
+			TipWinSetPos(SizeTip, newX + TIP_WIN_FRAME_WIDTH*2, newY + TIP_WIN_FRAME_WIDTH*2);
 			//OutputDebugPrintf("Moved: (%d,%d)\n", newX, newY);
 		}
 	}

Modified: branches/unicode_buf/teraterm/teraterm/tekwin.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/tekwin.cpp	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/teraterm/tekwin.cpp	2019-10-14 16:29:12 UTC (rev 8306)
@@ -636,7 +636,7 @@
 
 LRESULT CTEKWindow::OnDlgHelp(WPARAM wParam, LPARAM lParam)
 {
-	DWORD help_id = (wParam == 0) ? HelpId : wParam;
+	DWORD help_id = (wParam == 0) ? HelpId : (DWORD)wParam;
 	OpenHelp(HH_HELP_CONTEXT, HelpId, ts.UILanguageFile);
 	return 0;
 }
@@ -783,7 +783,7 @@
 		// HELPMSGSTRING message \x8E\x9E
 		//		wp = dialog handle
 		//		lp = initialization structure
-		OnDlgHelp(wp, lp);
+		OnDlgHelp(HelpId, 0);
 		return 0;
 	}
 	switch(msg)

Modified: branches/unicode_buf/teraterm/teraterm/ttsetup.h
===================================================================
--- branches/unicode_buf/teraterm/teraterm/ttsetup.h	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/teraterm/ttsetup.h	2019-10-14 16:29:12 UTC (rev 8306)
@@ -27,6 +27,8 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#pragma once
+
 #include "ttlib.h"
 
 /* TERATERM.EXE, TTSET interface */
@@ -64,8 +66,8 @@
 BOOL LoadTTSET();
 void FreeTTSET();
 
-int PASCAL SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen);
-
 #ifdef __cplusplus
 }
 #endif
+
+#include "../ttpset/ttset.h"

Modified: branches/unicode_buf/teraterm/teraterm/vtwin.cpp
===================================================================
--- branches/unicode_buf/teraterm/teraterm/vtwin.cpp	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/teraterm/vtwin.cpp	2019-10-14 16:29:12 UTC (rev 8306)
@@ -817,11 +817,22 @@
 #endif
 
 	// TipWin
-	TipWin = new CTipWin(HVTWin);
+	TipWin = new CTipWin(hInstance);
+	TipWin->Create(HVTWin);
 }
 
 /////////////////////////////////////////////////////////////////////////////
+// CVTWindow destructor
 
+CVTWindow::~CVTWindow()
+{
+	TipWin->Destroy();
+	delete TipWin;
+	TipWin = NULL;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+
 int CVTWindow::Parse()
 {
 	// added ScrollLock (2006.11.14 yutaka)
@@ -2324,12 +2335,13 @@
 {
 	wchar_t *buf = BuffGetCharInfo(client_x, client_y);
 	if (TipWinCodeDebug == NULL) {
-		TipWinCodeDebug = TipWinCreate(m_hWnd);
+		TipWinCodeDebug = TipWinCreate(m_hInst, m_hWnd);
 	}
 	POINT pos = { client_x, client_y };
 	ClientToScreen(m_hWnd, &pos);
 	TipWinSetPos(TipWinCodeDebug, pos.x, pos.y);
 	TipWinSetTextW(TipWinCodeDebug, buf);
+	TipWinSetVisible(TipWinCodeDebug, TRUE);
 	free(buf);
 }
 
@@ -2414,7 +2426,7 @@
 			SetWindowAlpha(newAlpha);
 
 			get_lang_msg("TOOLTIP_TITLEBAR_OPACITY", uimsg, sizeof(uimsg), "Opacity %.1f %%", ts.UILanguageFile);
-			_stprintf_s(tipbuf, _countof(tipbuf), _T(uimsg), (newAlpha / 255.0) * 100);
+			_stprintf_s(tipbuf, _countof(tipbuf), uimsg, (newAlpha / 255.0) * 100);
 
 			tippos = TipWin->GetPos();
 			if (tippos.x != pt.x ||
@@ -3633,7 +3645,7 @@
 
 LRESULT CVTWindow::OnDlgHelp(WPARAM wParam, LPARAM lParam)
 {
-	DWORD help_id = (wParam == 0) ? HelpId : wParam;
+	DWORD help_id = (wParam == 0) ? HelpId : (DWORD)wParam;
 	OpenHelp(HH_HELP_CONTEXT, help_id, ts.UILanguageFile);
 	return 0;
 }
@@ -6273,7 +6285,7 @@
 		// HELPMSGSTRING message \x8E\x9E
 		//		wp = dialog handle
 		//		lp = initialization structure
-		OnDlgHelp(0, 0);
+		OnDlgHelp(HelpId, 0);
 		return 0;
 	}
 	switch(msg)

Modified: branches/unicode_buf/teraterm/teraterm/vtwin.h
===================================================================
--- branches/unicode_buf/teraterm/teraterm/vtwin.h	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/teraterm/vtwin.h	2019-10-14 16:29:12 UTC (rev 8306)
@@ -80,6 +80,7 @@
 
 public:
 	CVTWindow(HINSTANCE hInstance);
+	~CVTWindow();
 	int Parse();
 	void ButtonUp(BOOL Paste);
 	void ButtonDown(POINT p, int LMR);

Modified: branches/unicode_buf/teraterm/ttpdlg/ttdlg.c
===================================================================
--- branches/unicode_buf/teraterm/ttpdlg/ttdlg.c	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/ttpdlg/ttdlg.c	2019-10-14 16:29:12 UTC (rev 8306)
@@ -51,6 +51,7 @@
 #include "tipwin.h"
 #include "comportinfo.h"
 #include "codeconv.h"
+#include "helpid.h"
 
 // Oniguruma: Regular expression library
 #define ONIG_EXTERN extern
@@ -286,9 +287,9 @@
 			return TRUE;
 
 		case WM_COMMAND:
+			ts = (PTTSet)GetWindowLongPtr(Dialog,DWLP_USER);
 			switch (LOWORD(wParam)) {
 				case IDOK:
-					ts = (PTTSet)GetWindowLongPtr(Dialog,DWLP_USER);
 
 					if ( ts!=NULL ) {
 						int width, height;
@@ -426,9 +427,31 @@
 					}
 					break;
 
-				case IDC_TERMHELP:
-					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+				case IDC_TERMHELP: {
+					WPARAM HelpId;
+					switch (ts->Language) {
+					case IdJapanese:
+						HelpId = HlpSetupTerminalJa;
+						break;
+					case IdEnglish:
+						HelpId = HlpSetupTerminalEn;
+						break;
+					case IdKorean:
+						HelpId = HlpSetupTerminalKo;
+						break;
+					case IdRussian:
+						HelpId = HlpSetupTerminalRu;
+						break;
+					case IdUtf8:
+						HelpId = HlpSetupTerminalUtf8;
+						break;
+					default:
+						HelpId = HlpSetupTerminal;
+						break;
+					}
+					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HelpId,0);
 					break;
+				}
 			}
 	}
 	return FALSE;
@@ -946,9 +969,11 @@
 					}
 					break;
 
-				case IDC_WINHELP:
-					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+				case IDC_WINHELP: {
+					const WPARAM HelpId = ts->VTFlag > 0 ? HlpSetupWindow : HlpTEKSetupWindow;
+					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HelpId,0);
 					break;
+				}
 			}
 			break;
 
@@ -1082,9 +1107,9 @@
 			return TRUE;
 
 		case WM_COMMAND:
+			ts = (PTTSet)GetWindowLongPtr(Dialog,DWLP_USER);
 			switch (LOWORD(wParam)) {
 				case IDOK:
-					ts = (PTTSet)GetWindowLongPtr(Dialog,DWLP_USER);
 					if ( ts!=NULL ) {
 						WORD w;
 
@@ -1109,8 +1134,17 @@
 					EndDialog(Dialog, 0);
 					return TRUE;
 
-				case IDC_KEYBHELP:
-					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+				case IDC_KEYBHELP: {
+					WPARAM HelpId;
+					if (ts->Language==IdRussian) {
+						HelpId = HlpSetupKeyboardRuss;
+					}
+					else {
+						HelpId = HlpSetupKeyboard;
+					}
+					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HelpId,0);
+					break;
+				}
 			}
 	}
 	return FALSE;
@@ -1267,11 +1301,11 @@
 			TipWinGetTextWidthHeight(hWnd, str, &w, &h);
 
 			cx = pt.x;
-			cy = pt.y - (h + FRAME_WIDTH * 6);
+			cy = pt.y - (h + TIP_WIN_FRAME_WIDTH * 6);
 
 			// \x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xF0\x95\\x8E\xA6\x82\xB7\x82\xE9
 			if (g_SerialDlgSpeedTip == NULL) {
-				g_SerialDlgSpeedTip = TipWinCreate(hWnd);
+				g_SerialDlgSpeedTip = TipWinCreate(hInst, hWnd);
 				TipWinSetHideTimer(g_SerialDlgSpeedTip, tooltip_timeout);
 			}
 			if (!TipWinIsVisible(g_SerialDlgSpeedTip))
@@ -1517,7 +1551,7 @@
 					return TRUE;
 
 				case IDC_SERIALHELP:
-					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HlpSetupSerialPort,0);
 					return TRUE;
 
 				case IDC_SERIALPORT:
@@ -1774,7 +1808,7 @@
 					break;
 
 				case IDC_TCPIPHELP:
-					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HlpSetupTCPIP,0);
 					break;
 			}
 	}
@@ -2005,7 +2039,8 @@
 					break;
 
 				case IDC_HOSTHELP:
-					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HlpFileNewConnection,0);
+					break;
 			}
 	}
 	return FALSE;
@@ -2161,7 +2196,8 @@
 					return TRUE;
 
 				case IDC_DIRHELP:
-					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HlpFileChangeDir,0);
+					break;
 			}
 	}
 	return FALSE;
@@ -2970,7 +3006,8 @@
 					return TRUE;
 
 				case IDC_GENHELP:
-					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HlpSetupGeneral,0);
+					break;
 			}
 			break;
 
@@ -3056,7 +3093,8 @@
 					break;
 
 				case IDC_WINLISTHELP:
-					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,0,0);
+					PostMessage(GetParent(Dialog),WM_USER_DLGHELP2,HlpWindowWindow,0);
+					break;
 			}
 	}
 	return FALSE;

Modified: branches/unicode_buf/teraterm/ttpfile/ttfile.c
===================================================================
--- branches/unicode_buf/teraterm/ttpfile/ttfile.c	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/ttpfile/ttfile.c	2019-10-14 16:29:12 UTC (rev 8306)
@@ -882,8 +882,10 @@
 			}
 			return TRUE;
 		case IDC_GETFNHELP:
-			if (fv!=NULL)
-			PostMessage(fv->HMainWin,WM_USER_DLGHELP2,0,0);
+			if (fv!=NULL) {
+				// \x8CĂяo\x82\xB5\x8C\xB3\x82\xAA\x83w\x83\x8B\x83vID\x82\xF0\x8F\x80\x94\x{142DC2}\xE9
+				PostMessage(fv->HMainWin,WM_USER_DLGHELP2,0,0);
+			}
 			break;
 		}
 	}

Modified: branches/unicode_buf/teraterm/ttpset/ttpset.def
===================================================================
--- branches/unicode_buf/teraterm/ttpset/ttpset.def	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/ttpset/ttpset.def	2019-10-14 16:29:12 UTC (rev 8306)
@@ -7,4 +7,3 @@
   ParseParam @6
   CopySerialList @7
   AddValueToList @8
-  SerialPortConfconvertId2Str @9

Modified: branches/unicode_buf/teraterm/ttpset/ttset.c
===================================================================
--- branches/unicode_buf/teraterm/ttpset/ttset.c	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/teraterm/ttpset/ttset.c	2019-10-14 16:29:12 UTC (rev 8306)
@@ -44,6 +44,9 @@
 
 #include "compat_w95.h"
 
+#define DllExport __declspec(dllexport)
+#include "ttset.h"
+
 #ifndef CLEARTYPE_QUALITY
 #define CLEARTYPE_QUALITY 5
 #endif
@@ -111,7 +114,7 @@
  *    TRUE: \x95ϊ\xB7\x90\xAC\x8C\xF7
  *    FALSE: \x95ϊ\xB7\x8E\xB8\x94s
  */
-int PASCAL SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen)
+int WINAPI SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen)
 {
 	id_str_pair_t *conf;
 	int ret = FALSE;

Added: branches/unicode_buf/teraterm/ttpset/ttset.h
===================================================================
--- branches/unicode_buf/teraterm/ttpset/ttset.h	                        (rev 0)
+++ branches/unicode_buf/teraterm/ttpset/ttset.h	2019-10-14 16:29:12 UTC (rev 8306)
@@ -0,0 +1,15 @@
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if !defined(DllExport)
+#define DllExport __declspec(dllimport)
+#endif
+
+DllExport int WINAPI SerialPortConfconvertId2Str(enum serial_port_conf type, WORD id, PCHAR str, int strlen);
+
+#ifdef __cplusplus
+}
+#endif

Modified: branches/unicode_buf/ttssh2/ttxssh/auth.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/auth.c	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/ttssh2/ttxssh/auth.c	2019-10-14 16:29:12 UTC (rev 8306)
@@ -122,9 +122,7 @@
 					_tcscat_s(uimsg, _countof(uimsg), pvar->ts->UIMsg);
 				}
 				GetWindowRect(control, &rect);
-				data->tipwin = TipWinCreate(control);
-				TipWinSetPos(data->tipwin, rect.left, rect.bottom);
-				TipWinSetText(data->tipwin, uimsg);
+				data->tipwin = TipWinCreateT(hInst, control, rect.left, rect.bottom, uimsg);
 			}
 
 			return 0;

Modified: branches/unicode_buf/ttssh2/ttxssh/ttxssh.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/ttxssh.c	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/ttssh2/ttxssh/ttxssh.c	2019-10-14 16:29:12 UTC (rev 8306)
@@ -1634,7 +1634,7 @@
 			break;
 
 		case IDC_HOSTHELP:
-			PostMessage(GetParent(dlg), WM_USER_DLGHELP2, 0, 0);
+			PostMessage(GetParent(dlg), WM_USER_DLGHELP2, HlpFileNewConnection, 0);
 		}
 	}
 	return FALSE;

Modified: branches/unicode_buf/ttssh2/ttxssh/util.c
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/util.c	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/ttssh2/ttxssh/util.c	2019-10-14 16:29:12 UTC (rev 8306)
@@ -314,7 +314,7 @@
 	return buf->buflen / 2 < buf->datalen;
 }
 
-void UTIL_get_lang_msg(PCHAR key, PTInstVar pvar, PCHAR def)
+void UTIL_get_lang_msg(const char *key, PTInstVar pvar, const char *def)
 {
 	GetI18nStr("TTSSH", key, pvar->ts->UIMsg, sizeof(pvar->ts->UIMsg),
 		def, pvar->ts->UILanguageFile);

Modified: branches/unicode_buf/ttssh2/ttxssh/util.h
===================================================================
--- branches/unicode_buf/ttssh2/ttxssh/util.h	2019-10-14 16:13:43 UTC (rev 8305)
+++ branches/unicode_buf/ttssh2/ttxssh/util.h	2019-10-14 16:29:12 UTC (rev 8306)
@@ -84,7 +84,7 @@
 void UTIL_destroy_sock_write_buf(UTILSockWriteBuf *buf);
 BOOL UTIL_is_sock_deeply_buffered(UTILSockWriteBuf *buf);
 
-void UTIL_get_lang_msg(PCHAR key, PTInstVar pvar, PCHAR def);
+void UTIL_get_lang_msg(const char *key, PTInstVar pvar, const char *def);
 HFONT UTIL_get_lang_fixedfont(HWND hWnd, const char *UILanguageFile);
 
 #endif


Ttssh2-commit メーリングリストの案内
Back to archive index