From 5a17c9299e03bebf46169927abdeee34aaf8e854 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 10:06:32 +0000 Subject: replace strlen to mir_strlen git-svn-id: http://svn.miranda-ng.org/main/trunk@13747 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SendScreenshotPlus/src/CSend.cpp | 10 +++++----- plugins/SendScreenshotPlus/src/CSendFTPFile.cpp | 2 +- plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp | 2 +- plugins/SendScreenshotPlus/src/mir_string.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/SendScreenshotPlus') diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index bf0d97769d..e86b3ebd4d 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -454,7 +454,7 @@ void CSend::Exit(unsigned int Result) { const char* CSend::GetHTMLContent(char* str, const char* startTag, const char* endTag) { char* begin=strstr(str,startTag); if(!begin) return NULL; - begin+=strlen(startTag)-1; + begin+=mir_strlen(startTag)-1; for(; *begin!='>' && *begin; ++begin); if(*begin){ char* end=strstr(++begin,endTag); @@ -673,15 +673,15 @@ int CSend::HTTPFormCreate(NETLIBHTTPREQUEST* nlhr,int requestType,char* url,HTTP memset(dataPos,'-',2); dataPos+=2; memcpy(dataPos,boundary,sizeof(boundary)); dataPos+=sizeof(boundary); memcpy(dataPos,"\r\nContent-Disposition: form-data; name=\"",40); dataPos+=40; - size_t namelen=strlen(iter->name), valuelen; + size_t namelen=mir_strlen(iter->name), valuelen; if(!(iter->flags&HTTPFF_INT)) - valuelen=strlen(iter->value_str); + valuelen=mir_strlen(iter->value_str); if(iter->flags&HTTPFF_FILE){ const char* filename =strrchr(iter->value_str,'\\'); if(!filename) filename =strrchr(iter->value_str,'/'); if(!filename) filename =iter->value_str; else ++filename; - valuelen=strlen(filename); + valuelen=mir_strlen(filename); HTTPFormAppendData(nlhr,&dataMax,&dataPos,NULL,namelen+13+valuelen+17); memcpy(dataPos,iter->name,namelen); dataPos+=namelen; memcpy(dataPos,"\"; filename=\"",13); dataPos+=13; @@ -702,7 +702,7 @@ int CSend::HTTPFormCreate(NETLIBHTTPREQUEST* nlhr,int requestType,char* url,HTTP else if(!strcmp(fileext,".tif") || !strcmp(fileext,".tiff")) mime="image/tiff"; } - HTTPFormAppendData(nlhr,&dataMax,&dataPos,mime,strlen(mime)); + HTTPFormAppendData(nlhr,&dataMax,&dataPos,mime,mir_strlen(mime)); HTTPFormAppendData(nlhr,&dataMax,&dataPos,"\r\n\r\n",4); /// add file content size_t filesize=0; diff --git a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp index 115e777154..8c7aa8e51b 100644 --- a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp +++ b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp @@ -58,7 +58,7 @@ int CSendFTPFile::Send() ********************************************************************************************/ mir_free(m_pszFileName); m_pszFileName = GetFileNameA(m_pszFile); - size_t size = sizeof(char)*(strlen(m_pszFileName)+2); + size_t size = sizeof(char)*(mir_strlen(m_pszFileName)+2); m_pszFileName = (char*)mir_realloc(m_pszFileName, size); m_pszFileName[size-1] = NULL; diff --git a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp index 830ce71454..5f563b8005 100644 --- a/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp +++ b/plugins/SendScreenshotPlus/src/CSendHost_imgur.cpp @@ -72,7 +72,7 @@ void CSendHost_Imgur::SendThread(void* obj) mir_free(self->m_URL), self->m_URL=mir_strdup(buf); char* ext=strrchr(self->m_URL,'.'); if(ext){ - size_t thumblen=strlen(self->m_URL)+2; + size_t thumblen=mir_strlen(self->m_URL)+2; mir_free(self->m_URLthumb), self->m_URLthumb=(char*)mir_alloc(thumblen); thumblen=ext-self->m_URL; memcpy(self->m_URLthumb,self->m_URL,thumblen); diff --git a/plugins/SendScreenshotPlus/src/mir_string.cpp b/plugins/SendScreenshotPlus/src/mir_string.cpp index 59d5f7477b..f0c2414085 100644 --- a/plugins/SendScreenshotPlus/src/mir_string.cpp +++ b/plugins/SendScreenshotPlus/src/mir_string.cpp @@ -36,8 +36,8 @@ void mir_stradd(char* &pszDest, const char* pszSrc) if(!pszDest) pszDest = mir_strdup(pszSrc); else { - size_t lenDest = strlen(pszDest); - size_t lenSrc = strlen(pszSrc); + size_t lenDest = mir_strlen(pszDest); + size_t lenSrc = mir_strlen(pszSrc); size_t lenNew = lenDest + lenSrc + 1; pszDest = (char *) mir_realloc(pszDest, sizeof(char)* lenNew); -- cgit v1.2.3