svnno****@sourc*****
svnno****@sourc*****
2017年 6月 13日 (火) 19:56:30 JST
Revision: 6804 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6804 Author: doda Date: 2017-06-13 19:56:30 +0900 (Tue, 13 Jun 2017) Log Message: ----------- SI/SO の無効化対応 Ticket: 37266 SI/SO を無効化したいという要望はわかるけれど、SI/SO だけでいいのか? SS2, SS3, LS2, LS3, LS1R, LS2R, LS3R, その他 ISO 2022 の文字指示とかはいいのか? 英語モードで自分が困るのが SI/SO だという事なんだろうけれど…… ISO 2022 の文字セット切り替え全般を制御するオプションにする方がよくないか? Modified Paths: -------------- trunk/teraterm/common/tttypes.h trunk/teraterm/teraterm/vtterm.c trunk/teraterm/ttpset/ttset.c -------------- next part -------------- Modified: trunk/teraterm/common/tttypes.h =================================================================== --- trunk/teraterm/common/tttypes.h 2017-06-13 10:42:58 UTC (rev 6803) +++ trunk/teraterm/common/tttypes.h 2017-06-13 10:56:30 UTC (rev 6804) @@ -567,7 +567,7 @@ WORD DisableMenuDuplicateSession; WORD DisableMenuNewConnection; char TerminalUID[9]; - WORD Dummy4; // \x8B\x8CConfirmChangePasteCR. PasteFlag\x82ɓ\x9D\x8D\x87\x82\xB5\x82\xBD\x82\xBD\x82ߔp\x8E~\x81B\x91\xBC\x82֓]\x97p + WORD EnableSOSI; WORD JumpList; WORD TabStopFlag; DWORD CtrlFlag; Modified: trunk/teraterm/teraterm/vtterm.c =================================================================== --- trunk/teraterm/teraterm/vtterm.c 2017-06-13 10:42:58 UTC (rev 6803) +++ trunk/teraterm/teraterm/vtterm.c 2017-06-13 10:56:30 UTC (rev 6804) @@ -802,7 +802,7 @@ case NUL: return; case SO: - if (! DirectPrn) { + if (ts.EnableSOSI && ! DirectPrn) { if ((ts.Language==IdJapanese) && (ts.KanjiCode==IdJIS) && (ts.JIS7Katakana==1) && @@ -815,7 +815,7 @@ } break; case SI: - if (! DirectPrn) { + if (ts.EnableSOSI && ! DirectPrn) { Glr[0] = 0; /* LS0 */ return; } @@ -942,16 +942,22 @@ } break; case SO: /* LS1 */ - if ((ts.Language==IdJapanese) && - (ts.KanjiCode==IdJIS) && - (ts.JIS7Katakana==1) && - ((ts.TermFlag & TF_FIXEDJIS)!=0)) - Gn[1] = IdKatakana; + if (ts.EnableSOSI) { + if ((ts.Language==IdJapanese) && + (ts.KanjiCode==IdJIS) && + (ts.JIS7Katakana==1) && + ((ts.TermFlag & TF_FIXEDJIS)!=0)) + { + Gn[1] = IdKatakana; + } - Glr[0] = 1; + Glr[0] = 1; + } break; case SI: /* LS0 */ - Glr[0] = 0; + if (ts.EnableSOSI) { + Glr[0] = 0; + } break; case DLE: if ((ts.FTFlag & FT_BPAUTO)!=0) Modified: trunk/teraterm/ttpset/ttset.c =================================================================== --- trunk/teraterm/ttpset/ttset.c 2017-06-13 10:42:58 UTC (rev 6803) +++ trunk/teraterm/ttpset/ttset.c 2017-06-13 10:56:30 UTC (rev 6804) @@ -1940,6 +1940,8 @@ if (GetOnOff(Section, "NormalizeLineBreakOnPaste", FName, FALSE)) ts->PasteFlag |= CPF_NORMALIZE_LINEBREAK; + // Disable SO/SI. + ts->EnableSOSI = GetOnOff(Section, "EnableSOSI", FName, TRUE); // Fallback to CP932 (Experimental) ts->FallbackToCP932 = GetOnOff(Section, "FallbackToCP932", FName, FALSE); @@ -3212,6 +3214,9 @@ WriteOnOff(Section, "NormalizeLineBreakOnPaste", FName, (WORD) (ts->PasteFlag & CPF_NORMALIZE_LINEBREAK)); + // Disable SO/SI. + WriteOnOff(Section, "EnableSOSI", FName, ts->EnableSOSI); + // CygTerm Configuration File WriteCygtermConfFile(ts); }