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/WebView | |
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/WebView')
-rw-r--r-- | plugins/WebView/src/webview_alerts.cpp | 6 | ||||
-rw-r--r-- | plugins/WebView/src/webview_cleanup.cpp | 34 | ||||
-rw-r--r-- | plugins/WebView/src/webview_datawnd.cpp | 2 | ||||
-rw-r--r-- | plugins/WebView/src/webview_getdata.cpp | 4 | ||||
-rw-r--r-- | plugins/WebView/src/webview_services.cpp | 4 |
5 files changed, 25 insertions, 25 deletions
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index ed6169c3d9..feffb27c1f 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -272,7 +272,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn memset(&tempraw, 0, sizeof(tempraw));
memset(&raw, 0, sizeof(raw));
- mir_strncpy(tempraw, truncated, SIZEOF(tempraw));
+ strncpy(tempraw, truncated, SIZEOF(tempraw));
memset(&alertstring, 0, sizeof(alertstring));
memset(&Alerttempstring, 0, sizeof(Alerttempstring));
@@ -562,7 +562,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn disalertpos = 0;
//write selected data to string
- mir_strncpy(raw, &tempraw[statalertpos], (statalertposend - statalertpos));
+ strncpy(raw, &tempraw[statalertpos], (statalertposend - statalertpos));
raw[(statalertposend - statalertpos)] = '\0';
}
} // end putting data into string
@@ -760,7 +760,7 @@ int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactn }
}
}
- mir_strncpy(truncated, tempraw, mir_strlen(truncated));
+ strncpy(truncated, tempraw, mir_strlen(truncated));
return wasAlert;
}
diff --git a/plugins/WebView/src/webview_cleanup.cpp b/plugins/WebView/src/webview_cleanup.cpp index b645cb5e5d..67a4ee5a1d 100644 --- a/plugins/WebView/src/webview_cleanup.cpp +++ b/plugins/WebView/src/webview_cleanup.cpp @@ -386,7 +386,7 @@ void CodetoSymbol(char *truncated) }
truncated[(position + counter) - 1] = Characters[n];
- mir_strncpy(&truncated[position], &truncated[position + mir_strlen(CharacterCodes[n])] - 1, mir_strlen(&truncated[position]) - 1);
+ strncpy(&truncated[position], &truncated[position + mir_strlen(CharacterCodes[n])] - 1, mir_strlen(&truncated[position]) - 1);
} // end does character code exist?
if (recpos == position)
@@ -407,7 +407,7 @@ void EraseBlock(char *truncated) char* tempraw = (char*)malloc(MAXSIZE1);
if (truncated)
- mir_strncpy(tempraw, truncated, MAXSIZE1);
+ strncpy(tempraw, truncated, MAXSIZE1);
// ///////////////////////////
@@ -584,7 +584,7 @@ void EraseBlock(char *truncated) positionStart = 0;
positionEnd = 0;
- mir_strncpy(truncated, tempraw, mir_strlen(truncated));
+ strncpy(truncated, tempraw, mir_strlen(truncated));
free(tempraw);
}
@@ -597,7 +597,7 @@ void EraseSymbols(char *truncated) char *tempraw = (char*)malloc(MAXSIZE1);
if (truncated)
- mir_strncpy(tempraw, truncated, MAXSIZE1);
+ strncpy(tempraw, truncated, MAXSIZE1);
// //////
while (true) {
@@ -625,7 +625,7 @@ void EraseSymbols(char *truncated) recpos = position;
}
- mir_strncpy(truncated, tempraw, mir_strlen(truncated));
+ strncpy(truncated, tempraw, mir_strlen(truncated));
free(tempraw);
}
@@ -640,7 +640,7 @@ void NumSymbols(char *truncated) char *tempraw = (char*)malloc(MAXSIZE1);
if (truncated)
- mir_strncpy(tempraw, truncated, MAXSIZE1);
+ strncpy(tempraw, truncated, MAXSIZE1);
while (true) {
Sleep(1); // avoid 100% CPU
@@ -678,7 +678,7 @@ void NumSymbols(char *truncated) recpos = position;
}
- mir_strncpy(truncated, tempraw, mir_strlen(truncated));
+ strncpy(truncated, tempraw, mir_strlen(truncated));
free(tempraw);
}
@@ -687,7 +687,7 @@ void FastTagFilter(char *truncated) {
char *tempraw = (char*)malloc(MAXSIZE1);
if (truncated)
- mir_strncpy(tempraw, truncated, MAXSIZE1);
+ strncpy(tempraw, truncated, MAXSIZE1);
for (int counter = 0; counter < mir_strlen(tempraw); counter++) {
if (tempraw[counter] == '<') {
@@ -703,7 +703,7 @@ void FastTagFilter(char *truncated) }
}
- mir_strncpy(truncated, tempraw, mir_strlen(truncated));
+ strncpy(truncated, tempraw, mir_strlen(truncated));
free(tempraw);
}
@@ -715,7 +715,7 @@ void RemoveInvis(char *truncated, int AmountWspcRem) char *tempraw = (char*)malloc(MAXSIZE1);
if (truncated)
- mir_strncpy(tempraw, truncated, MAXSIZE1);
+ strncpy(tempraw, truncated, MAXSIZE1);
switch (AmountWspcRem) {
case 1:
@@ -745,7 +745,7 @@ void RemoveInvis(char *truncated, int AmountWspcRem) tempraw[counter] = ' ';
} // end for
- mir_strncpy(truncated, tempraw, mir_strlen(truncated));
+ strncpy(truncated, tempraw, mir_strlen(truncated));
free(tempraw);
}
@@ -754,13 +754,13 @@ void RemoveTabs(char *truncated) {
char *tempraw = (char*)malloc(MAXSIZE1);
if (truncated)
- mir_strncpy(tempraw, truncated, MAXSIZE1);
+ strncpy(tempraw, truncated, MAXSIZE1);
for (int counter = 0; counter < mir_strlen(tempraw); counter++)
if (tempraw[counter] == '\t')
tempraw[counter] = ' ';
- mir_strncpy(truncated, tempraw, mir_strlen(truncated));
+ strncpy(truncated, tempraw, mir_strlen(truncated));
free(tempraw);
}
@@ -779,7 +779,7 @@ void Removewhitespace(char *truncated) counter2++;
pos2 = counter2;
- mir_strncpy(&truncated[pos1], &truncated[pos2], mir_strlen(&truncated[pos1]) - 1);
+ strncpy(&truncated[pos1], &truncated[pos2], mir_strlen(&truncated[pos1]) - 1);
} // end if
} // end for
}
@@ -788,11 +788,11 @@ void Removewhitespace(char *truncated) void Filter(char *truncated)
{
char tempraw[MAXSIZE1];
- mir_strncpy(tempraw, truncated, SIZEOF(tempraw));
+ strncpy(tempraw, truncated, SIZEOF(tempraw));
for (int counter = 0; counter < mir_strlen(tempraw); counter++)
if ((tempraw[counter] == '\n') || (tempraw[counter] == '\r') || (tempraw[counter] == '\t'))
- mir_strncpy(&tempraw[counter], &tempraw[counter + 1], mir_strlen(&tempraw[counter]) - 1);
+ strncpy(&tempraw[counter], &tempraw[counter + 1], mir_strlen(&tempraw[counter]) - 1);
- mir_strncpy(truncated, tempraw, mir_strlen(truncated));
+ strncpy(truncated, tempraw, mir_strlen(truncated));
}
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index eaa1728cc3..8857e78d1a 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -58,7 +58,7 @@ INT_PTR CALLBACK DlgProcFind(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara char *tempbuffer = (char*)malloc(len + 2);
GetDlgItemTextA(ParentHwnd, IDC_DATA, tempbuffer, len);
- mir_strncpy(buff, tempbuffer, SIZEOF(buff));
+ strncpy(buff, tempbuffer, SIZEOF(buff));
free(tempbuffer);
Filter(buff);
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp index 3c01680add..a542e21c0a 100644 --- a/plugins/WebView/src/webview_getdata.cpp +++ b/plugins/WebView/src/webview_getdata.cpp @@ -225,7 +225,7 @@ void GetData(void *param) }
dispos = 0;
- mir_strncpy(raw, &truncated2[statpos], MallocSize);
+ strncpy(raw, &truncated2[statpos], MallocSize);
raw[MallocSize] = '\0';
trunccount = 0;
@@ -334,7 +334,7 @@ void GetData(void *param) eventIndex = db_get_b(hContact, MODULENAME, EVNT_INDEX_KEY, 0);
if (eventIndex == 2) {
- mir_strncpy(buff, truncated, SIZEOF(buff));
+ strncpy(buff, truncated, SIZEOF(buff));
Filter(buff);
if (!db_get_s(hContact, MODULENAME, ALRT_S_STRING_KEY, &dbv)) {
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 36c4ceb4d2..77438d6ccc 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -172,7 +172,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam) return 0; TCHAR Cnick[200], *Oldnick; - mir_tstrncpy(Cnick, url, SIZEOF(Cnick)); + _tcsncpy(Cnick, url, SIZEOF(Cnick)); if ((Oldnick = _tcsstr(Cnick, _T("://"))) != 0) Oldnick += 3; else @@ -380,7 +380,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) //Convert url into a name for contact TCHAR Cnick[255]; if (psr->nick != NULL) - mir_tstrncpy(Cnick, psr->nick, SIZEOF(Cnick)); + _tcsncpy(Cnick, psr->nick, SIZEOF(Cnick)); else Cnick[0] = 0; |