diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-27 14:23:31 +0000 |
commit | 2f261839b60692e33d0e160344d0d636d49c90ba (patch) | |
tree | 187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/Exchange/src | |
parent | 2e931a0b2780587d85f3902468c935f5adba70c8 (diff) |
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Exchange/src')
-rw-r--r-- | plugins/Exchange/src/MirandaExchange.cpp | 42 | ||||
-rw-r--r-- | plugins/Exchange/src/dlg_handlers.cpp | 2 | ||||
-rw-r--r-- | plugins/Exchange/src/emails.cpp | 8 | ||||
-rw-r--r-- | plugins/Exchange/src/utils.cpp | 4 |
4 files changed, 28 insertions, 28 deletions
diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp index 346ca7471b..a60992410f 100644 --- a/plugins/Exchange/src/MirandaExchange.cpp +++ b/plugins/Exchange/src/MirandaExchange.cpp @@ -116,17 +116,17 @@ CKeeper::CKeeper( LPTSTR szSender, LPTSTR szSubject, LPSTR szEntryID) m_nSizeEntryID = 0 ;
if (NULL != szSender) {
- m_nSizeSender = (UINT)mir_tstrlen(szSender)+1;
+ m_nSizeSender = (UINT)mir_wstrlen(szSender)+1;
m_szSender = new wchar_t[ m_nSizeSender ];
memset(m_szSender, 0, m_nSizeSender * sizeof(wchar_t));
- mir_tstrcpy(m_szSender, szSender);
+ mir_wstrcpy(m_szSender, szSender);
}
if (NULL != szSubject) {
- m_nSizeSubject = (UINT)mir_tstrlen(szSubject) +1;
+ m_nSizeSubject = (UINT)mir_wstrlen(szSubject) +1;
m_szSubject = new wchar_t[m_nSizeSubject];
memset(m_szSubject, 0, m_nSizeSubject * sizeof(wchar_t));
- mir_tstrcpy(m_szSubject, szSubject);
+ mir_wstrcpy(m_szSubject, szSubject);
}
if (NULL != szEntryID) {
@@ -392,32 +392,32 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass short nSizeOfTCHAR = sizeof( wchar_t );
if (m_szUsername == NULL && NULL != szUsername) {
- nSize = (UINT)mir_tstrlen(szUsername);
+ nSize = (UINT)mir_wstrlen(szUsername);
if (nSize > 0) {
nSize++;
m_szUsername = new wchar_t[nSize];
memset ( m_szUsername, 0, nSize * nSizeOfTCHAR );
- mir_tstrcpy( m_szUsername, szUsername );
+ mir_wstrcpy( m_szUsername, szUsername );
}
}
if (m_szPassword == NULL && NULL != szPassword) {
- nSize = (UINT)mir_tstrlen(szPassword);
+ nSize = (UINT)mir_wstrlen(szPassword);
if (nSize > 0) {
nSize++;
m_szPassword = new wchar_t[nSize];
memset(m_szPassword, 0, nSize * nSizeOfTCHAR);
- mir_tstrcpy(m_szPassword, szPassword);
+ mir_wstrcpy(m_szPassword, szPassword);
}
}
if (m_szExchangeServer == NULL && NULL != szExchangeServer) {
- nSize = (UINT)mir_tstrlen(szExchangeServer);
+ nSize = (UINT)mir_wstrlen(szExchangeServer);
if (nSize > 0) {
nSize++;
m_szExchangeServer = new wchar_t[nSize];
memset(m_szExchangeServer, 0, nSize * nSizeOfTCHAR);
- mir_tstrcpy(m_szExchangeServer, szExchangeServer);
+ mir_wstrcpy(m_szExchangeServer, szExchangeServer);
}
}
@@ -436,7 +436,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass _wstrtime(szPID);
wcsncpy(szPIDandName, m_szUsername, _countof(szPIDandName)-1);
- mir_tstrncat(szPIDandName, szPID, _countof(szPIDandName) - mir_tstrlen(szPIDandName));
+ mir_wstrncat(szPIDandName, szPID, _countof(szPIDandName) - mir_wstrlen(szPIDandName));
hr = CreateProfile(szPIDandName);
if ( HR_FAILED(hr)) {
@@ -446,7 +446,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass DWORD dwFlags = MAPI_EXPLICIT_PROFILE|MAPI_EXTENDED|MAPI_NEW_SESSION|MAPI_NO_MAIL ;
- hr = MAPILogonEx( 0, (LPTSTR)mir_t2a(szPIDandName), (LPTSTR)mir_t2a(m_szPassword), dwFlags, &m_lpMAPISession );
+ hr = MAPILogonEx( 0, (LPTSTR)mir_u2a(szPIDandName), (LPTSTR)mir_u2a(m_szPassword), dwFlags, &m_lpMAPISession );
if (FAILED(hr)) {
//Log( L"MAPI Logon failed: 0x%08X", hr );
@@ -461,7 +461,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass //Log("Admin profile interface creation failed: 0x%08X", hr);
}
else {
- hr = pProfAdmin->DeleteProfile( (LPTSTR)mir_t2a(szPIDandName), 0 );
+ hr = pProfAdmin->DeleteProfile( (LPTSTR)mir_u2a(szPIDandName), 0 );
if ( FAILED(hr) )
{
//Log( "Failed to delete the profile: 0x%08X", hr );
@@ -527,13 +527,13 @@ HRESULT CMirandaExchange::CreateProfile( LPTSTR szProfileName ) hr = MAPIAdminProfiles(ulFlags, &pProfAdmin);
if (FAILED(hr) || pProfAdmin == NULL)
return hr;
- hr = pProfAdmin->CreateProfile((LPTSTR)mir_t2a(szProfileName), NULL, NULL, ulFlags);
+ hr = pProfAdmin->CreateProfile((LPTSTR)mir_u2a(szProfileName), NULL, NULL, ulFlags);
if (FAILED(hr)) {
- pProfAdmin->DeleteProfile((LPTSTR)mir_t2a(szProfileName), ulFlags);
+ pProfAdmin->DeleteProfile((LPTSTR)mir_u2a(szProfileName), ulFlags);
return hr;
}
- hr = pProfAdmin->AdminServices( (LPTSTR)mir_t2a(szProfileName), NULL, NULL, ulFlags, &pMsgSvcAdmin);
+ hr = pProfAdmin->AdminServices( (LPTSTR)mir_u2a(szProfileName), NULL, NULL, ulFlags, &pMsgSvcAdmin);
if (FAILED(hr) || pMsgSvcAdmin == NULL)
return hr;
@@ -562,7 +562,7 @@ HRESULT CMirandaExchange::CreateProfile( LPTSTR szProfileName ) if (FAILED(hr))
return hr;
- nSize = mir_tstrlen(m_szUsername);
+ nSize = mir_wstrlen(m_szUsername);
szUniqName = (wchar_t*)mir_alloc(sizeof(wchar_t) * (nSize + 4));
if (szUniqName != NULL) {
memcpy(szUniqName, L"=", sizeof(wchar_t));
@@ -570,9 +570,9 @@ HRESULT CMirandaExchange::CreateProfile( LPTSTR szProfileName ) // Set values for PR_PROFILE_UNRESOLVED_NAME and PR_PROFILE_UNRESOLVED_SERVER
SPropValue spval[2];
spval[0].ulPropTag = PR_PROFILE_UNRESOLVED_NAME;
- spval[0].Value.lpszA = mir_t2a(szUniqName);
+ spval[0].Value.lpszA = mir_u2a(szUniqName);
spval[1].ulPropTag = PR_PROFILE_UNRESOLVED_SERVER;
- spval[1].Value.lpszA = mir_t2a(m_szExchangeServer);
+ spval[1].Value.lpszA = mir_u2a(m_szExchangeServer);
// Configure msg service
/*hr =*/ pMsgSvcAdmin->ConfigureMsgService(
@@ -867,8 +867,8 @@ HRESULT CMirandaExchange::OpenTheMessage( LPTSTR ) if ( NULL != szTheEnd )
{
- szRegValue[ mir_tstrlen(szRegValue) - mir_tstrlen(szTheEnd) +5 ] = '\0';
- mir_tstrcat( szRegValue, L" /recycle" );
+ szRegValue[ mir_wstrlen(szRegValue) - mir_wstrlen(szTheEnd) +5 ] = '\0';
+ mir_wstrcat( szRegValue, L" /recycle" );
STARTUPINFO si;
PROCESS_INFORMATION pi;
diff --git a/plugins/Exchange/src/dlg_handlers.cpp b/plugins/Exchange/src/dlg_handlers.cpp index 4032a748e6..93e5cde48f 100644 --- a/plugins/Exchange/src/dlg_handlers.cpp +++ b/plugins/Exchange/src/dlg_handlers.cpp @@ -242,7 +242,7 @@ INT_PTR CALLBACK DlgProcEmails(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam item.pszText = email.szSender;
ListView_InsertItem(hList, &item);
ListView_SetItemText(hList, i, 1, email.szSubject);
- ListView_SetItemText(hList, i, 2, mir_a2t(email.emailID));
+ ListView_SetItemText(hList, i, 2, mir_a2u(email.emailID));
}
SetFocus(hList);
}
diff --git a/plugins/Exchange/src/emails.cpp b/plugins/Exchange/src/emails.cpp index f38bc7335c..5f22aa6a29 100644 --- a/plugins/Exchange/src/emails.cpp +++ b/plugins/Exchange/src/emails.cpp @@ -68,7 +68,7 @@ int CExchangeServer::Connect(int bForceConnect) GetStringFromDatabase("Server", L"", server, _countof(server));
int port = db_get_dw(NULL, ModuleName, "Port", EXCHANGE_PORT);
- if (mir_tstrlen(server) > 0) //only connect if there's a server to connect to
+ if (mir_wstrlen(server) > 0) //only connect if there's a server to connect to
return DoConnect(user, password, server, port);
_popupUtil(TranslateT("Server is not configured..."));
@@ -155,7 +155,7 @@ int CExchangeServer::IsServerAvailable() wchar_t szServer[1024];
GetStringFromDatabase("Server", L"", szServer, sizeof(szServer));
sockaddr_in addrServer;
- InitSocketAddr(&addrServer, mir_t2a(szServer));
+ InitSocketAddr(&addrServer, mir_u2a(szServer));
int res = connect(sServer, (sockaddr *) &addrServer, sizeof(addrServer));
int bAvailable = 0;
if (!res) {
@@ -279,9 +279,9 @@ int CExchangeServer::Check(int bNoEmailsNotify) if (((count > 0) || ((bNoEmailsNotify) && (count >= 0))) && (count != -1)) {
wchar_t buffer[1024];
if (count != 1)
- mir_sntprintf(buffer, TranslateT("You have %d unread emails..."), count);
+ mir_snwprintf(buffer, TranslateT("You have %d unread emails..."), count);
else
- mir_sntprintf(buffer, TranslateT("You have one unread email..."));
+ mir_snwprintf(buffer, TranslateT("You have one unread email..."));
ShowMessage(buffer, count);
}
diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp index 9b5204a0cb..e65843eb88 100644 --- a/plugins/Exchange/src/utils.cpp +++ b/plugins/Exchange/src/utils.cpp @@ -115,7 +115,7 @@ int GetStringFromDatabase(char *szSettingName, wchar_t *szError, wchar_t *szResu dbv.type = DBVT_ASCIIZ;
if (db_get_ts(NULL, ModuleName, szSettingName, &dbv) == 0) {
res = 0;
- size_t tmp = mir_tstrlen(dbv.ptszVal);
+ size_t tmp = mir_wstrlen(dbv.ptszVal);
size_t len = (tmp < size - 1) ? tmp : size - 1;
wcsncpy(szResult, dbv.ptszVal, len);
szResult[len] = '\0';
@@ -123,7 +123,7 @@ int GetStringFromDatabase(char *szSettingName, wchar_t *szError, wchar_t *szResu }
else {
res = 1;
- size_t tmp = mir_tstrlen(szError);
+ size_t tmp = mir_wstrlen(szError);
size_t len = (tmp < size - 1) ? tmp : size - 1;
wcsncpy(szResult, szError, len);
szResult[len] = '\0';
|