[Ttssh2-commit] [6369] 送信改行コード LF を追加

アーカイブの一覧に戻る

svnno****@sourc***** svnno****@sourc*****
2016年 4月 11日 (月) 22:42:54 JST


Revision: 6369
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6369
Author:   maya
Date:     2016-04-11 22:42:54 +0900 (Mon, 11 Apr 2016)
Log Message:
-----------
送信改行コード LF を追加

Modified Paths:
--------------
    trunk/teraterm/ttpcmn/ttcmn.c
    trunk/teraterm/ttpdlg/ttdlg.c
    trunk/teraterm/ttpset/ttset.c

-------------- next part --------------
Modified: trunk/teraterm/ttpcmn/ttcmn.c
===================================================================
--- trunk/teraterm/ttpcmn/ttcmn.c	2016-04-10 13:33:15 UTC (rev 6368)
+++ trunk/teraterm/ttpcmn/ttcmn.c	2016-04-11 13:42:54 UTC (rev 6369)
@@ -1649,6 +1649,9 @@
 				          cv->TelFlag && ! cv->TelBinSend) {
 					TempStr[TempLen++] = 0;
 				}
+				else if (cv->CRSend == IdLF) {
+					TempStr[TempLen-1] = 0x0a;
+				}
 				if (cv->TelLineMode) {
 					cv->Flush = TRUE;
 				}
@@ -1659,7 +1662,7 @@
 						cv->LineModeBuffCount--;
 					}
 				}
-		  		else {
+				else {
 					TempStr[TempLen++] = d;
 				}
 			}
@@ -1667,7 +1670,7 @@
 				if (cv->TelLineMode) {
 					cv->LineModeBuffCount = cv->FlushLen;
 				}
-		  		else {
+				else {
 					TempStr[TempLen++] = d;
 				}
 			}
@@ -1779,6 +1782,9 @@
 			else if (cv->CRSend==IdCR && cv->TelFlag && ! cv->TelBinSend) {
 				TempStr[TempLen++] = 0;
 			}
+			else if (cv->CRSend == IdLF) {
+				TempStr[TempLen-1] = 0x0a;
+			}
 			if (cv->TelLineMode) {
 				cv->Flush = TRUE;
 			}
@@ -2004,6 +2010,9 @@
 				          cv->TelFlag && ! cv->TelBinSend) {
 					TempStr[TempLen++] = 0;
 				}
+				else if (cv->CRSend == IdLF) {
+					TempStr[TempLen-1] = 0x0a;
+				}
 			}
 			else if (d==0x15) { // Ctrl-U
 				if (cv->TelLineMode) {
@@ -2100,6 +2109,9 @@
 			else if (cv->CRSend==IdCR && cv->TelFlag && ! cv->TelBinSend) {
 				TempStr[TempLen++] = 0;
 			}
+			else if (cv->CRSend == IdLF) {
+				TempStr[TempLen-1] = 0x0a;
+			}
 			break;
 		  
 		  case 0x15: // Ctrl-U

Modified: trunk/teraterm/ttpdlg/ttdlg.c
===================================================================
--- trunk/teraterm/ttpdlg/ttdlg.c	2016-04-10 13:33:15 UTC (rev 6368)
+++ trunk/teraterm/ttpdlg/ttdlg.c	2016-04-11 13:42:54 UTC (rev 6369)
@@ -50,7 +50,7 @@
 char UILanguageFile[MAX_PATH];
 
 static PCHAR far NLListRcv[] = {"CR","CR+LF", "LF", "AUTO", NULL};
-static PCHAR far NLList[] = {"CR","CR+LF", NULL};
+static PCHAR far NLList[] = {"CR","CR+LF", "LF", NULL};
 static PCHAR far TermList[] =
 	{"VT100", "VT101", "VT102", "VT282", "VT320", "VT382",
 	 "VT420", "VT520", "VT525", NULL};

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2016-04-10 13:33:15 UTC (rev 6368)
+++ trunk/teraterm/ttpset/ttset.c	2016-04-11 13:42:54 UTC (rev 6369)
@@ -597,10 +597,15 @@
 	/* CR Send */
 	GetPrivateProfileString(Section, "CRSend", "",
 	                        Temp, sizeof(Temp), FName);
-	if (_stricmp(Temp, "CRLF") == 0)
+	if (_stricmp(Temp, "CRLF") == 0) {
 		ts->CRSend = IdCRLF;
-	else
+	}
+	else if (_stricmp(Temp, "LF") == 0) {
+		ts->CRSend = IdLF;
+	}
+	else {
 		ts->CRSend = IdCR;
+	}
 	ts->CRSend_ini = ts->CRSend;
 
 	/* Local echo */
@@ -1992,10 +1997,15 @@
 	WritePrivateProfileString(Section, "CRReceive", Temp, FName);
 
 	/* CR Send */
-	if (ts->CRSend == IdCRLF)
+	if (ts->CRSend == IdCRLF) {
 		strncpy_s(Temp, sizeof(Temp), "CRLF", _TRUNCATE);
-	else
+	}
+	else if (ts->CRSend == IdLF) {
+		strncpy_s(Temp, sizeof(Temp), "LF", _TRUNCATE);
+	}
+	else {
 		strncpy_s(Temp, sizeof(Temp), "CR", _TRUNCATE);
+	}
 	WritePrivateProfileString(Section, "CRSend", Temp, FName);
 
 	/* Local echo */



Ttssh2-commit メーリングリストの案内
アーカイブの一覧に戻る