From 159b565b390687258ee65a3b66596e118752063c Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 12:33:13 +0000 Subject: replace strcmp to mir_strcmp git-svn-id: http://svn.miranda-ng.org/main/trunk@13752 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HTTPServer/src/FileShareNode.cpp | 2 +- plugins/HTTPServer/src/GuiElements.cpp | 6 +++--- plugins/HTTPServer/src/HttpUser.cpp | 2 +- plugins/HTTPServer/src/IndexHTML.cpp | 30 +++++++++++++++--------------- plugins/HTTPServer/src/IndexXML.cpp | 4 ++-- plugins/HTTPServer/src/main.cpp | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) (limited to 'plugins/HTTPServer') diff --git a/plugins/HTTPServer/src/FileShareNode.cpp b/plugins/HTTPServer/src/FileShareNode.cpp index 3f344a35cf..a9675f49cf 100644 --- a/plugins/HTTPServer/src/FileShareNode.cpp +++ b/plugins/HTTPServer/src/FileShareNode.cpp @@ -299,7 +299,7 @@ bool CLFileShareNode::bAddUser(CLShareUser * pclUser) { // iterate through its users CLShareUser * pclCur = pclShare->pclCurrentUsers; while (pclCur) { - //strcmp(pclCur->szCurrentDLSrvPath, pclUser->szCurrentDLSrvPath) == 0) // same file + //mir_strcmp(pclCur->szCurrentDLSrvPath, pclUser->szCurrentDLSrvPath) == 0) // same file if (memcmp(&pclCur->stAddr, &pclUser->stAddr, sizeof(in_addr)) == 0) // same IP nUserConnectionCount++; diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index f4ccb99546..0af77ce591 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -286,8 +286,8 @@ UINT_PTR CALLBACK ShareNewFileDialogHook( char pszFileName[MAX_PATH]; GetWindowText(hFileName, pszFileName, SIZEOF(pszFileName)); - if (strcmp(pstShare->pszSrvPath, szSelection) && - strcmp(pszFileName, pszShareDirStr)) { + if (mir_strcmp(pstShare->pszSrvPath, szSelection) && + mir_strcmp(pszFileName, pszShareDirStr)) { // a file was selected // only reenable windows / set default values when a folder was selected before @@ -325,7 +325,7 @@ UINT_PTR CALLBACK ShareNewFileDialogHook( strcat(szSelection, "/"); // only write to IDC_SHARE_NAME when a file / other folder was selected before - if (!strcmp(szSelection, pstShare->pszSrvPath)) + if (!mir_strcmp(szSelection, pstShare->pszSrvPath)) return false; } diff --git a/plugins/HTTPServer/src/HttpUser.cpp b/plugins/HTTPServer/src/HttpUser.cpp index 03e6b50c53..c8f111d5c2 100644 --- a/plugins/HTTPServer/src/HttpUser.cpp +++ b/plugins/HTTPServer/src/HttpUser.cpp @@ -521,7 +521,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) { FileTimeToUnixTime(&stFileTime, <ime); strftime(szFileTime, sizeof(szFileTime), "%a, %d %b %Y %H:%M:%S GMT", gmtime(<ime)); - if (apszParam[eIfModifiedSince] && strcmp(apszParam[eIfModifiedSince], szFileTime) == 0) { + if (apszParam[eIfModifiedSince] && mir_strcmp(apszParam[eIfModifiedSince], szFileTime) == 0) { SendError(304, "Not Modified" ); return true; } diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp index 222e24b332..a37ef808db 100644 --- a/plugins/HTTPServer/src/IndexHTML.cpp +++ b/plugins/HTTPServer/src/IndexHTML.cpp @@ -93,19 +93,19 @@ bool LoadIndexHTMLTemplate() { *pszDestBuf = '#'; // signs below 32 are not used anyway - if (!strcmp(pszKeywordBegin, "End")) *pszDestBuf = SY_END; - else if (!strcmp(pszKeywordBegin, "ForDirectoriesDo")) *pszDestBuf = SY_FOR_DIRS; - else if (!strcmp(pszKeywordBegin, "DirectoryUrl")) *pszDestBuf = SY_DIR_URL; - else if (!strcmp(pszKeywordBegin, "DirectoryName")) *pszDestBuf = SY_DIR_NAME; - else if (!strcmp(pszKeywordBegin, "ForFilesDo")) *pszDestBuf = SY_FOR_FILES; - else if (!strcmp(pszKeywordBegin, "FileUrl")) *pszDestBuf = SY_FILE_URL; - else if (!strcmp(pszKeywordBegin, "FileName")) *pszDestBuf = SY_FILE_NAME; - else if (!strcmp(pszKeywordBegin, "FileSize")) *pszDestBuf = SY_FILE_SIZE; - else if (!strcmp(pszKeywordBegin, "FileCreated")) *pszDestBuf = SY_FILE_CREATE_TIME; - else if (!strcmp(pszKeywordBegin, "FileModified")) *pszDestBuf = SY_FILE_MODIFY_TIME; - else if (!strcmp(pszKeywordBegin, "IsEven")) *pszDestBuf = SY_IS_EVEN; - else if (!strcmp(pszKeywordBegin, "IsOdd")) *pszDestBuf = SY_IS_ODD; - else if (!strcmp(pszKeywordBegin, "IsFileType")) *pszDestBuf = SY_IS_FILE_TYPE; + if (!mir_strcmp(pszKeywordBegin, "End")) *pszDestBuf = SY_END; + else if (!mir_strcmp(pszKeywordBegin, "ForDirectoriesDo")) *pszDestBuf = SY_FOR_DIRS; + else if (!mir_strcmp(pszKeywordBegin, "DirectoryUrl")) *pszDestBuf = SY_DIR_URL; + else if (!mir_strcmp(pszKeywordBegin, "DirectoryName")) *pszDestBuf = SY_DIR_NAME; + else if (!mir_strcmp(pszKeywordBegin, "ForFilesDo")) *pszDestBuf = SY_FOR_FILES; + else if (!mir_strcmp(pszKeywordBegin, "FileUrl")) *pszDestBuf = SY_FILE_URL; + else if (!mir_strcmp(pszKeywordBegin, "FileName")) *pszDestBuf = SY_FILE_NAME; + else if (!mir_strcmp(pszKeywordBegin, "FileSize")) *pszDestBuf = SY_FILE_SIZE; + else if (!mir_strcmp(pszKeywordBegin, "FileCreated")) *pszDestBuf = SY_FILE_CREATE_TIME; + else if (!mir_strcmp(pszKeywordBegin, "FileModified")) *pszDestBuf = SY_FILE_MODIFY_TIME; + else if (!mir_strcmp(pszKeywordBegin, "IsEven")) *pszDestBuf = SY_IS_EVEN; + else if (!mir_strcmp(pszKeywordBegin, "IsOdd")) *pszDestBuf = SY_IS_ODD; + else if (!mir_strcmp(pszKeywordBegin, "IsFileType")) *pszDestBuf = SY_IS_FILE_TYPE; else { LogEvent("Error in index template", "Unknown Tag"); // unknown tag @@ -355,9 +355,9 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, } } - while (!strcmp(fdFindFileData.cFileName, ".") || + while (!mir_strcmp(fdFindFileData.cFileName, ".") || !strncmp(fdFindFileData.cFileName, "@", 1) || - (!strcmp(fdFindFileData.cFileName, "..") && !strcmp(pszSrvPath, "/")) || // hide .. in root + (!mir_strcmp(fdFindFileData.cFileName, "..") && !mir_strcmp(pszSrvPath, "/")) || // hide .. in root ((*pszPos == 19) == ((fdFindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0))) { if (!FindNextFile(hFind, &fdFindFileData)) { FindClose(hFind); diff --git a/plugins/HTTPServer/src/IndexXML.cpp b/plugins/HTTPServer/src/IndexXML.cpp index 99526c5d79..11ee766135 100644 --- a/plugins/HTTPServer/src/IndexXML.cpp +++ b/plugins/HTTPServer/src/IndexXML.cpp @@ -128,9 +128,9 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, // Find files and directories do { - if (strcmp(fdFindFileData.cFileName, ".") && + if (mir_strcmp(fdFindFileData.cFileName, ".") && strncmp(fdFindFileData.cFileName, "@", 1) && - (strcmp(fdFindFileData.cFileName, "..") || strcmp(pszSrvPath, "/"))) { // hide .. in root + (mir_strcmp(fdFindFileData.cFileName, "..") || mir_strcmp(pszSrvPath, "/"))) { // hide .. in root pszBuffer = szBuffer; strcpy(szFileName, fdFindFileData.cFileName); diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index 029bc234ba..d63307f5f4 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -486,7 +486,7 @@ static INT_PTR nGetShare(WPARAM /*wParam*/, LPARAM lParam) { STFileShareInfo * pclShare = (STFileShareInfo*)lParam; CLFileShareNode * pclCur = pclFirstNode; while (pclCur) { - if (strcmp(pclCur->st.pszSrvPath, pclShare->pszSrvPath) == 0) { + if (mir_strcmp(pclCur->st.pszSrvPath, pclShare->pszSrvPath) == 0) { if (pclShare->dwMaxRealPath <= mir_strlen(pclCur->st.pszRealPath) + 1) return 1003; strcpy(pclShare->pszRealPath, pclCur->st.pszRealPath); -- cgit v1.2.3