svnno****@sourc*****
svnno****@sourc*****
2009年 11月 23日 (月) 15:15:47 JST
Revision: 3699 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3699 Author: maya Date: 2009-11-23 15:15:47 +0900 (Mon, 23 Nov 2009) Log Message: ----------- disconnect ãã¯ãã³ãã³ãã«ãTCP/IP æ¥ç¶åææã®ç¢ºèªãã¤ã¢ãã°ãå¶å¾¡ãããªãã·ã§ã³ã追å ããã Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/en/html/macro/command/disconnect.html trunk/doc/ja/html/about/history.html trunk/doc/ja/html/macro/command/disconnect.html trunk/teraterm/teraterm/ttdde.c trunk/teraterm/teraterm/vtwin.cpp trunk/teraterm/teraterm/vtwin.h trunk/teraterm/ttpmacro/ttl.c -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2009-11-23 05:11:28 UTC (rev 3698) +++ trunk/doc/en/html/about/history.html 2009-11-23 06:15:47 UTC (rev 3699) @@ -35,6 +35,7 @@ <li>Changes <ul> <!--li>R}hCÅ^uàp[^ÌæØèƵÄF¯·éæ¤Éµ½B</li--> + <!--li>}NR}h "<a href="../macro/command/disconnect.html">disconnect</a>" ÉATCP/IP Ú±ØfÌmF_CAOð§ä·éIvVðÇÁµ½B</li--> </ul> </li> Modified: trunk/doc/en/html/macro/command/disconnect.html =================================================================== --- trunk/doc/en/html/macro/command/disconnect.html 2009-11-23 05:11:28 UTC (rev 3698) +++ trunk/doc/en/html/macro/command/disconnect.html 2009-11-23 06:15:47 UTC (rev 3699) @@ -18,7 +18,7 @@ </p> <pre class="macro-syntax"> -disconnect +disconnect [<intval>] </pre> <h2>Remarks</h2> @@ -28,6 +28,11 @@ If Tera Term is not terminated by this command, the link between Tera Term and MACRO is kept. </p> +<!--p> +<intval> É 0 ªwè³êÄ¢éêÉÍATCP/IP Ú±ØfÌmF_CAOð\¦¹¸ÉÊMðI¹·éB<br> +<intval> ªwè³êĢȢ© 0 ÈOÌêÉÍATCP/IP Ú±ØfÌmF_CAOð\¦·éB +</p--> + <h2>See also</h2> <ul> Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2009-11-23 05:11:28 UTC (rev 3698) +++ trunk/doc/ja/html/about/history.html 2009-11-23 06:15:47 UTC (rev 3699) @@ -35,6 +35,7 @@ <li>ÏX <ul> <li>R}hCÅ^uàp[^ÌæØèƵÄF¯·éæ¤Éµ½B</li> + <li>}NR}h "<a href="../macro/command/disconnect.html">disconnect</a>" ÉATCP/IP Ú±ØfÌmF_CAOð§ä·éIvVðÇÁµ½B</li> </ul> </li> Modified: trunk/doc/ja/html/macro/command/disconnect.html =================================================================== --- trunk/doc/ja/html/macro/command/disconnect.html 2009-11-23 05:11:28 UTC (rev 3698) +++ trunk/doc/ja/html/macro/command/disconnect.html 2009-11-23 06:15:47 UTC (rev 3699) @@ -18,7 +18,7 @@ </p> <pre class="macro-syntax"> -disconnect +disconnect [<intval>] </pre> <h2>ðà</h2> @@ -28,6 +28,11 @@ ൱ÌR}hÉæÁÄ Tera Term ªI¹µÈ¯êÎATera Term Æ MACRO ÌÔÌNÍÛ³êéB </p> +<p> +<intval> É 0 ªwè³êÄ¢éêÉÍATCP/IP Ú±ØfÌmF_CAOð\¦¹¸ÉÊMðI¹·éB<br> +<intval> ªwè³êĢȢ© 0 ÈOÌêÉÍATCP/IP Ú±ØfÌmF_CAOð\¦·éB +</p> + <h2>QÆ</h2> <ul> Modified: trunk/teraterm/teraterm/ttdde.c =================================================================== --- trunk/teraterm/teraterm/ttdde.c 2009-11-23 05:11:28 UTC (rev 3698) +++ trunk/teraterm/teraterm/ttdde.c 2009-11-23 06:15:47 UTC (rev 3699) @@ -431,7 +431,12 @@ PostMessage(HVTWin,WM_USER_COMMSTART,0,0); break; case CmdDisconnect: - PostMessage(HVTWin,WM_USER_ACCELCOMMAND,IdCmdDisconnect,0); + if (ParamFileName[0] == '0') { + PostMessage(HVTWin,WM_USER_ACCELCOMMAND,IdCmdDisconnect,0); + } + else { + PostMessage(HVTWin,WM_USER_ACCELCOMMAND,IdCmdDisconnect,1); + } break; case CmdEnableKeyb: KeybEnabled = (ParamBinaryFlag!=0); Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2009-11-23 05:11:28 UTC (rev 3698) +++ trunk/teraterm/teraterm/vtwin.cpp 2009-11-23 06:15:47 UTC (rev 3699) @@ -1592,7 +1592,7 @@ OnEditPaste(); return TRUE; case ID_ACC_DISCONNECT: - OnFileDisconnect(); + Disconnect(TRUE); return TRUE; case ID_FILE_DUPLICATESESSION: // added DisableAcceleratorDuplicateSession (2009.4.6 maya) @@ -2975,7 +2975,7 @@ } break; case IdCmdDisconnect: // called by TTMACRO - OnFileDisconnect(); + Disconnect(lParam); break; case IdCmdLoadKeyMap: // called by TTMACRO SetKeyMap(); @@ -3868,24 +3868,31 @@ BuffPrint(FALSE); } -void CVTWindow::OnFileDisconnect() +void CVTWindow::Disconnect(BOOL confirm) { if (! cv.Ready) { return; } - get_lang_msg("MSG_DISCONNECT_CONF", ts.UIMsg, sizeof(ts.UIMsg), - "Disconnect?", ts.UILanguageFile); if ((cv.PortType==IdTCPIP) && ((ts.PortFlag & PF_CONFIRMDISCONN) != 0) && - (::MessageBox(HVTWin, ts.UIMsg, "Tera Term", - MB_OKCANCEL | MB_ICONEXCLAMATION | MB_DEFBUTTON2)==IDCANCEL)) { - return; + (confirm)) { + get_lang_msg("MSG_DISCONNECT_CONF", ts.UIMsg, sizeof(ts.UIMsg), + "Disconnect?", ts.UILanguageFile); + if (::MessageBox(HVTWin, ts.UIMsg, "Tera Term", + MB_OKCANCEL | MB_ICONEXCLAMATION | MB_DEFBUTTON2)==IDCANCEL) { + return; + } } ::PostMessage(HVTWin, WM_USER_COMMNOTIFY, 0, FD_CLOSE); } +void CVTWindow::OnFileDisconnect() +{ + Disconnect(TRUE); +} + void CVTWindow::OnFileExit() { OnClose(); Modified: trunk/teraterm/teraterm/vtwin.h =================================================================== --- trunk/teraterm/teraterm/vtwin.h 2009-11-23 05:11:28 UTC (rev 3698) +++ trunk/teraterm/teraterm/vtwin.h 2009-11-23 06:15:47 UTC (rev 3699) @@ -174,7 +174,8 @@ afx_msg void OnHelpUsing(); afx_msg void OnHelpAbout(); //}}AFX_MSG - DECLARE_MESSAGE_MAP(); + DECLARE_MESSAGE_MAP(); + void Disconnect(BOOL confirm); }; #endif Modified: trunk/teraterm/ttpmacro/ttl.c =================================================================== --- trunk/teraterm/ttpmacro/ttl.c 2009-11-23 05:11:28 UTC (rev 3698) +++ trunk/teraterm/ttpmacro/ttl.c 2009-11-23 06:15:47 UTC (rev 3699) @@ -684,6 +684,32 @@ return Err; } +WORD TTLDisconnect() +{ + WORD Err; + int Val = 1; + char Str[21]; + + Err = 0; + // get 1rd arg(optional) if given + if (CheckParameterGiven()) { + GetIntVal(&Val, &Err); + } + + if ((Err==0) && + (GetFirstChar()!=0)) + Err = ErrSyntax; + if ((Err==0) && (! Linked)) + Err = ErrLinkFirst; + if (Err==0) + { + _snprintf_s(Str,sizeof(Str),_TRUNCATE,"%d",Val); + SetFile(Str); + Err = SendCmnd(CmdDisconnect,0); + } + return Err; +} + WORD TTLDo() { WORD WId, Err; @@ -3806,7 +3832,7 @@ case RsvDelPassword: Err = TTLDelPassword(); break; case RsvDisconnect: - Err = TTLCommCmd(CmdDisconnect,0); break; + Err = TTLDisconnect(); break; case RsvDo: Err = TTLDo(); break; case RsvElse: