Revision: 8384 https://osdn.net/projects/ttssh2/scm/svn/commits/8384 Author: doda Date: 2019-11-21 20:29:55 +0900 (Thu, 21 Nov 2019) Log Message: ----------- CSF_CB* の実際の値を知らなくても使えるようにした。 ・off を表す CSF_CBNONE を追加 ・mask として使う為の CSF_CBMASK を追加 ・mask として使っていた CSF_CBRW を CSF_CBMASK に修正 Modified Paths: -------------- trunk/teraterm/common/tttypes.h trunk/teraterm/ttpset/ttset.c -------------- next part -------------- Modified: trunk/teraterm/common/tttypes.h =================================================================== --- trunk/teraterm/common/tttypes.h 2019-11-21 11:29:48 UTC (rev 8383) +++ trunk/teraterm/common/tttypes.h 2019-11-21 11:29:55 UTC (rev 8384) @@ -347,9 +347,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 Modified: trunk/teraterm/ttpset/ttset.c =================================================================== --- trunk/teraterm/ttpset/ttset.c 2019-11-21 11:29:48 UTC (rev 8383) +++ trunk/teraterm/ttpset/ttset.c 2019-11-21 11:29:55 UTC (rev 8384) @@ -1999,6 +1999,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 +2007,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); @@ -3360,7 +3363,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;