[Ttssh2-commit] [6715] 不使用のコードを削除

svnno****@sourc***** svnno****@sourc*****
2017年 5月 12日 (金) 21:41:55 JST


Revision: 6715
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6715
Author:   doda
Date:     2017-05-12 21:41:55 +0900 (Fri, 12 May 2017)
Log Message:
-----------
不使用のコードを削除

Modified Paths:
--------------
    trunk/ttssh2/ttxssh/ssh.c
    trunk/ttssh2/ttxssh/ttxssh.c

-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/ssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ssh.c	2017-05-12 12:41:49 UTC (rev 6714)
+++ trunk/ttssh2/ttxssh/ssh.c	2017-05-12 12:41:55 UTC (rev 6715)
@@ -766,13 +766,8 @@
 	} else {
 		int already_decrypted = get_predecryption_amount(pvar);
 
-#if 0
 		CRYPT_decrypt(pvar, data + already_decrypted,
-		              len - already_decrypted);
-#else
-		CRYPT_decrypt(pvar, data + already_decrypted,
 		              (4 + len) - already_decrypted);
-#endif
 
 		if (!CRYPT_verify_receiver_MAC
 			(pvar, pvar->ssh_state.receiver_sequence_number, data, len + 4,
@@ -6396,18 +6391,6 @@
 		/* NOT REACHED */
 	}
 
-	// \x82\xB1\x82̎\x9E\x93_\x82\xC5MAC\x82∳\x8Fk\x82\xF0\x97L\x8C\xF8\x82ɂ\xB7\x82\xE9\x82̂͊ԈႢ\x82\xBE\x82\xC1\x82\xBD\x82̂ō폜\x81B(2006.10.30 yutaka)
-#if 0
-	for (mode = 0 ; mode < MODE_MAX ; mode++) {
-		pvar->ssh2_keys[mode].mac.enabled = 1;
-		pvar->ssh2_keys[mode].comp.enabled = 1;
-	}
-
-	// \x83p\x83P\x83b\x83g\x88\xB3\x8Fk\x82\xAA\x97L\x8C\xF8\x82Ȃ珉\x8A\x{227B0B7}\x82\xE9\x81B(2005.7.9 yutaka)
-	prep_compression(pvar);
-	enable_compression(pvar);
-#endif
-
 	// start user authentication
 	msg = buffer_init();
 	if (msg == NULL) {

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2017-05-12 12:41:49 UTC (rev 6714)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2017-05-12 12:41:55 UTC (rev 6715)
@@ -229,7 +229,6 @@
 		}
 	}
 
-#if 1
 	// \x8Ew\x92肳\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x95\xB6\x8E\x9A\x82\xAA\x82\xA0\x82\xEA\x82΁Adisabled line\x82̒\xBC\x91O\x82ɑ}\x93\xFC\x82\xB7\x82\xE9\x81B
 	// 
 	// ex. (Z\x82\xF0\x91}\x93\xFC\x82\xB7\x82\xE9)
@@ -271,17 +270,7 @@
 			i++;
 		}
 	}
-#else
-	for (j = 0; j < default_strings_len ; j++) {
-		int num = default_strings[j];
 
-		if (!listed[num]) {
-			buf[i] = num + '0';
-			i++;
-		}
-	}
-#endif
-
 	buf[i] = 0;
 }
 
@@ -293,15 +282,7 @@
 {
 	/* SSH_CIPHER_NONE means that all ciphers below that one are disabled.
 	   We *never* allow no encryption. */
-#if 0
 	static char default_strings[] = {
-		SSH_CIPHER_3DES,
-		SSH_CIPHER_NONE,
-		SSH_CIPHER_DES, SSH_CIPHER_BLOWFISH
-	};
-#else
-	// for SSH2(yutaka)
-	static char default_strings[] = {
 		SSH2_CIPHER_CAMELLIA256_CTR,
 		SSH2_CIPHER_AES256_CTR,
 		SSH2_CIPHER_CAMELLIA256_CBC,
@@ -329,7 +310,6 @@
 		SSH_CIPHER_DES,
 		0, 0, 0 // Dummy for SSH_CIPHER_IDEA, SSH_CIPHER_TSS, SSH_CIPHER_RC4
 	};
-#endif
 
 	normalize_generic_order(buf, default_strings, NUM_ELEM(default_strings));
 }
@@ -800,13 +780,8 @@
 		case AF_INET6:
 			len = sizeof(struct sockaddr_in6);
 			((struct sockaddr_in6 FAR *) &ss)->sin6_family = AF_INET6;
-#if 0							/* symbol "in6addr_any" is not included in wsock32.lib */
-			/* if wsock32.lib will be linked, we can't refer "in6addr_any" */
-			((struct sockaddr_in6 FAR *) &ss)->sin6_addr = in6addr_any;
-#else
 			memset(&((struct sockaddr_in6 FAR *) &ss)->sin6_addr, 0,
 			       sizeof(struct in_addr6));
-#endif							/* 0 */
 			((struct sockaddr_in6 FAR *) &ss)->sin6_port =
 				htons(find_local_port(pvar));
 			break;
@@ -899,16 +874,9 @@
 	}
 
 	if (SecureLargeIcon != NULL && SecureSmallIcon != NULL) {
-#if 0
-		// \x91傫\x82\xA2\x83A\x83C\x83R\x83\x93\x82\xCD WNDCLASS \x82ɃZ\x83b\x83g\x82\xB5\x82Ă\xA2\x82\xE9\x82̂Ŏ\xE6\x82\xE8\x8Fo\x82\xB5\x95\xFB\x82\xAA\x88Ⴄ (2006.8.10 maya)
 		pvar->OldLargeIcon =
-			(HICON) GetClassLong(pvar->NotificationWindow, GCL_HICON);
-#else
-		// Tera Term \x91\xA4\x82\xAA WM_SETICON \x82\xB7\x82\xE9\x82悤\x82ɂȂ\xC1\x82\xBD\x82̂ŕ\x81\x92ʂɎ\xE6\x82\xE8\x8Fo\x82\xB7 (2009.6.9 maya)
-		pvar->OldLargeIcon =
 			(HICON) SendMessage(pvar->NotificationWindow, WM_GETICON,
 			                    ICON_BIG, 0);
-#endif
 		pvar->OldSmallIcon =
 			(HICON) SendMessage(pvar->NotificationWindow, WM_GETICON,
 			                    ICON_SMALL, 0);
@@ -1630,15 +1598,7 @@
 					GetDlgItemText(dlg, IDC_HOSTCOM, EntName,
 					               sizeof(EntName) - 1);
 					if (strncmp(EntName, "COM", 3) == 0 && EntName[3] != '\0') {
-#if 0
-						GetHNRec->ComPort = (BYTE) (EntName[3]) - 0x30;
-						if (strlen(EntName) > 4)
-							GetHNRec->ComPort =
-								GetHNRec->ComPort * 10 + (BYTE) (EntName[4]) -
-								0x30;
-#else
 						GetHNRec->ComPort = atoi(&EntName[3]);
-#endif
 						if (GetHNRec->ComPort > GetHNRec->MaxComPort)
 							GetHNRec->ComPort = 1;
 					} else {
@@ -5334,19 +5294,8 @@
 
 			pvar->showing_err = TRUE;
 			pvar->err_msg = NULL;
-#if 0
-			// XXX: "SECURITY WARINIG" dialog\x82\xC5 ESC \x83L\x81[\x82\xF0\x89\x9F\x89\xBA\x82\xB7\x82\xE9\x82ƁA
-			// \x82Ȃ\xBA\x82\xA9\x83A\x83v\x83\x8A\x83P\x81[\x83V\x83\x87\x83\x93\x83G\x83\x89\x81[\x82ƂȂ邽\x82߁A\x89\xBA\x8BLAPI\x82͍폜\x81B(2004.12.16 yutaka)
-			if (!SSHv1(pvar)) {
-				MessageBox(NULL, msg, "TTSSH",
-						MB_TASKMODAL | MB_ICONEXCLAMATION);
-			}
-#else
-			// \x96\xE2\x91\xE8\x82Ȃ\xB3\x82\xBB\x82\xA4\x82Ȃ̂\xC5 SSH1 \x82ł\xE0\x83\x81\x83b\x83Z\x81[\x83W\x82\xF0
-			// \x95\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɖ߂\xB5\x82\xBD\x81B(2008.2.16 maya)
 			MessageBox(NULL, msg, "TTSSH",
 					   MB_TASKMODAL | MB_ICONEXCLAMATION);
-#endif
 			free(msg);
 			pvar->showing_err = FALSE;
 



Ttssh2-commit メーリングリストの案内