svnno****@sourc*****
svnno****@sourc*****
2009年 3月 25日 (水) 05:50:54 JST
Revision: 3232 http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3232 Author: doda Date: 2009-03-25 05:50:54 +0900 (Wed, 25 Mar 2009) Log Message: ----------- ä¸é¨ã®2ãã¤ãæåããã¹ãåã«ä½¿ããªãã£ãã®ãä¿®æ£ã [Ttssh2-devel 1407], http://sourceforge.jp/forum/forum.php?thread_id=22115&forum_id=5841 Modified Paths: -------------- trunk/ttssh2/ttxssh/ttxssh.c -------------- next part -------------- Modified: trunk/ttssh2/ttxssh/ttxssh.c =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.c 2009-03-24 20:37:11 UTC (rev 3231) +++ trunk/ttssh2/ttxssh/ttxssh.c 2009-03-24 20:50:54 UTC (rev 3232) @@ -45,6 +45,7 @@ #include <fcntl.h> #include <sys/stat.h> #include <time.h> +#include <mbstring.h> #include "resource.h" #include <commctrl.h> @@ -1653,7 +1654,7 @@ optlen = strlen(option); // ÅÌ':'ÌO̶ª¾Á½êA»êðsshvgRo[WÆÝÈ· - p = strchr(option, ':'); + p = _mbschr(option, ':'); switch (*(p-1)) { case '1': pvar->settings.ssh_protocol_version = 1; @@ -1667,15 +1668,15 @@ p += 3; // path part ðØèÌÄé - if ((p2 = strchr(p, '/')) != NULL) { + if ((p2 = _mbschr(p, '/')) != NULL) { *p2 = 0; } // '@'ª Á½êA»êæèOÍ[Uîñ - if ((p2 = strchr(p, '@')) != NULL) { + if ((p2 = _mbschr(p, '@')) != NULL) { *p2 = 0; // ':'È~ÍpX[h - if ((p3 = strchr(p, ':')) != NULL) { + if ((p3 = _mbschr(p, ':')) != NULL) { *p3 = 0; percent_decode(pvar->ssh2_password, sizeof(pvar->ssh2_password), p3 + 1); pvar->ssh2_autologin = 1; @@ -1694,9 +1695,9 @@ // |[gw誳¢Í":22"ð«· #ifndef NO_INET6 if (option[0] == '[' && option[hostlen-1] == ']' || // IPv6 raw address without port - option[0] != '[' && strchr(option, ':') == NULL) { // hostname or IPv4 raw address without port + option[0] != '[' && _mbschr(option, ':') == NULL) { // hostname or IPv4 raw address without port #else - if (strchr(option, ':') == NULL) { + if (_mbschr(option, ':') == NULL) { #endif /* NO_INET6 */ memcpy_s(option+hostlen, optlen-hostlen, ":22", 3); hostlen += 3; @@ -1709,7 +1710,7 @@ return OPTION_REPLACE; } - else if (strchr(option, '@') != NULL) { + else if (_mbschr(option, '@') != NULL) { // // user @ host `®ÌT|[g // æ覸sshÅÌÝT|[gÌ×A[U¼ÍttsshàÅ×·B @@ -1718,7 +1719,7 @@ // Tera Term{ÌÅ·éæ¤É·é\èB // char *p; - p = strchr(option, '@'); + p = _mbschr(option, '@'); *p = 0; strncpy_s(pvar->ssh2_username, sizeof(pvar->ssh2_username), option, _TRUNCATE);