• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision5590 (tree)
Time2014-05-19 18:05:23
Authordoda

Log Message

デバッグモードで使用するモードを選べるようにした。

Change Summary

Incremental Difference

--- trunk/teraterm/teraterm/keyboard.c (revision 5589)
+++ trunk/teraterm/teraterm/keyboard.c (revision 5590)
@@ -565,9 +565,11 @@
565565 (VKey==VK_MENU)) return KEYDOWN_CONTROL;
566566
567567 /* debug mode */
568- if ((ts.Debug>0) && (VKey == VK_ESCAPE) && ShiftKey()) {
568+ if (ts.Debug && (VKey == VK_ESCAPE) && ShiftKey()) {
569569 MessageBeep(0);
570- DebugFlag = (DebugFlag+1)%DEBUG_FLAG_MAXD;
570+ do {
571+ DebugFlag = (DebugFlag+1)%DEBUG_FLAG_MAXD;
572+ } while (DebugFlag != DEBUG_FLAG_NONE && !((ts.DebugModes >> (DebugFlag-1)) & 1));
571573 CodeCount = 0;
572574 PeekMessage((LPMSG)&M,HWin,WM_CHAR,WM_CHAR,PM_REMOVE);
573575 return KEYDOWN_CONTROL;
--- trunk/teraterm/ttpset/ttset.c (revision 5589)
+++ trunk/teraterm/ttpset/ttset.c (revision 5590)
@@ -1534,6 +1534,28 @@
15341534
15351535 GetPrivateProfileString(Section, "JoinSplitURLIgnoreEOLChar", "\\", Temp, sizeof(Temp), FName);
15361536 ts->JoinSplitURLIgnoreEOLChar = Temp[0];
1537+
1538+ // Debug modes.
1539+ GetPrivateProfileString(Section, "DebugModes", "all", Temp, sizeof(Temp), FName);
1540+ if (_stricmp(Temp, "on") == 0 || _stricmp(Temp, "all") == 0)
1541+ ts->DebugModes = DBGF_ALL;
1542+ else if (_stricmp(Temp, "off") == 0 || _stricmp(Temp, "none") == 0) {
1543+ ts->DebugModes = DBGF_NONE;
1544+ ts->Debug = FALSE;
1545+ }
1546+ else {
1547+ ts->DebugModes = DBGF_NONE;
1548+ for (i=1; GetNthString(Temp, i, sizeof(Temp2), Temp2); i++) {
1549+ if (_stricmp(Temp2, "normal") == 0)
1550+ ts->DebugModes |= DBGF_NORM;
1551+ else if (_stricmp(Temp2, "hex") == 0)
1552+ ts->DebugModes |= DBGF_HEXD;
1553+ else if (_stricmp(Temp2, "noout") == 0)
1554+ ts->DebugModes |= DBGF_NOUT;
1555+ }
1556+ if (ts->DebugModes == DBGF_NONE)
1557+ ts->Debug = FALSE;
1558+ }
15371559 }
15381560
15391561 void FAR PASCAL WriteIniFile(PCHAR FName, PTTSet ts)
@@ -2700,6 +2722,38 @@
27002722
27012723 _snprintf_s(Temp, sizeof(Temp), _TRUNCATE, "%c", ts->JoinSplitURLIgnoreEOLChar);
27022724 WritePrivateProfileString(Section, "JoinSplitURLIgnoreEOLChar", Temp, FName);
2725+
2726+ // Debug modes.
2727+ if (ts->DebugModes == DBGF_ALL) {
2728+ strncpy_s(Temp, sizeof(Temp), "all", _TRUNCATE);
2729+ }
2730+ else {
2731+ if (ts->DebugModes & DBGF_NORM) {
2732+ strncpy_s(Temp, sizeof(Temp), "normal", _TRUNCATE);
2733+ }
2734+ else {
2735+ Temp[0] = 0;
2736+ }
2737+
2738+ if (ts->DebugModes & DBGF_HEXD) {
2739+ if (Temp[0] != 0) {
2740+ strncat_s(Temp, sizeof(Temp), ",", _TRUNCATE);
2741+ }
2742+ strncat_s(Temp, sizeof(Temp), "hex", _TRUNCATE);
2743+ }
2744+
2745+ if (ts->DebugModes & DBGF_NOUT) {
2746+ if (Temp[0] != 0) {
2747+ strncat_s(Temp, sizeof(Temp), ",", _TRUNCATE);
2748+ }
2749+ strncat_s(Temp, sizeof(Temp), "noout", _TRUNCATE);
2750+ }
2751+
2752+ if (Temp[0] == 0) {
2753+ strncpy_s(Temp, sizeof(Temp), "none", _TRUNCATE);
2754+ }
2755+ }
2756+ WritePrivateProfileString(Section, "DebugModes", Temp, FName);
27032757 }
27042758
27052759 #define VTEditor "VT editor keypad"
--- trunk/teraterm/common/tttypes.h (revision 5589)
+++ trunk/teraterm/common/tttypes.h (revision 5590)
@@ -275,6 +275,13 @@
275275 #define CSF_CBREAD 2
276276 #define CSF_CBRW (CSF_CBREAD | CSF_CBWRITE)
277277
278+// Debug Flags (used in ts.DebugModes)
279+#define DBGF_NONE 0
280+#define DBGF_NORM 1
281+#define DBGF_HEXD 2
282+#define DBGF_NOUT 4
283+#define DBGF_ALL (DBGF_NORM | DBGF_HEXD | DBGF_NOUT)
284+
278285 // Title Reporting Type
279286 #define IdTitleReportIgnore 0
280287 #define IdTitleReportAccept 8
@@ -574,6 +581,7 @@
574581 WORD JoinSplitURL;
575582 char JoinSplitURLIgnoreEOLChar;
576583 char MulticastName[MAX_PATH];
584+ WORD DebugModes;
577585 };
578586
579587 typedef struct tttset TTTSet, *PTTSet;
@@ -1037,6 +1045,9 @@
10371045 * Increment the number of this macro value
10381046 * when you change TMap or member of TMap.
10391047 *
1048+ * - At version 4.83, ttset_memfilemap was replaced with ttset_memfilemap_24.
1049+ * added tttset.DebugModes
1050+ *
10401051 * - At version 4.82, ttset_memfilemap was replaced with ttset_memfilemap_23.
10411052 * added tttset.MulticastName
10421053 *
Show on old repository browser