summaryrefslogtreecommitdiff
path: root/plugins/New_GPG/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/New_GPG/src')
-rwxr-xr-xplugins/New_GPG/src/main.cpp12
-rwxr-xr-xplugins/New_GPG/src/messages.cpp6
-rwxr-xr-xplugins/New_GPG/src/options.cpp2
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp8
4 files changed, 14 insertions, 14 deletions
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index a0d0d2b547..872fa7b141 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -2050,7 +2050,7 @@ void InitCheck()
if(!home_dir_access || !temp_access || !gpg_valid)
{
TCHAR buf[4096];
- mir_tstrncpy(buf, gpg_valid?TranslateT("GPG binary is set and valid (this is good).\n"):TranslateT("GPG binary unset or invalid (plugin will not work).\n"), SIZEOF(buf));
+ _tcsncpy(buf, gpg_valid?TranslateT("GPG binary is set and valid (this is good).\n"):TranslateT("GPG binary unset or invalid (plugin will not work).\n"), SIZEOF(buf));
mir_tstrncat(buf, home_dir_access?TranslateT("Home dir write access granted (this is good).\n"):TranslateT("Home dir has no write access (plugin most probably will not work).\n"), SIZEOF(buf) - mir_tstrlen(buf));
mir_tstrncat(buf, temp_access?TranslateT("Temp dir write access granted (this is good).\n"):TranslateT("Temp dir has no write access (plugin should work, but may have some problems, file transfers will not work)."), SIZEOF(buf) - mir_tstrlen(buf));
if(!gpg_valid)
@@ -2246,8 +2246,8 @@ void InitCheck()
ICQ_CUSTOMCAP cap;
cap.cbSize = sizeof(ICQ_CUSTOMCAP);
cap.hIcon = 0;
- mir_strncpy(cap.name, "GPG Key AutoExchange", MAX_CAPNAME);
- mir_strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps));
+ strncpy(cap.name, "GPG Key AutoExchange", MAX_CAPNAME);
+ strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps));
for(int i = 0; i < count; i++)
if( ProtoServiceExists(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY))
@@ -2261,8 +2261,8 @@ void InitCheck()
ICQ_CUSTOMCAP cap;
cap.cbSize = sizeof(ICQ_CUSTOMCAP);
cap.hIcon = 0;
- mir_strncpy(cap.name, "GPG Encrypted FileTransfers", MAX_CAPNAME);
- mir_strncpy(cap.caps, "GPGFileTransfer", sizeof(cap.caps));
+ strncpy(cap.name, "GPG Encrypted FileTransfers", MAX_CAPNAME);
+ strncpy(cap.caps, "GPGFileTransfer", sizeof(cap.caps));
for(int i = 0; i < count; i++)
if( ProtoServiceExists(accounts[i]->szProtoName, PS_ICQ_ADDCAPABILITY))
@@ -2302,7 +2302,7 @@ void ImportKey()
DWORD exitcode;
{
ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
- mir_tstrncpy(tmp2, ptmp, MAX_PATH-1);
+ _tcsncpy(tmp2, ptmp, MAX_PATH-1);
mir_free(ptmp);
mir_tstrncat(tmp2, _T("\\"), SIZEOF(tmp2) - mir_tstrlen(tmp2));
mir_tstrncat(tmp2, _T("temporary_exported.asc"), SIZEOF(tmp2) - mir_tstrlen(tmp2));
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index 5cd4560bf6..3c6f993507 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -538,7 +538,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l)
if(uin) {
if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) {
ICQ_CUSTOMCAP cap = {0};
- mir_strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps));
+ strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps));
if(ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap)) {
CallContactService(ccs->hContact, PSS_MESSAGE, 0, (LPARAM)"-----PGP KEY REQUEST-----");
return 0;
@@ -835,7 +835,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(bDebugLog)
debuglog<<std::string(time_str()+": info(autoexchange, icq): checking for autoexchange icq capability, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
ICQ_CUSTOMCAP cap = {0};
- mir_strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps));
+ strncpy(cap.caps, "GPGAutoExchange", sizeof(cap.caps));
if( ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, hContact, (LPARAM)&cap)) {
if(bDebugLog)
debuglog<<std::string(time_str()+": info(autoexchange, icq): sending key requiest, name: "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR)));
@@ -917,7 +917,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
if(!(dbei->flags & DBEF_SENT) && db_mc_isMeta((MCONTACT)w))
{
char tmp[29];
- mir_strncpy(tmp, (char*)dbei->pBlob, 27);
+ strncpy(tmp, (char*)dbei->pBlob, 27);
tmp[28] = '\0';
if(strstr(tmp, "-----BEGIN PGP MESSAGE-----"))
{
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index d68030b79c..3973d1cd39 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -903,7 +903,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam
{
MCONTACT hcnt = db_mc_tryMeta(hContact);
ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
- mir_tstrncpy(tmp2, ptmp, MAX_PATH-1);
+ _tcsncpy(tmp2, ptmp, MAX_PATH-1);
mir_free(ptmp);
mir_tstrncat(tmp2, _T("\\"), SIZEOF(tmp2) - mir_tstrlen(tmp2));
mir_tstrncat(tmp2, _T("temporary_exported.asc"), SIZEOF(tmp2) - mir_tstrlen(tmp2));
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index a12d88d256..a4d4077ac8 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -61,14 +61,14 @@ void GetFilePath(TCHAR *WindowTittle, char *szSetting, TCHAR *szExt, TCHAR *szEx
ofn.lStructSize=CDSIZEOF_STRUCT(OPENFILENAME,lpTemplateName);
ofn.Flags=OFN_EXPLORER;
ofn.lpstrTitle=TranslateW(WindowTittle);
- mir_tstrncpy(filter,TranslateW(szExtDesc), SIZEOF(filter)-1);
+ _tcsncpy(filter,TranslateW(szExtDesc), SIZEOF(filter)-1);
pfilter=filter+mir_tstrlen(filter)+1;
mir_tstrcpy(pfilter, szExt);
pfilter[mir_tstrlen(pfilter)+1] = '\0';
pfilter[mir_tstrlen(pfilter)+2] = '\0';
ofn.lpstrFilter=filter;
tmp = UniGetContactSettingUtf(0, szGPGModuleName, szSetting, _T(""));
- mir_tstrncpy(str, tmp, SIZEOF(str)-1);
+ _tcsncpy(str, tmp, SIZEOF(str)-1);
mir_free(tmp);
if(mir_tstrlen(str)< 2)
str[0] = '\0';
@@ -544,7 +544,7 @@ INT_PTR onSendFile(WPARAM w, LPARAM l)
if( ProtoServiceExists(proto, PS_ICQ_CHECKCAPABILITY)) {
supported_proto = true;
ICQ_CUSTOMCAP cap = {0};
- mir_strncpy(cap.caps, "GPGFileTransfer",sizeof(cap.caps));
+ strncpy(cap.caps, "GPGFileTransfer",sizeof(cap.caps));
if( ProtoCallService(proto, PS_ICQ_CHECKCAPABILITY, (WPARAM)ccs->hContact, (LPARAM)&cap))
cap_found = true;
}
@@ -1859,7 +1859,7 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l)
DWORD exitcode;
{
ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
- mir_tstrncpy(tmp2, ptmp, MAX_PATH-1);
+ _tcsncpy(tmp2, ptmp, MAX_PATH-1);
mir_free(ptmp);
mir_tstrncat(tmp2, _T("\\"), SIZEOF(tmp2) - mir_tstrlen(tmp2));
mir_tstrncat(tmp2, _T("temporary_exported.asc"), SIZEOF(tmp2) - mir_tstrlen(tmp2));