diff options
Diffstat (limited to 'plugins/HTTPServer')
-rw-r--r-- | plugins/HTTPServer/src/GuiElements.cpp | 8 | ||||
-rw-r--r-- | plugins/HTTPServer/src/HttpUser.cpp | 4 | ||||
-rw-r--r-- | plugins/HTTPServer/src/IndexHTML.cpp | 14 | ||||
-rw-r--r-- | plugins/HTTPServer/src/IndexXML.cpp | 16 |
4 files changed, 21 insertions, 21 deletions
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index 74775c5f2f..b2b67837ee 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -493,7 +493,7 @@ bool bShowShareNewFileDlg(HWND hwndOwner, STFileShareInfo * pstNewShare) { *(end - (start - (pstNewShare->pszSrvPath+1)) ) = '\0';
int realPathLen = szRealDirectoryEnd - pstNewShare->pszRealPath;
- mir_strncpy(szRealDirectoryEnd, pstNewShare->pszSrvPath+1,
+ strncpy(szRealDirectoryEnd, pstNewShare->pszSrvPath+1,
pstNewShare->dwMaxRealPath - realPathLen - 1);
pstNewShare->pszRealPath[pstNewShare->dwMaxRealPath] = '\0';
@@ -792,7 +792,7 @@ static INT_PTR CALLBACK DlgProcStatsticView(HWND hwndDlg, UINT msg, WPARAM wPara szServPath[0] = '/';
char* fileName = strrchr(szDropedFile, '\\');
if (fileName)
- mir_strncpy(&szServPath[1], fileName+1, MAX_PATH-2);
+ strncpy(&szServPath[1], fileName+1, MAX_PATH-2);
if (CallService(MS_HTTP_ADD_CHANGE_REMOVE, 0, (LPARAM)&stNewShare)) {
MessageBox(NULL, TranslateT("Failed to share new file"), MSG_BOX_TITEL, MB_OK);
@@ -1429,8 +1429,8 @@ void ShowPopupWindow(const char * pszName, const char * pszText, COLORREF ColorB POPUPDATAT *pclData = new POPUPDATAT;
memset(pclData, 0, sizeof(POPUPDATAT));
pclData->lchIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
- mir_strncpy(pclData->lpzContactName, pszName, sizeof(pclData->lpzContactName) - 1); // -1 so that there aways will be a null termination !!
- mir_strncpy(pclData->lpzText, pszText, sizeof(pclData->lpzText) - 1);
+ strncpy(pclData->lpzContactName, pszName, sizeof(pclData->lpzContactName) - 1); // -1 so that there aways will be a null termination !!
+ strncpy(pclData->lpzText, pszText, sizeof(pclData->lpzText) - 1);
pclData->colorBack = ColorBack;
//ppd.colorText = colorText;
pclData->PluginWindowProc = PopupWindowProc;
diff --git a/plugins/HTTPServer/src/HttpUser.cpp b/plugins/HTTPServer/src/HttpUser.cpp index 4c5604ea07..e1398215bc 100644 --- a/plugins/HTTPServer/src/HttpUser.cpp +++ b/plugins/HTTPServer/src/HttpUser.cpp @@ -396,8 +396,8 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) { char* pszRealPath = pclCur->st.pszRealPath;
if (pclCur->bIsDirectory()) {
- mir_strncpy(szRealPath, pclCur->st.pszRealPath, MAX_PATH);
- mir_strncpy(szSrvPath, pclCur->st.pszSrvPath, MAX_PATH);
+ strncpy(szRealPath, pclCur->st.pszRealPath, MAX_PATH);
+ strncpy(szSrvPath, pclCur->st.pszSrvPath, MAX_PATH);
pszRealPath = szRealPath;
pszSrvPath = szSrvPath;
diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp index 3a0dc74c16..a2ae11602f 100644 --- a/plugins/HTTPServer/src/IndexHTML.cpp +++ b/plugins/HTTPServer/src/IndexHTML.cpp @@ -62,7 +62,7 @@ bool LoadIndexHTMLTemplate() { char szDestBuf[10000];
char* pszDestBuf = szDestBuf;
- mir_strncpy(pszBuf, szPluginPath, SIZEOF(szBuf)-1);
+ strncpy(pszBuf, szPluginPath, SIZEOF(szBuf)-1);
mir_strncat(pszBuf, szIndexHTMLTemplateFile, SIZEOF(szBuf) - mir_strlen(szBuf));
HANDLE hFile = CreateFile(pszBuf, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
@@ -139,7 +139,7 @@ bool LoadIndexHTMLTemplate() { do {
if (*pszBuf == ',') {
*pszBuf = ':';
- mir_strncpy(pszDestBuf, pszParameterBegin, MAX_PARAM_LENGTH);
+ strncpy(pszDestBuf, pszParameterBegin, MAX_PARAM_LENGTH);
pszDestBuf += MAX_PARAM_LENGTH;
pszParameterBegin = pszBuf + 1;
@@ -152,7 +152,7 @@ bool LoadIndexHTMLTemplate() { break;
*pszBuf = ':';
- mir_strncpy(pszDestBuf, pszParameterBegin, MAX_PARAM_LENGTH);
+ strncpy(pszDestBuf, pszParameterBegin, MAX_PARAM_LENGTH);
pszDestBuf += MAX_PARAM_LENGTH;
*pcParamCount = iParamCount;
@@ -283,7 +283,7 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, // check if directory exists
char szMask[MAX_PATH];
- mir_strncpy(szMask, pszRealPath, MAX_PATH- 1);
+ strncpy(szMask, pszRealPath, MAX_PATH- 1);
mir_strncat(szMask, "*", SIZEOF(szMask) - mir_strlen(szMask));
WIN32_FIND_DATAA fdFindFileData;
@@ -319,14 +319,14 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, bool bEvenOdd = 0;
bool bKnownFileType = false;
- mir_strncpy(szBuffer, pszSrvPath, SIZEOF(szBuffer)-1);
+ strncpy(szBuffer, pszSrvPath, SIZEOF(szBuffer)-1);
char* pszTemp = strrchr(szBuffer, '/');
if (pszTemp)
*pszTemp = '\0';
pszTemp = strrchr(szBuffer, '/');
if (pszTemp)
- mir_strncpy(szName, pszTemp + 1, SIZEOF(szName)-1);
+ strncpy(szName, pszTemp + 1, SIZEOF(szName)-1);
if (szName[0] == '\0')
mir_strcpy(szName, "my Miranda Webserver");
@@ -470,7 +470,7 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, } else {
for (byte i = 0; i < iParamCount; i++) {
char szParam[MAX_PARAM_LENGTH+1];
- mir_strncpy(szParam, pszParam, MAX_PARAM_LENGTH);
+ strncpy(szParam, pszParam, MAX_PARAM_LENGTH);
szParam[MAX_PARAM_LENGTH] = '\0';
char* pszTmp = strchr(szParam, ':');
if (pszTmp)
diff --git a/plugins/HTTPServer/src/IndexXML.cpp b/plugins/HTTPServer/src/IndexXML.cpp index d24f76a03e..7de9c2cc8b 100644 --- a/plugins/HTTPServer/src/IndexXML.cpp +++ b/plugins/HTTPServer/src/IndexXML.cpp @@ -32,7 +32,7 @@ static void ReplaceSign(char* pszSrc, int MaxLength, const char pszReplace, char* pszSign = strchr(pszSrc, pszReplace);
if (pszSign) {
- mir_strncpy(szBuffer, pszSrc, SIZEOF(szBuffer)-1);
+ strncpy(szBuffer, pszSrc, SIZEOF(szBuffer)-1);
do {
mir_strcpy(szBuffer + (pszSign - pszSrc), pszNew);
@@ -41,7 +41,7 @@ static void ReplaceSign(char* pszSrc, int MaxLength, const char pszReplace, } while (pszSign = strchr(pszSrc, pszReplace));
- mir_strncpy(pszSrc, szBuffer, MaxLength);
+ strncpy(pszSrc, szBuffer, MaxLength);
pszSrc[MaxLength-1] = '\0';
}
@@ -64,7 +64,7 @@ static void ReplaceSign(char* pszSrc, int MaxLength, const char pszReplace, bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath,
const char * pszSrvPath, DWORD dwRemoteIP) {
char szMask[MAX_PATH+1];
- mir_strncpy(szMask, pszRealPath, MAX_PATH);
+ strncpy(szMask, pszRealPath, MAX_PATH);
mir_strncat(szMask, "*", SIZEOF(szMask) - mir_strlen(szMask));
WIN32_FIND_DATAA fdFindFileData;
@@ -89,20 +89,20 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, DWORD dwBytesWritten = 0;
// Generate Dirname
- mir_strncpy(szBuffer, pszSrvPath, BUFFER_SIZE);
+ strncpy(szBuffer, pszSrvPath, BUFFER_SIZE);
char* pszTemp = strrchr(szBuffer, '/');
if (pszTemp)
*pszTemp = '\0';
pszTemp = strrchr(szBuffer, '/');
if (pszTemp)
- mir_strncpy(szFileName, pszTemp + 1, MAX_PATH);
+ strncpy(szFileName, pszTemp + 1, MAX_PATH);
// Write Header
WriteFile(hFile, szXmlHeader1, sizeof(szXmlHeader1) - 1, &dwBytesWritten, NULL);
// check if a index.xsl exists in the same directory otherwise use the global
- mir_strncpy(szMask, pszRealPath, MAX_PATH);
+ strncpy(szMask, pszRealPath, MAX_PATH);
mir_strncat(szMask, "index.xsl", SIZEOF(szMask) - mir_strlen(szMask));
HANDLE hFileExists = CreateFile(szMask, GENERIC_READ,
@@ -110,10 +110,10 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFileExists == INVALID_HANDLE_VALUE) {
- mir_strncpy(szBuffer, "/index.xsl", BUFFER_SIZE);
+ strncpy(szBuffer, "/index.xsl", BUFFER_SIZE);
} else {
CloseHandle(hFileExists);
- mir_strncpy(szBuffer, "index.xsl", BUFFER_SIZE);
+ strncpy(szBuffer, "index.xsl", BUFFER_SIZE);
}
WriteFile(hFile, szBuffer, (DWORD)mir_strlen(szBuffer), &dwBytesWritten, NULL);
|