• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision6943 (tree)
Time2017-09-27 12:16:21
Authordoda

Log Message

DECRQSSへの応答(DECRPSS)を修正。

VT510 Video Terminal Programmer Information での DECRPSS の記述 [*1] では
最初のパラメータはの意味は以下のようになっている。

0 -> valid
1 -> invalid

VT520/VT525 Video Terminal Programmer Information [*2] でも同様の記述。
Tera Term ではこの記述に従って DECRQSS/DECRPSS を実装していた。

しかし、以下の物で 0/1 と valid/invalid の対応が逆(1がvalid)となって
いた為、[*1] の記述は誤りと判断し、Tera Term の動作も変更する。

  • xterm での DECRQSS/DECRPSS の動作
  • VT382 Kanji Display Terminal Programmer Reference Manual [*3]
  • VT382, VT525 の実機の動作

1: https://vt100.net/docs/vt510-rm/DECRPSS.html
2: https://vt100.net/docs/vt520-rm/
3: https://vt100.net/manx/details/1,4208

Change Summary

Incremental Difference

--- trunk/teraterm/teraterm/vtterm.c (revision 6942)
+++ trunk/teraterm/teraterm/vtterm.c (revision 6943)
@@ -3996,7 +3996,7 @@
39963996 if (ts.NonblinkingCursor) {
39973997 tmp++;
39983998 }
3999- len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "0$r%d q", CLocale, tmp);
3999+ len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "1$r%d q", CLocale, tmp);
40004000 }
40014001 break;
40024002 case '"':
@@ -4003,19 +4003,19 @@
40034003 switch (StrBuff[1]) {
40044004 case 'p': // DECSCL
40054005 if (VTlevel > 1 && Send8BitMode) {
4006- len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "0$r6%d;0\"p", CLocale, VTlevel);
4006+ len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "1$r6%d;0\"p", CLocale, VTlevel);
40074007 }
40084008 else {
4009- len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "0$r6%d;1\"p", CLocale, VTlevel);
4009+ len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "1$r6%d;1\"p", CLocale, VTlevel);
40104010 }
40114011 break;
40124012
40134013 case 'q': // DECSCA
40144014 if (CharAttr.Attr2 & Attr2Protect) {
4015- len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "0$r1\"q", CLocale);
4015+ len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "1$r1\"q", CLocale);
40164016 }
40174017 else {
4018- len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "0$r0\"q", CLocale);
4018+ len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "1$r0\"q", CLocale);
40194019 }
40204020 break;
40214021 }
@@ -4022,7 +4022,7 @@
40224022 break;
40234023 case 'm': // SGR
40244024 if (StrBuff[1] == 0) {
4025- len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "0$r0", CLocale);
4025+ len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "1$r0", CLocale);
40264026 if (CharAttr.Attr & AttrBold) {
40274027 len += _snprintf_s_l(&RepStr[len], sizeof(RepStr) - len, _TRUNCATE, ";1", CLocale);
40284028 }
@@ -4088,17 +4088,17 @@
40884088 break;
40894089 case 'r': // DECSTBM
40904090 if (StrBuff[1] == 0) {
4091- len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "0$r%d;%dr", CLocale, CursorTop+1, CursorBottom+1);
4091+ len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "1$r%d;%dr", CLocale, CursorTop+1, CursorBottom+1);
40924092 }
40934093 break;
40944094 case 's': // DECSLRM
40954095 if (StrBuff[1] == 0) {
4096- len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "0$r%d;%ds", CLocale, CursorLeftM+1, CursorRightM+1);
4096+ len = _snprintf_s_l(RepStr, sizeof(RepStr), _TRUNCATE, "1$r%d;%ds", CLocale, CursorLeftM+1, CursorRightM+1);
40974097 }
40984098 break;
40994099 }
41004100 if (len == 0) {
4101- if (strncpy_s(RepStr, sizeof(RepStr), "1$r", _TRUNCATE)) {
4101+ if (strncpy_s(RepStr, sizeof(RepStr), "0$r", _TRUNCATE)) {
41024102 return;
41034103 }
41044104 len = 3;
--- trunk/doc/ja/html/about/history.html (revision 6942)
+++ trunk/doc/ja/html/about/history.html (revision 6943)
@@ -38,6 +38,12 @@
3838 <li>DA2 要求への応答内容を変更した。</li>
3939 </ul>
4040 </li>
41+
42+ <li>バグ修正
43+ <ul>
44+ <li>DECRQSS 制御シーケンスへの応答が間違っている問題を修正した。</li>
45+ </ul>
46+ </li>
4147 </ul>
4248
4349
--- trunk/doc/en/html/about/history.html (revision 6942)
+++ trunk/doc/en/html/about/history.html (revision 6943)
@@ -38,6 +38,12 @@
3838 <li>The response of DA2 request is changed.</li>
3939 </ul>
4040 </li>
41+
42+ <li>Buf fixes
43+ <ul>
44+ <li>The response of DECRQSS control sequence was invalid.</li>
45+ </ul>
46+ </li>
4147 </ul>
4248
4349
Show on old repository browser