summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/Sdk/InternetTime.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MRA/src/Sdk/InternetTime.h')
-rw-r--r--protocols/MRA/src/Sdk/InternetTime.h133
1 files changed, 0 insertions, 133 deletions
diff --git a/protocols/MRA/src/Sdk/InternetTime.h b/protocols/MRA/src/Sdk/InternetTime.h
index b226929299..c49333f98a 100644
--- a/protocols/MRA/src/Sdk/InternetTime.h
+++ b/protocols/MRA/src/Sdk/InternetTime.h
@@ -140,139 +140,6 @@ __inline BOOL WSP2SP(LPCSTR lpszBuff,size_t dwBuffSize,LPSTR lpszRetBuff,size_t
return(bRet);
}
-
-
-__inline BOOL HT2SP(LPCSTR lpszBuff,size_t dwBuffSize,LPSTR lpszRetBuff,size_t *pdwRetBuffSize)
-{// HT->SP
- BOOL bRet=TRUE;
-
- if (lpszBuff && dwBuffSize && lpszRetBuff)
- {
- LPSTR lpszCurReadPos,pHT,lpszCurWritePos;
- size_t dwToCopy,dwRetBuffSize;
-
- pHT=(LPSTR)lpszBuff;
- lpszCurReadPos=(LPSTR)lpszBuff;
- lpszCurWritePos=lpszRetBuff;
- dwRetBuffSize=0;
-
- while(pHT)
- {
- pHT=(LPSTR)MemoryFind((pHT-lpszBuff),lpszBuff,dwBuffSize,"\t",1);
- if (pHT)
- {
- dwToCopy=(pHT-lpszCurReadPos);
- pHT++;
-
- dwRetBuffSize+=(dwToCopy+1);
- memmove((LPVOID)lpszCurWritePos,(CONST VOID*)lpszCurReadPos,dwToCopy);
- lpszCurWritePos+=dwToCopy;
- lpszCurWritePos[0]=32;
- lpszCurWritePos++;
- lpszCurReadPos=pHT;
- }else{
- dwToCopy=((lpszBuff+dwBuffSize)-lpszCurReadPos);
- dwRetBuffSize+=dwToCopy;
- memmove((LPVOID)lpszCurWritePos,(CONST VOID*)lpszCurReadPos,dwToCopy);
- }
- }
-
- if (pdwRetBuffSize) (*pdwRetBuffSize)=dwRetBuffSize;
- }else{
- bRet=FALSE;
- }
-return(bRet);
-}
-
-
-
-
-__inline BOOL CleanUnneededSP(LPCSTR lpszBuff,size_t dwBuffSize,LPSTR lpszRetBuff,size_t *pdwRetBuffSize)
-{// nSP->SP, SPCRLF->CRLF, CRLFSP->CRLF
- BOOL bRet=TRUE;
-
- if (lpszBuff && dwBuffSize && lpszRetBuff)
- {
- LPSTR lpszCurReadPos,pSP,pSPStart,pSPEnd,lpszCurWritePos,pEnd;
- size_t dwToCopy,dwRetBuffSize;
-
- pSP=(LPSTR)lpszBuff;
- lpszCurReadPos=(LPSTR)lpszBuff;
- lpszCurWritePos=lpszRetBuff;
- pEnd=((LPSTR)lpszBuff+dwBuffSize);
- dwRetBuffSize=0;
-
- while(pSP)
- {
- pSP=(LPSTR)MemoryFind((pSP-lpszBuff),lpszBuff,dwBuffSize," ",1);
- if (pSP)
- {
- dwToCopy=(pSP-lpszCurReadPos);
- pSPStart=pSP;
- pSPEnd=pSP;
- while((*pSPEnd)==32 && pSPEnd<pEnd) pSPEnd++;
-
- // check SP on line start
- if ((pSPStart-1)>lpszBuff)
- {
- if ((*((WORD*)(pSPStart-2)))!=(*((WORD*)CRLF))) dwToCopy++;
- }else{// buff start
- if (pSPStart>lpszBuff) dwToCopy++;
- }
-
- // check SP on line end
- if ((pSPEnd+1)<=pEnd)
- {
- if ((*((WORD*)pSPEnd))!=(*((WORD*)CRLF))) dwToCopy++;
- }else{// buff start
- if (pSPEnd>lpszBuff) dwToCopy++;
- }
-
- memmove((LPVOID)lpszCurWritePos,(CONST VOID*)lpszCurReadPos,dwToCopy);
- lpszCurWritePos+=dwToCopy;
- dwRetBuffSize+=dwToCopy;
- lpszCurReadPos=pSPEnd;
- pSP=pSPEnd;
- }else{
- dwToCopy=((lpszBuff+dwBuffSize)-lpszCurReadPos);
- dwRetBuffSize+=dwToCopy;
- memmove((LPVOID)lpszCurWritePos,(CONST VOID*)lpszCurReadPos,dwToCopy);
- }
- }
-
- if (pdwRetBuffSize) (*pdwRetBuffSize)=dwRetBuffSize;
- }else{
- bRet=FALSE;
- }
-return(bRet);
-}
-
-
-
-
-__inline size_t CopyText(LPVOID lpOutBuff,LPCVOID lpcBuff,size_t dwLen)
-{
- size_t dwRet=0;
-
- if (lpOutBuff && lpcBuff && dwLen)
- {
- BYTE bt;
- LPBYTE lpbtIn=(LPBYTE)lpcBuff,lpbtOut=(LPBYTE)lpOutBuff;
-
- for(size_t i=dwLen;i;i--)
- {
- bt=(*(lpbtIn++));
- if (bt<127 && (bt>31 || bt==9 || bt==10 || bt==13))
- {
- (*(lpbtOut++))=bt;
- dwRet++;
- }
- }
- }
-return(dwRet);
-}
-
-
__inline void InternetTimeGetCurrentTime(INTERNET_TIME *pitTime)
{
TIME_ZONE_INFORMATION tzi={0};