diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-23 18:55:59 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-23 18:55:59 +0000 |
commit | 2a815f8820ca402626bd283dd5b75744ddeb9812 (patch) | |
tree | b230e7ac7d0330f5a1a0c8891d0a7dda9c5b47c6 /plugins/DbEditorPP | |
parent | 9a177a4e355c52775b580ad5687db2120f9282d5 (diff) |
mir_tstrncpy <> _tcsncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13791 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP')
-rw-r--r-- | plugins/DbEditorPP/src/copymodule.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/exportimport.cpp | 8 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/headers.h | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/main.cpp | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index c58d9b8cae..1e580ba6a4 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -127,7 +127,7 @@ void copyModuleMenuItem(char* module, MCONTACT hContact) {
ModuleAndContact *mac = (ModuleAndContact *)mir_calloc(sizeof(ModuleAndContact));
mac->hContact = hContact;
- mir_strncpy(mac->module, module, 255);
+ strncpy(mac->module, module, 255);
CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_COPY_MOD), 0, copyModDlgProc, (LPARAM)mac);
}
\ No newline at end of file diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index 99877ae7ce..9c07ce46b7 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -314,19 +314,19 @@ void importSettings(MCONTACT hContact, char *importstring) p2 = strrchr(&importstring[i], '}*');
if (p1 && p2 && p1 + 3 < p2 && p2 - p1 < SIZEOF(szUID)) {
- mir_strncpy(szUID, p1 + 1, p2 - p1 - 2);
+ strncpy(szUID, p1 + 1, p2 - p1 - 2);
p1 = strrchr(&importstring[i], ')*<');
p2 = strrchr(&importstring[i], '>*{');
if (p1 && p2 && p1 + 3 < p2 && p2 - p1 < SIZEOF(uid)) {
- mir_strncpy(uid, p1 + 1, p2 - p1 - 3);
+ strncpy(uid, p1 + 1, p2 - p1 - 3);
p1 = strrchr(&importstring[i], ' *(');
p2 = strrchr(&importstring[i], ')*<');
if (p1 && p2 && p1 + 3 < p2 && p2 - p1 < SIZEOF(szProto)) {
- mir_strncpy(szProto, p1 + 1, p2 - p1 - 3);
+ strncpy(szProto, p1 + 1, p2 - p1 - 3);
char *protouid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR)protouid != CALLSERVICE_NOTFOUND) {
@@ -558,7 +558,7 @@ void ImportSettingsFromFileMenuItem(MCONTACT hContact, char* FilePath) if (!mir_tstrcmp(szFileNames, "") == 0) {
if ((DWORD)mir_strlen(szFileNames) < offset) {
index += offset;
- mir_strncpy(szPath, szFileNames, offset);
+ strncpy(szPath, szFileNames, offset);
mir_strcat(szPath, "\\");
}
diff --git a/plugins/DbEditorPP/src/headers.h b/plugins/DbEditorPP/src/headers.h index 17f729c89b..425f14ec61 100644 --- a/plugins/DbEditorPP/src/headers.h +++ b/plugins/DbEditorPP/src/headers.h @@ -76,7 +76,7 @@ extern MCONTACT hRestore; #define WM_FINDITEM (WM_USER + 1) // onyl for the main window, wparam is ItemIfno* lparam is 0
#define mir_strlen(ptr) ((ptr == NULL) ? 0 : (int)mir_strlen(ptr))
-#define mir_strncpy(dst, src, len) mir_strncpy(dst, src, len)[len - 1] = 0;
+#define mir_strncpy(dst, src, len) strncpy(dst, src, len)[len - 1] = 0;
#define mir_strcmp(ptr1, ptr2) ((ptr1 && ptr2) ? mir_strcmp(ptr1, ptr2) : 1) // (ptr1||ptr2)
#define ListView_SetItemTextW(hwndLV, i, iSubItem_, pszText_) \
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index 25c8a7e647..b8b97cec80 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -258,7 +258,7 @@ int DBGetContactSettingStringStatic(MCONTACT hContact, char *szModule, char *szS {
DBVARIANT dbv;
if (!db_get(hContact, szModule, szSetting, &dbv)) {
- mir_strncpy(value, dbv.pszVal, maxLength);
+ strncpy(value, dbv.pszVal, maxLength);
db_free(&dbv);
return 1;
}
@@ -313,7 +313,7 @@ int GetValue(MCONTACT hContact, const char *szModule, const char *szSetting, cha if (Value && length >= 10 && !GetSetting(hContact, szModule, szSetting, &dbv)) {
switch (dbv.type) {
case DBVT_ASCIIZ:
- mir_strncpy(Value, dbv.pszVal, length);
+ strncpy(Value, dbv.pszVal, length);
break;
case DBVT_DWORD:
_itoa(dbv.dVal, Value, 10);
@@ -330,7 +330,7 @@ int GetValue(MCONTACT hContact, const char *szModule, const char *szSetting, cha WCHAR *wc = (WCHAR *)_alloca(len * sizeof(WCHAR));
MultiByteToWideChar(CP_UTF8, 0, dbv.pszVal, -1, wc, len);
WideCharToMultiByte(CP_ACP, 0, wc, -1, sz, len, NULL, NULL);
- mir_strncpy(Value, sz, length);
+ strncpy(Value, sz, length);
break;
}
|