• R/O
  • SSH
  • HTTPS

ttssh2: コミット


コミットメタ情報

リビジョン8626 (tree)
日時2020-03-27 00:39:40
作者zmatsuo

ログメッセージ

CInpDlg を unicode化

変更サマリ

差分

--- branches/unicode_macro/teraterm/ttpmacro/inpdlg.cpp (revision 8625)
+++ branches/unicode_macro/teraterm/ttpmacro/inpdlg.cpp (revision 8626)
@@ -40,8 +40,8 @@
4040 #include "inpdlg.h"
4141
4242 // CInpDlg dialog
43-CInpDlg::CInpDlg(TCHAR *Input, const TCHAR *Text, const TCHAR *Title,
44- const TCHAR *Default, BOOL Paswd,
43+CInpDlg::CInpDlg(wchar_t *Input, const wchar_t *Text, const wchar_t *Title,
44+ const wchar_t *Default, BOOL Paswd,
4545 int x, int y)
4646 {
4747 InputStr = Input;
@@ -68,11 +68,11 @@
6868 HWND HEdit, HOk;
6969
7070 SetDlgTexts(m_hWnd, TextInfos, _countof(TextInfos), UILanguageFile);
71- SetWindowText(TitleStr);
72- SetDlgItemText(IDC_INPTEXT,TextStr);
73- SetDlgItemText(IDC_INPEDIT,DefaultStr);
71+ SetWindowTextW(TitleStr);
72+ SetDlgItemTextW(IDC_INPTEXT,TextStr);
73+ SetDlgItemTextW(IDC_INPEDIT,DefaultStr);
7474
75- CalcTextExtent(GetDlgItem(IDC_INPTEXT), NULL, TextStr, &s);
75+ CalcTextExtentW(GetDlgItem(IDC_INPTEXT), NULL, TextStr, &s);
7676 TW = s.cx + s.cx/10;
7777 TH = s.cy;
7878
@@ -99,7 +99,7 @@
9999
100100 BOOL CInpDlg::OnOK()
101101 {
102- GetDlgItemText(IDC_INPEDIT,InputStr,MaxStrLen-1);
102+ GetDlgItemTextW(IDC_INPEDIT,InputStr,MaxStrLen-1);
103103 EndDialog(IDOK);
104104 return TRUE;
105105 }
--- branches/unicode_macro/teraterm/ttpmacro/inpdlg.h (revision 8625)
+++ branches/unicode_macro/teraterm/ttpmacro/inpdlg.h (revision 8626)
@@ -1,6 +1,6 @@
11 /*
22 * Copyright (C) 1994-1998 T. Teranishi
3- * (C) 2006-2019 TeraTerm Project
3+ * (C) 2006-2020 TeraTerm Project
44 * All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without
@@ -37,8 +37,8 @@
3737 class CInpDlg : public CMacroDlgBase
3838 {
3939 public:
40- CInpDlg(TCHAR *Input, const TCHAR *Text, const TCHAR *Title,
41- const TCHAR *Default, BOOL Paswd,
40+ CInpDlg(wchar_t *Input, const wchar_t *Text, const wchar_t *Title,
41+ const wchar_t *Default, BOOL Paswd,
4242 int x, int y);
4343 INT_PTR DoModal(HINSTANCE hInst, HWND hWndParent);
4444
@@ -45,10 +45,10 @@
4545 private:
4646 enum { IDD = IDD_INPDLG };
4747
48- TCHAR *InputStr;
49- const TCHAR *TextStr;
50- const TCHAR *TitleStr;
51- const TCHAR *DefaultStr;
48+ wchar_t *InputStr;
49+ const wchar_t *TextStr;
50+ const wchar_t *TitleStr;
51+ const wchar_t *DefaultStr;
5252 BOOL PaswdFlag;
5353 int init_WW, TW, TH, BH, BW, EW, EH;
5454 SIZE s;
--- branches/unicode_macro/teraterm/ttpmacro/ttl_gui.cpp (revision 8625)
+++ branches/unicode_macro/teraterm/ttpmacro/ttl_gui.cpp (revision 8626)
@@ -482,10 +482,10 @@
482482 Temp,_countof(Temp), tc::fromUtf8(Str));
483483 if (Temp[0]==0) // password not exist
484484 {
485-#if defined(UNICODE)
486- TCHAR input_string[MaxStrLen];
485+#if 1 //defined(UNICODE)
486+ wchar_t input_string[MaxStrLen];
487487 size_t Temp2_len = sizeof(Temp2);
488- OpenInpDlg(input_string, tc::fromUtf8(Str2), _T("Enter password"), _T(""), TRUE);
488+ OpenInpDlg(input_string, wc::fromUtf8(Str2), L"Enter password", L"", TRUE);
489489 WideCharToUTF8(input_string, NULL, Temp2, &Temp2_len);
490490 #else
491491 OpenInpDlg(Temp2, Str2, _T("Enter password"), _T(""), TRUE);
@@ -551,9 +551,9 @@
551551
552552 SetInputStr("");
553553 if (CheckVar("inputstr",&ValType,&VarId) && (ValType==TypString)) {
554-#if defined(UNICODE)
555- TCHAR input_string[MaxStrLen];
556- OpenInpDlg(input_string,tc::fromUtf8(Str1),tc::fromUtf8(Str2),tc::fromUtf8(Str3),Paswd);
554+#if 1 // defined(UNICODE)
555+ wchar_t input_string[MaxStrLen];
556+ OpenInpDlg(input_string,wc::fromUtf8(Str1),wc::fromUtf8(Str2),wc::fromUtf8(Str3),Paswd);
557557 char *output = StrVarPtr(VarId);
558558 size_t str_len = MaxStrLen;
559559 WideCharToUTF8(input_string, NULL, output, &str_len);
--- branches/unicode_macro/teraterm/ttpmacro/ttmbuff.c (revision 8625)
+++ branches/unicode_macro/teraterm/ttpmacro/ttmbuff.c (revision 8626)
@@ -1,6 +1,6 @@
11 /*
22 * Copyright (C) 1994-1998 T. Teranishi
3- * (C) 2005-2017 TeraTerm Project
3+ * (C) 2005-2020 TeraTerm Project
44 * All rights reserved.
55 *
66 * Redistribution and use in source and binary forms, with or without
@@ -140,8 +140,8 @@
140140
141141 BuffPtr[IBuff] = 0;
142142
143- Buff[IBuff] = LoadFileAA(FileName, &Len);
144-// Buff[IBuff] = LoadFileU8A(FileName, &Len);
143+// Buff[IBuff] = LoadFileAA(FileName, &Len);
144+ Buff[IBuff] = LoadFileU8A(FileName, &Len);
145145 if (Buff[IBuff] == NULL) {
146146 BuffLen[IBuff] = 0;
147147 return FALSE;
--- branches/unicode_macro/teraterm/ttpmacro/ttmdlg.cpp (revision 8625)
+++ branches/unicode_macro/teraterm/ttpmacro/ttmdlg.cpp (revision 8626)
@@ -221,8 +221,8 @@
221221 }
222222 }
223223
224-void OpenInpDlg(TCHAR *Buff, const TCHAR *Text, const TCHAR *Caption,
225- const TCHAR *Default, BOOL Paswd)
224+void OpenInpDlg(wchar_t *Buff, const wchar_t *Text, const wchar_t *Caption,
225+ const wchar_t *Default, BOOL Paswd)
226226 {
227227 HINSTANCE hInst = GetInstance();
228228 HWND hWndParent = GetHWND();
--- branches/unicode_macro/teraterm/ttpmacro/ttmdlg.h (revision 8625)
+++ branches/unicode_macro/teraterm/ttpmacro/ttmdlg.h (revision 8626)
@@ -40,8 +40,8 @@
4040 void ParseParam(PBOOL IOption, PBOOL VOption);
4141 BOOL GetFileName(HWND HWin);
4242 void SetDlgPos(int x, int y);
43-void OpenInpDlg(TCHAR *Input, const TCHAR *Text, const TCHAR *Caption,
44- const TCHAR *Default, BOOL Paswd);
43+void OpenInpDlg(wchar_t *Input, const wchar_t *Text, const wchar_t *Caption,
44+ const wchar_t *Default, BOOL Paswd);
4545 int OpenErrDlg(const char *Msg, const char *Line, int lineno, int start, int end, const char *FileName);
4646 int OpenMsgDlg(const wchar_t *Text, const wchar_t *Caption, BOOL YesNo);
4747 void OpenStatDlg(const TCHAR *Text, const TCHAR *Caption);
旧リポジトリブラウザで表示