[Ttssh2-commit] [7695] ttpmacro/errdlg 仕様変更

scmno****@osdn***** scmno****@osdn*****
2019年 5月 20日 (月) 00:07:10 JST


Revision: 7695
          https://osdn.net/projects/ttssh2/scm/svn/commits/7695
Author:   zmatsuo
Date:     2019-05-20 00:07:10 +0900 (Mon, 20 May 2019)
Log Message:
-----------
ttpmacro/errdlg 仕様変更

Modified Paths:
--------------
    branches/cmake/teraterm/ttpmacro/errdlg.cpp
    branches/cmake/teraterm/ttpmacro/errdlg.h
    branches/cmake/teraterm/ttpmacro/ttmdlg.cpp
    branches/cmake/teraterm/ttpmacro/ttmdlg.h

-------------- next part --------------
Modified: branches/cmake/teraterm/ttpmacro/errdlg.cpp
===================================================================
--- branches/cmake/teraterm/ttpmacro/errdlg.cpp	2019-05-19 15:06:12 UTC (rev 7694)
+++ branches/cmake/teraterm/ttpmacro/errdlg.cpp	2019-05-19 15:07:10 UTC (rev 7695)
@@ -44,19 +44,20 @@
 #include <htmlhelp.h>
 #include "dlglib.h"
 #include "ttmacro.h"
+#include "codeconv.h"
 
 #include "errdlg.h"
 
-CErrDlg::CErrDlg(const TCHAR *Msg, const TCHAR *Line, int x, int y, int lineno, int start, int end, const TCHAR *FileName)
+CErrDlg::CErrDlg(const char *Msg, const char *Line, int x, int y, int lineno, int start, int end, const char *FileName)
 {
-	MsgStr = Msg;
-	LineStr = Line;
+	MsgStr = _tcsdup((tc)Msg);
+	LineStr = _tcsdup((tc)Line);
 	PosX = x;
 	PosY = y;
 	LineNo = lineno;
 	StartPos = start;
 	EndPos = end;
-	MacroFileName = FileName;
+	MacroFileName = _tcsdup((tc)FileName);
 }
 
 INT_PTR CErrDlg::DoModal()
@@ -130,3 +131,11 @@
 	}
 	return FALSE;
 }
+
+BOOL CErrDlg::OnClose()
+{
+	free((void *)MsgStr);
+	free((void *)LineStr);
+	free((void *)MacroFileName);
+	return FALSE;
+}

Modified: branches/cmake/teraterm/ttpmacro/errdlg.h
===================================================================
--- branches/cmake/teraterm/ttpmacro/errdlg.h	2019-05-19 15:06:12 UTC (rev 7694)
+++ branches/cmake/teraterm/ttpmacro/errdlg.h	2019-05-19 15:07:10 UTC (rev 7695)
@@ -35,7 +35,7 @@
 class CErrDlg : public TTCDialog
 {
 public:
-	CErrDlg(const TCHAR *Msg, const TCHAR *Line, int x, int y, int lineno, int start, int end, const TCHAR *FileName);
+	CErrDlg(const char *Msg, const char *Line, int x, int y, int lineno, int start, int end, const char *FileName);
 	INT_PTR DoModal();
 
 private:
@@ -51,4 +51,5 @@
 	virtual BOOL OnInitDialog();
 	BOOL OnCommand(WPARAM wp, LPARAM lp);
 	void OnBnClickedMacroerrhelp();
+	BOOL OnClose();
 };

Modified: branches/cmake/teraterm/ttpmacro/ttmdlg.cpp
===================================================================
--- branches/cmake/teraterm/ttpmacro/ttmdlg.cpp	2019-05-19 15:06:12 UTC (rev 7694)
+++ branches/cmake/teraterm/ttpmacro/ttmdlg.cpp	2019-05-19 15:07:10 UTC (rev 7695)
@@ -249,7 +249,7 @@
 	InpDlg.DoModal();
 }
 
-int OpenErrDlg(const TCHAR *Msg, const TCHAR *Line, int lineno, int start, int end, const TCHAR *FileName)
+int OpenErrDlg(const char *Msg, const char *Line, int lineno, int start, int end, const char *FileName)
 {
 	CErrDlg ErrDlg(Msg,Line,DlgPosX,DlgPosY, lineno, start, end, FileName);
 	return ErrDlg.DoModal();

Modified: branches/cmake/teraterm/ttpmacro/ttmdlg.h
===================================================================
--- branches/cmake/teraterm/ttpmacro/ttmdlg.h	2019-05-19 15:06:12 UTC (rev 7694)
+++ branches/cmake/teraterm/ttpmacro/ttmdlg.h	2019-05-19 15:07:10 UTC (rev 7695)
@@ -42,7 +42,7 @@
 void SetDlgPos(int x, int y);
 void OpenInpDlg(TCHAR *Input, const TCHAR *Text, const TCHAR *Caption,
                 const TCHAR *Default, BOOL Paswd);
-int OpenErrDlg(const TCHAR *Msg, const TCHAR *Line, int lineno, int start, int end, const TCHAR *FileName);
+int OpenErrDlg(const char *Msg, const char *Line, int lineno, int start, int end, const char *FileName);
 int OpenMsgDlg(const TCHAR *Text, const TCHAR *Caption, BOOL YesNo);
 void OpenStatDlg(const TCHAR *Text, const TCHAR *Caption);
 void CloseStatDlg();


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