[Ttssh2-commit] [6624] PuTTY のバージョン取得方法を変更

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2017年 3月 11日 (土) 09:10:30 JST


Revision: 6624
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6624
Author:   maya
Date:     2017-03-11 09:10:29 +0900 (Sat, 11 Mar 2017)
Log Message:
-----------
PuTTY のバージョン取得方法を変更

Modified Paths:
--------------
    trunk/ttssh2/putty/libputty.c
    trunk/ttssh2/putty/libputty.h
    trunk/ttssh2/ttxssh/ttxssh.c

-------------- next part --------------
Modified: trunk/ttssh2/putty/libputty.c
===================================================================
--- trunk/ttssh2/putty/libputty.c	2017-03-10 23:38:29 UTC (rev 6623)
+++ trunk/ttssh2/putty/libputty.c	2017-03-11 00:10:29 UTC (rev 6624)
@@ -162,6 +162,11 @@
 	return rsa_public_blob_len(key, maxlen);
 }
 
+const char *putty_get_version()
+{
+	extern const char ver[]; /* in version.c */
+	return ver;
+}
 
 /*
  * Following functions are copied from putty source.

Modified: trunk/ttssh2/putty/libputty.h
===================================================================
--- trunk/ttssh2/putty/libputty.h	2017-03-10 23:38:29 UTC (rev 6623)
+++ trunk/ttssh2/putty/libputty.h	2017-03-11 00:10:29 UTC (rev 6624)
@@ -24,6 +24,7 @@
                                 int *outlen);
 int putty_get_ssh1_keylen(unsigned char *key,
                           int maxlen);
+const char *putty_get_version();
 
 static void *get_keylist1(int *length);
 static void *get_keylist2(int *length);

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2017-03-10 23:38:29 UTC (rev 6623)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2017-03-11 00:10:29 UTC (rev 6624)
@@ -2529,11 +2529,7 @@
 	SendMessage(GetDlgItem(dlg, IDC_ZLIB_VERSION), WM_SETTEXT, 0, (LPARAM)buf);
 
 	// PuTTY\x82̃o\x81[\x83W\x83\x87\x83\x93\x82\xF0\x90ݒ肷\x82\xE9 (2011.7.26 yutaka)
-#ifdef PUTTYVERSION
-	_snprintf_s(buf, sizeof(buf), _TRUNCATE, "PuTTY %s", PUTTYVERSION);
-#else
-	_snprintf(buf, sizeof(buf), "PuTTY Unknown");
-#endif
+	_snprintf_s(buf, sizeof(buf), _TRUNCATE, "PuTTY %s", putty_get_version());
 	SendMessage(GetDlgItem(dlg, IDC_PUTTY_VERSION), WM_SETTEXT, 0, (LPARAM)buf);
 }
 



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