diff options
author | George Hazan <ghazan@miranda.im> | 2021-12-26 15:13:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-12-26 15:13:30 +0300 |
commit | d7e53c4d5a748d5ef8c934e90dc59ff23c667420 (patch) | |
tree | 2b0c16de953e182321a0314b6ce3b909f428731f /protocols/YAMN/src/mails | |
parent | 129687d805025b4e292174ffb3d224a55baf24d2 (diff) |
WCHAR -> wchar_t
Diffstat (limited to 'protocols/YAMN/src/mails')
-rw-r--r-- | protocols/YAMN/src/mails/decode.cpp | 20 | ||||
-rw-r--r-- | protocols/YAMN/src/mails/mime.cpp | 12 |
2 files changed, 16 insertions, 16 deletions
diff --git a/protocols/YAMN/src/mails/decode.cpp b/protocols/YAMN/src/mails/decode.cpp index 5ac1346c7c..39e04a0ba9 100644 --- a/protocols/YAMN/src/mails/decode.cpp +++ b/protocols/YAMN/src/mails/decode.cpp @@ -191,14 +191,14 @@ int DecodeBase64(char *Src,char *Dst,int DstLen); // stream- input string // cp- codepage of input string // out- pointer to new allocated memory that contains unicode string -int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out); +int ConvertStringToUnicode(char *stream,unsigned int cp,wchar_t **out); //Converts string from MIME header to unicode // stream- input string // cp- codepage of input string // storeto- pointer to memory that contains unicode string // mode- MIME_PLAIN or MIME_MAIL (MIME_MAIL deletes '"' from start and end of string) -void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode); +void ConvertCodedStringToUnicode(char *stream,wchar_t **storeto,DWORD cp,int mode); //-------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------- @@ -382,10 +382,10 @@ end: -int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out) +int ConvertStringToUnicode(char *stream,unsigned int cp,wchar_t **out) { CPINFO CPInfo; - WCHAR *temp,*src=*out,*dest; + wchar_t *temp,*src=*out,*dest; size_t outlen; int streamlen,Index; @@ -413,11 +413,11 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out) outlen=mir_wstrlen(*out); else outlen=0; - temp=new WCHAR[streamlen+outlen+1]; + temp=new wchar_t[streamlen+outlen+1]; if (*out != nullptr) { - for (dest=temp;*src != (WCHAR)0;src++,dest++) //copy old string from *out to temp + for (dest=temp;*src != (wchar_t)0;src++,dest++) //copy old string from *out to temp *dest=*src; // *dest++=L' '; //add space? delete[] *out; @@ -439,7 +439,7 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out) return 1; } -void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) +void ConvertCodedStringToUnicode(char *stream,wchar_t **storeto,DWORD cp,int mode) { char *start=stream,*finder,*finderend; char Encoding=0; @@ -448,7 +448,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) return; while(WS(start)) start++; - WCHAR *tempstore=nullptr; + wchar_t *tempstore=nullptr; if (!ConvertStringToUnicode(stream,cp,&tempstore))return; size_t tempstoreLength = mir_wstrlen(tempstore); @@ -530,10 +530,10 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) DecodedResult[len+1]=0; finderend++; } - WCHAR *oneWord=nullptr; + wchar_t *oneWord=nullptr; if (ConvertStringToUnicode(DecodedResult,cp,&oneWord)) { size_t len = mir_wstrlen(oneWord); - memcpy(&tempstore[outind],oneWord,len*sizeof(WCHAR)); + memcpy(&tempstore[outind],oneWord,len*sizeof(wchar_t)); outind += len; } delete oneWord; diff --git a/protocols/YAMN/src/mails/mime.cpp b/protocols/YAMN/src/mails/mime.cpp index 8db0b045d9..37afafc2d7 100644 --- a/protocols/YAMN/src/mails/mime.cpp +++ b/protocols/YAMN/src/mails/mime.cpp @@ -481,7 +481,7 @@ struct APartDataType BYTE TransEncType; //TE_something char *body; int bodyLen; - WCHAR *wBody; + wchar_t *wBody; }; @@ -567,16 +567,16 @@ void ParseAPart(APartDataType *data) //from decode.cpp int DecodeQuotedPrintable(char *Src, char *Dst, int DstLen, BOOL isQ); int DecodeBase64(char *Src, char *Dst, int DstLen); -int ConvertStringToUnicode(char *stream, unsigned int cp, WCHAR **out); +int ConvertStringToUnicode(char *stream, unsigned int cp, wchar_t **out); -WCHAR *ParseMultipartBody(char *src, char *bond) +wchar_t *ParseMultipartBody(char *src, char *bond) { char *srcback = _strdup(src); size_t sizebond = mir_strlen(bond); int numparts = 1; int i; char *courbond = srcback; - WCHAR *dest; + wchar_t *dest; for (; (courbond = strstr(courbond, bond)); numparts++, courbond += sizebond); APartDataType *partData = new APartDataType[numparts]; memset(partData, 0, sizeof(APartDataType)*numparts); @@ -637,7 +637,7 @@ FailBackRaw: }// if (partData[i].body) resultSize += 100 + 4 + 3; //cr+nl+100+ 3*bullet } - dest = new WCHAR[resultSize + 1]; + dest = new wchar_t[resultSize + 1]; size_t destpos = 0; for (i = 0; i < numparts; i++) { if (i) { // part before first boudary should not have headers @@ -673,7 +673,7 @@ FailBackRaw: } mir_snprintf(infoline + linesize, _countof(infoline) - linesize, ".\r\n"); { - WCHAR *temp = nullptr; + wchar_t *temp = nullptr; dest[destpos] = dest[destpos + 1] = dest[destpos + 2] = 0x2022; // bullet; destpos += 3; ConvertStringToUnicode(infoline, CP_ACP, &temp); |