[Ttssh2-commit] [6475] ZMODEM ヘッダパケットで、エスケープされた 0x7f , 0xff をデコードするようにした。

svnno****@sourc***** svnno****@sourc*****
2016年 8月 23日 (火) 12:15:33 JST


Revision: 6475
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6475
Author:   doda
Date:     2016-08-23 12:15:32 +0900 (Tue, 23 Aug 2016)
Log Message:
-----------
ZMODEM ヘッダパケットで、エスケープされた 0x7f, 0xff をデコードするようにした。
ヘッダバケットに 0x7f, 0xff が含まれる状況が思いつかないので、テストは未実施。

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/teraterm/ttpfile/zmodem.c

-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2016-08-22 12:26:59 UTC (rev 6474)
+++ trunk/doc/en/html/about/history.html	2016-08-23 03:15:32 UTC (rev 6475)
@@ -57,6 +57,7 @@
       <li>When the clipboard is read from remote host, unnecessary NUL character is added at the end of the string.</li>
       <li>When the clipboard is written from remote host, empty string can not be set.</li>
       <li>When the clipboard is empty string and <a href="../usage/tips/vim.html#Bracketed">Bracketed Paste Mode</a> is enabled, final Bracket is only sent by pasting.</li>
+      <!-- li>ZMODEM \x8E\xF3\x90M\x82ŁAZMODEM \x83w\x83b\x83_\x83p\x83P\x83b\x83g\x82Ɋ܂܂\xEA\x82\xE9\x83G\x83X\x83P\x81[\x83v\x82\xB3\x82ꂽ 0x7f, 0xff \x82𕜌\xB3\x82\xB5\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li -->
       <li>MACRO: When invalid regular expression is specified at the <a href="../macro/command/strreplace.html">strreplace</a> command, source string is corrupted.
         <ul>
           <li>The result variable returns -1 when invalid regular expression is specified.</li>

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2016-08-22 12:26:59 UTC (rev 6474)
+++ trunk/doc/ja/html/about/history.html	2016-08-23 03:15:32 UTC (rev 6475)
@@ -57,6 +57,7 @@
       <li>\x83\x8A\x83\x82\x81[\x83g\x82\xA9\x82\xE7\x82̃N\x83\x8A\x83b\x83v\x83{\x81[\x83h\x93ǂݎ\xE6\x82\xE8\x82ɑ΂\xB5\x82āA\x96\x96\x94\xF6\x82ɗ]\x8Cv\x82\xC8 NUL \x95\xB6\x8E\x9A\x82\xF0\x95t\x89\xC1\x82\xB5\x82Ă\xA2\x82\xBD\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
       <li>\x83\x8A\x83\x82\x81[\x83g\x82\xA9\x82\xE7\x82̃N\x83\x8A\x83b\x83v\x83{\x81[\x83h\x8F\x91\x82\xAB\x8D\x9E\x82݂ŁA\x8B󕶎\x9A\x97񂪃Z\x83b\x83g\x8Fo\x97\x88\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
       <li>\x83N\x83\x8A\x83b\x83v\x83{\x81[\x83h\x82̓\xE0\x97e\x82\xAA\x8B󕶎\x9A\x97\xF1\x82̎\x9E\x81A<a href="../usage/tips/vim.html#Bracketed">Bracketed Paste Mode</a> \x97L\x8C\xF8\x8E\x9E\x82̓\\x82\xE8\x95t\x82\xAF\x82ŏI\x97\xB9 Bracket \x82݂̂\xAA\x91\x97\x82\xE7\x82\xEA\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>ZMODEM \x8E\xF3\x90M\x82ŁAZMODEM \x83w\x83b\x83_\x83p\x83P\x83b\x83g\x82Ɋ܂܂\xEA\x82\xE9\x83G\x83X\x83P\x81[\x83v\x82\xB3\x82ꂽ 0x7f, 0xff \x82𕜌\xB3\x82\xB5\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
       <li><a href="../macro/command/strreplace.html">strreplace</a> \x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82ŁA\x90\xB3\x82\xB5\x82\xAD\x82Ȃ\xA2\x90\xB3\x8BK\x95\\x8C\xBB\x82\xF0\x8Ew\x92肵\x82\xBD\x8E\x9E\x82Ɍ\xB3\x95\xB6\x8E\x9A\x97񂪉\xF3\x82\xEA\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B
         <ul>
           <li>\x90\xB3\x82\xB5\x82\xAD\x96\xB3\x82\xA2\x90\xB3\x8BK\x95\\x8C\xBB\x82\xF0\x8Ew\x92肵\x82\xBD\x8E\x9E\x82\xCD result \x82\xC5 -1 \x82\xF0\x95Ԃ\xB7\x82悤\x82ɂ\xB5\x82\xBD\x81B</li>

Modified: trunk/teraterm/ttpfile/zmodem.c
===================================================================
--- trunk/teraterm/ttpfile/zmodem.c	2016-08-22 12:26:59 UTC (rev 6474)
+++ trunk/teraterm/ttpfile/zmodem.c	2016-08-23 03:15:32 UTC (rev 6475)
@@ -1239,7 +1239,16 @@
 					break;
 				default:
 					if (zv->Quoted) {
-						b = b ^ 0x40;
+						switch (b) {
+						case ZRUB0:
+							b = 0x7f;
+							break;
+						case ZRUB1:
+							b = 0xff;
+							break;
+						default:
+							b = b ^ 0x40;
+						}
 						zv->Quoted = FALSE;
 					}
 					zv->PktIn[zv->PktInPtr] = b;



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