[Ttssh2-commit] [6918] ・ISO2022ShiftFunction の各項目の前後のスペースを無視するようにした。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2017年 8月 25日 (金) 23:48:51 JST


Revision: 6918
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6918
Author:   doda
Date:     2017-08-25 23:48:51 +0900 (Fri, 25 Aug 2017)
Log Message:
-----------
・ISO2022ShiftFunction の各項目の前後のスペースを無視するようにした。
・+SS2 のように先頭に + を付けた場合に対応した。

Modified Paths:
--------------
    trunk/teraterm/ttpset/ttset.c

-------------- next part --------------
Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2017-08-25 14:48:48 UTC (rev 6917)
+++ trunk/teraterm/ttpset/ttset.c	2017-08-25 14:48:51 UTC (rev 6918)
@@ -1973,13 +1973,29 @@
 	ts->ISO2022Flag = ISO2022_SHIFT_NONE;
 	for (i=1; GetNthString(Temp, i, sizeof(Temp2), Temp2); i++) {
 		BOOL add=TRUE;
-		char *p = Temp2;
+		char *p = Temp2, *p2;
 		int mask = 0;
 
+		while (*p == ' ' || *p == '\t') {
+			p++;
+		}
+		p2 = p + strlen(p);
+		while (p2 > p) {
+			p2--;
+			if (*p2 != ' ' && *p2 != '\t') {
+				break;
+			}
+		}
+		*++p2 = 0;
+
 		if (*p == '-') {
 			p++;
 			add=FALSE;
 		}
+		else if (*p == '+') {
+			p++;
+		}
+
 		if (_stricmp(p, "on") == 0 || _stricmp(p, "all") == 0)
 			ts->ISO2022Flag = ISO2022_SHIFT_ALL;
 		else if (_stricmp(p, "off") == 0 || _stricmp(p, "none") == 0)



Ttssh2-commit メーリングリストの案内
Back to archive index