summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/MString.cpp2
-rw-r--r--protocols/JabberG/MString.h136
-rw-r--r--protocols/JabberG/jabber_adhoc.cpp2
-rw-r--r--protocols/JabberG/jabber_captcha.cpp8
-rw-r--r--protocols/JabberG/jabber_events.cpp2
-rw-r--r--protocols/JabberG/jabber_iq_handlers.cpp30
-rw-r--r--protocols/JabberG/jabber_iqid.cpp2
-rw-r--r--protocols/JabberG/jabber_iqid_muc.cpp2
-rw-r--r--protocols/JabberG/jabber_list.cpp4
-rw-r--r--protocols/JabberG/jabber_opt.cpp2
-rw-r--r--protocols/JabberG/jabber_privacy.cpp2
-rw-r--r--protocols/JabberG/jabber_proto.cpp6
-rw-r--r--protocols/JabberG/jabber_proxy.cpp16
-rw-r--r--protocols/JabberG/jabber_search.h4
-rw-r--r--protocols/JabberG/jabber_svc.cpp2
-rw-r--r--protocols/JabberG/jabber_thread.cpp2
-rw-r--r--protocols/JabberG/jabber_vcard.cpp4
-rw-r--r--protocols/JabberG/jabber_xstatus.cpp6
18 files changed, 116 insertions, 116 deletions
diff --git a/protocols/JabberG/MString.cpp b/protocols/JabberG/MString.cpp
index 524231fde2..773871d1a5 100644
--- a/protocols/JabberG/MString.cpp
+++ b/protocols/JabberG/MString.cpp
@@ -75,7 +75,7 @@ bool CMStringData::IsShared() const
void CMStringData::Lock()
{
nRefs--; // Locked buffers can't be shared, so no interlocked operation necessary
- if( nRefs == 0 )
+ if ( nRefs == 0 )
nRefs = -1;
}
diff --git a/protocols/JabberG/MString.h b/protocols/JabberG/MString.h
index fbef22ddf5..6f90b7741b 100644
--- a/protocols/JabberG/MString.h
+++ b/protocols/JabberG/MString.h
@@ -126,7 +126,7 @@ public:
CMSimpleStringT(const XCHAR* pchSrc, int nLength)
{
CMStringData* pData = Allocate( nLength, sizeof( XCHAR ) );
- if( pData != NULL )
+ if ( pData != NULL )
{
Attach( pData );
SetLength( nLength );
@@ -148,9 +148,9 @@ public:
{
CMStringData* pSrcData = strSrc.GetData();
CMStringData* pOldData = GetData();
- if( pSrcData != pOldData)
+ if ( pSrcData != pOldData)
{
- if( pOldData->IsLocked() )
+ if ( pOldData->IsLocked() )
SetString( strSrc.GetString(), strSrc.GetLength() );
else
{
@@ -238,7 +238,7 @@ public:
int nNewLength = nOldLength+nLength;
PXSTR pszBuffer = GetBuffer( nNewLength );
- if( nOffset <= nOldLength )
+ if ( nOffset <= nOldLength )
{
pszSrc = pszBuffer+nOffset;
// No need to call CopyCharsOverlapped, since the destination is
@@ -262,10 +262,10 @@ public:
void Empty()
{
CMStringData* pOldData = GetData();
- if( pOldData->nDataLength == 0 )
+ if ( pOldData->nDataLength == 0 )
return;
- if( pOldData->IsLocked() )
+ if ( pOldData->IsLocked() )
{
// Don't reallocate a locked buffer that's shrinking
SetLength( 0 );
@@ -281,13 +281,13 @@ public:
{
CMStringData* pOldData = GetData();
int nLength = pOldData->nDataLength;
- if( pOldData->nAllocLength == nLength )
+ if ( pOldData->nAllocLength == nLength )
return;
- if( !pOldData->IsLocked() ) // Don't reallocate a locked buffer that's shrinking
+ if ( !pOldData->IsLocked() ) // Don't reallocate a locked buffer that's shrinking
{
CMStringData* pNewData = Allocate( nLength, sizeof( XCHAR ) );
- if( pNewData == NULL ) {
+ if ( pNewData == NULL ) {
SetLength( nLength );
return;
}
@@ -311,7 +311,7 @@ public:
PXSTR GetBuffer()
{
CMStringData* pData = GetData();
- if( pData->IsShared() )
+ if ( pData->IsShared() )
Fork( pData->nDataLength );
return m_pszData;
@@ -343,7 +343,7 @@ public:
PXSTR LockBuffer()
{
CMStringData* pData = GetData();
- if( pData->IsShared() )
+ if ( pData->IsShared() )
{
Fork( pData->nDataLength );
pData = GetData(); // Do it again, because the fork might have changed it
@@ -363,7 +363,7 @@ public:
}
void ReleaseBuffer( int nNewLength = -1 )
{
- if( nNewLength == -1 )
+ if ( nNewLength == -1 )
{
int nAlloc = GetData()->nAllocLength;
nNewLength = StringLengthN( m_pszData, nAlloc);
@@ -393,7 +393,7 @@ public:
}
void SetString( PCXSTR pszSrc, int nLength )
{
- if( nLength == 0 )
+ if ( nLength == 0 )
{
Empty();
}
@@ -404,7 +404,7 @@ public:
UINT_PTR nOffset = pszSrc - GetString();
PXSTR pszBuffer = GetBuffer( nLength );
- if( nOffset <= nOldLength )
+ if ( nOffset <= nOldLength )
{
CopyCharsOverlapped( pszBuffer, GetAllocLength(),
pszBuffer+nOffset, nLength );
@@ -492,14 +492,14 @@ public:
}
static int __stdcall StringLengthN(const char* psz, size_t sizeInXChar )
{
- if( psz == NULL )
+ if ( psz == NULL )
return 0;
return int( strnlen( psz, sizeInXChar ));
}
static int __stdcall StringLengthN(const wchar_t* psz, size_t sizeInXChar )
{
- if( psz == NULL )
+ if ( psz == NULL )
return 0;
return int( wcsnlen( psz, sizeInXChar ));
@@ -561,12 +561,12 @@ private:
{
// Grow exponentially, until we hit 1K.
int nNewLength = pOldData->nAllocLength;
- if( nNewLength > 1024 )
+ if ( nNewLength > 1024 )
nNewLength += 1024;
else
nNewLength *= 2;
- if( nNewLength < nLength )
+ if ( nNewLength < nLength )
nNewLength = nLength;
Reallocate( nNewLength );
@@ -579,7 +579,7 @@ private:
return;
CMStringData* pNewData = Realloc( pOldData, nLength, sizeof( XCHAR ) );
- if( pNewData != NULL )
+ if ( pNewData != NULL )
Attach( pNewData );
}
@@ -816,7 +816,7 @@ public:
{
int nLen = ::MultiByteToWideChar( _AtlGetConversionACP(), 0, pchData, nDataLength, NULL, NULL );
BSTR bstr = ::SysAllocStringLen( NULL, nLen );
- if( bstr != NULL )
+ if ( bstr != NULL )
::MultiByteToWideChar( _AtlGetConversionACP(), 0, pchData, nDataLength, bstr, nLen );
return bstr;
@@ -826,7 +826,7 @@ public:
{
int nLen = ::MultiByteToWideChar( _AtlGetConversionACP(), 0, pchData, nDataLength, NULL, NULL );
BOOL bSuccess = ::SysReAllocStringLen( pbstr, NULL, nLen );
- if( bSuccess )
+ if ( bSuccess )
::MultiByteToWideChar( _AtlGetConversionACP(), 0, pchData, nDataLength, *pbstr, nLen );
return bSuccess;
@@ -1030,7 +1030,7 @@ public:
static void __stdcall FloodCharacters( wchar_t ch, int nLength, LPWSTR psz )
{
// nLength is in XCHARs
- for( int i = 0; i < nLength; i++ )
+ for ( int i = 0; i < nLength; i++ )
{
psz[i] = ch;
}
@@ -1144,7 +1144,7 @@ public:
CMStringT( char ch, int nLength = 1 ) :
CThisSimpleString()
{
- if( nLength > 0 )
+ if ( nLength > 0 )
{
PXSTR pszBuffer = this->GetBuffer( nLength );
StringTraits::FloodCharacters( XCHAR( ch ), nLength, pszBuffer );
@@ -1155,7 +1155,7 @@ public:
CMStringT( wchar_t ch, int nLength = 1 ) :
CThisSimpleString()
{
- if( nLength > 0 )
+ if ( nLength > 0 )
{
//Convert ch to the BaseType
wchar_t pszCh[2] = { ch , 0 };
@@ -1198,7 +1198,7 @@ public:
CMStringT( const YCHAR* pch, int nLength ) :
CThisSimpleString()
{
- if( nLength > 0 )
+ if ( nLength > 0 )
{
int nDestLength = StringTraits::GetBaseTypeLength( pch, nLength );
PXSTR pszBuffer = this->GetBuffer( nDestLength );
@@ -1231,7 +1231,7 @@ public:
{
// nDestLength is in XCHARs
int nDestLength = (pszSrc != NULL) ? StringTraits::GetBaseTypeLength( pszSrc ) : 0;
- if( nDestLength > 0 )
+ if ( nDestLength > 0 )
{
PXSTR pszBuffer = this->GetBuffer( nDestLength );
StringTraits::ConvertToBaseType( pszBuffer, nDestLength, pszSrc);
@@ -1345,18 +1345,18 @@ public:
// Delete 'nCount' characters, starting at index 'iIndex'
int Delete( int iIndex, int nCount = 1 )
{
- if( iIndex < 0 )
+ if ( iIndex < 0 )
iIndex = 0;
- if( nCount < 0 )
+ if ( nCount < 0 )
nCount = 0;
int nLength = this->GetLength();
- if( nCount + iIndex > nLength )
+ if ( nCount + iIndex > nLength )
{
nCount = nLength-iIndex;
}
- if( nCount > 0 )
+ if ( nCount > 0 )
{
int nNewLength = nLength-nCount;
int nXCHARsToCopy = nLength-(iIndex+nCount)+1;
@@ -1375,10 +1375,10 @@ public:
// Insert character 'ch' before index 'iIndex'
int Insert( int iIndex, XCHAR ch )
{
- if( iIndex < 0 )
+ if ( iIndex < 0 )
iIndex = 0;
- if( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength() )
iIndex = this->GetLength();
int nNewLength = this->GetLength()+1;
@@ -1400,10 +1400,10 @@ public:
// Insert string 'psz' before index 'iIndex'
int Insert( int iIndex, PCXSTR psz )
{
- if( iIndex < 0 )
+ if ( iIndex < 0 )
iIndex = 0;
- if( iIndex > this->GetLength() )
+ if ( iIndex > this->GetLength() )
{
iIndex = this->GetLength();
}
@@ -1411,7 +1411,7 @@ public:
// nInsertLength and nNewLength are in XCHARs
int nInsertLength = StringTraits::SafeStringLen( psz );
int nNewLength = this->GetLength();
- if( nInsertLength > 0 )
+ if ( nInsertLength > 0 )
{
nNewLength += nInsertLength;
@@ -1436,7 +1436,7 @@ public:
int nCount = 0;
// short-circuit the nop case
- if( chOld != chNew )
+ if ( chOld != chNew )
{
// otherwise modify each character that matches in the string
bool bCopied = false;
@@ -1447,9 +1447,9 @@ public:
while( iChar < nLength )
{
// replace instances of the specified character only
- if( pszBuffer[iChar] == chOld )
+ if ( pszBuffer[iChar] == chOld )
{
- if( !bCopied )
+ if ( !bCopied )
{
bCopied = true;
pszBuffer = this->GetBuffer( nLength );
@@ -1459,7 +1459,7 @@ public:
}
iChar = int( StringTraits::CharNext( pszBuffer+iChar )-pszBuffer );
}
- if( bCopied )
+ if ( bCopied )
{
this->ReleaseBufferSetLength( nLength );
}
@@ -1475,7 +1475,7 @@ public:
// nSourceLen is in XCHARs
int nSourceLen = StringTraits::SafeStringLen( pszOld );
- if( nSourceLen == 0 )
+ if ( nSourceLen == 0 )
return 0;
// nReplacementLen is in XCHARs
int nReplacementLen = StringTraits::SafeStringLen( pszNew );
@@ -1498,7 +1498,7 @@ public:
}
// if any changes were made, make them
- if( nCount > 0 )
+ if ( nCount > 0 )
{
// if the buffer is too small, just
// allocate a new buffer (slow but sure)
@@ -1546,7 +1546,7 @@ public:
while( pszSource < pszEnd )
{
PXSTR pszNewSource = StringTraits::CharNext( pszSource );
- if( *pszSource != chRemove )
+ if ( *pszSource != chRemove )
{
// Copy the source to the destination. Remember to copy all bytes of an MBCS character
// Copy the source to the destination. Remember to copy all bytes of an MBCS character
@@ -1571,7 +1571,7 @@ public:
CMStringT Tokenize( PCXSTR pszTokens, int& iStart ) const
{
- if( (pszTokens == NULL) || (*pszTokens == (XCHAR)0) )
+ if ( (pszTokens == NULL) || (*pszTokens == (XCHAR)0) )
{
if (iStart < this->GetLength())
return CMStringT( this->GetString()+iStart );
@@ -1580,11 +1580,11 @@ public:
{
PCXSTR pszPlace = this->GetString()+iStart;
PCXSTR pszEnd = this->GetString()+this->GetLength();
- if( pszPlace < pszEnd )
+ if ( pszPlace < pszEnd )
{
int nIncluding = StringTraits::StringSpanIncluding( pszPlace, pszTokens );
- if( (pszPlace+nIncluding) < pszEnd )
+ if ( (pszPlace+nIncluding) < pszEnd )
{
pszPlace += nIncluding;
int nExcluding = StringTraits::StringSpanExcluding( pszPlace, pszTokens );
@@ -1611,7 +1611,7 @@ public:
{
// nLength is in XCHARs
int nLength = this->GetLength();
- if( iStart < 0 || iStart >= nLength)
+ if ( iStart < 0 || iStart >= nLength)
return -1;
// find first single character
@@ -1632,7 +1632,7 @@ public:
// nLength is in XCHARs
int nLength = this->GetLength();
- if( iStart < 0 || iStart > nLength )
+ if ( iStart < 0 || iStart > nLength )
return -1;
// find first matching substring
@@ -1707,9 +1707,9 @@ public:
while( *psz != 0 )
{
- if( StringTraits::IsSpace( *psz ) )
+ if ( StringTraits::IsSpace( *psz ) )
{
- if( pszLast == NULL )
+ if ( pszLast == NULL )
pszLast = psz;
}
else
@@ -1719,7 +1719,7 @@ public:
psz = StringTraits::CharNext( psz );
}
- if( pszLast != NULL )
+ if ( pszLast != NULL )
{
// truncate at trailing space start
int iLast = int( pszLast-this->GetString() );
@@ -1742,7 +1742,7 @@ public:
psz = StringTraits::CharNext( psz );
}
- if( psz != this->GetString() )
+ if ( psz != this->GetString() )
{
// fix up data and length
int iFirst = int( psz-this->GetString() );
@@ -1788,9 +1788,9 @@ public:
while( *psz != 0 )
{
- if( *psz == chTarget )
+ if ( *psz == chTarget )
{
- if( pszLast == NULL )
+ if ( pszLast == NULL )
{
pszLast = psz;
}
@@ -1802,7 +1802,7 @@ public:
psz = StringTraits::CharNext( psz );
}
- if( pszLast != NULL )
+ if ( pszLast != NULL )
{
// truncate at left-most matching character
int iLast = int( pszLast-this->GetString() );
@@ -1816,7 +1816,7 @@ public:
CMStringT& TrimRight( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0) )
{
return *this;
}
@@ -1829,9 +1829,9 @@ public:
while( *psz != 0 )
{
- if( StringTraits::StringFindChar( pszTargets, *psz ) != NULL )
+ if ( StringTraits::StringFindChar( pszTargets, *psz ) != NULL )
{
- if( pszLast == NULL )
+ if ( pszLast == NULL )
{
pszLast = psz;
}
@@ -1843,7 +1843,7 @@ public:
psz = StringTraits::CharNext( psz );
}
- if( pszLast != NULL )
+ if ( pszLast != NULL )
{
// truncate at left-most matching character
int iLast = int( pszLast-this->GetString() );
@@ -1864,7 +1864,7 @@ public:
psz = StringTraits::CharNext( psz );
}
- if( psz != this->GetString() )
+ if ( psz != this->GetString() )
{
// fix up data and length
int iFirst = int( psz-this->GetString() );
@@ -1883,7 +1883,7 @@ public:
CMStringT& TrimLeft( PCXSTR pszTargets )
{
// if we're not trimming anything, we're not doing any work
- if( (pszTargets == NULL) || (*pszTargets == 0) )
+ if ( (pszTargets == NULL) || (*pszTargets == 0) )
{
return *this;
}
@@ -1894,7 +1894,7 @@ public:
psz = StringTraits::CharNext( psz );
}
- if( psz != this->GetString() )
+ if ( psz != this->GetString() )
{
// fix up data and length
int iFirst = int( psz-this->GetString() );
@@ -1946,14 +1946,14 @@ public:
if (nCount < 0)
nCount = 0;
- if( (iFirst + nCount) > this->GetLength() )
+ if ( (iFirst + nCount) > this->GetLength() )
nCount = this->GetLength()-iFirst;
- if( iFirst > this->GetLength() )
+ if ( iFirst > this->GetLength() )
nCount = 0;
// optimize case of returning entire string
- if( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()) )
+ if ( (iFirst == 0) && ((iFirst+nCount) == this->GetLength()) )
return *this;
return CMStringT( this->GetString()+iFirst, nCount );
@@ -1967,7 +1967,7 @@ public:
nCount = 0;
int nLength = this->GetLength();
- if( nCount >= nLength )
+ if ( nCount >= nLength )
{
return *this;
}
@@ -1983,7 +1983,7 @@ public:
nCount = 0;
int nLength = this->GetLength();
- if( nCount >= nLength )
+ if ( nCount >= nLength )
return *this;
return CMStringT( this->GetString(), nCount );
@@ -2046,7 +2046,7 @@ public:
ULONG nLength = StringTraits::GetEnvironmentVariable( pszVar, NULL, 0 );
BOOL bRetVal = FALSE;
- if( nLength == 0 )
+ if ( nLength == 0 )
{
this->Empty();
}
@@ -2065,7 +2065,7 @@ public:
BOOL LoadString( UINT nID )
{
HINSTANCE hInst = StringTraits::FindStringResourceInstance( nID );
- if( hInst == NULL )
+ if ( hInst == NULL )
return FALSE;
return LoadString( hInst, nID );
diff --git a/protocols/JabberG/jabber_adhoc.cpp b/protocols/JabberG/jabber_adhoc.cpp
index f83fc88c3a..29cee4cd8e 100644
--- a/protocols/JabberG/jabber_adhoc.cpp
+++ b/protocols/JabberG/jabber_adhoc.cpp
@@ -608,6 +608,6 @@ int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam )
void CJabberProto::ContactMenuAdhocCommands( CJabberAdhocStartupParams* param )
{
- if( param )
+ if ( param )
CreateDialogParam( hInst, MAKEINTRESOURCE( IDD_FORM ), NULL, JabberAdHoc_CommandDlgProc, (LPARAM)param );
}
diff --git a/protocols/JabberG/jabber_captcha.cpp b/protocols/JabberG/jabber_captcha.cpp
index 046edc3863..c090499cd2 100644
--- a/protocols/JabberG/jabber_captcha.cpp
+++ b/protocols/JabberG/jabber_captcha.cpp
@@ -51,7 +51,7 @@ INT_PTR CALLBACK JabberCaptchaFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
params = (CAPTCHA_FORM_PARAMS*)lParam;
LPCTSTR hint = params->hint;
- if( hint == NULL )
+ if ( hint == NULL )
hint = TranslateT("Enter the text you see");
SetDlgItemText( hwndDlg, IDC_INSTRUCTION, TranslateTS( hint ) );
SetWindowLongPtr( hwndDlg, GWLP_USERDATA, ( LONG )params );
@@ -112,7 +112,7 @@ INT_PTR CALLBACK JabberCaptchaFormDlgProc( HWND hwndDlg, UINT msg, WPARAM wParam
return FALSE;
}
-bool CJabberProto::ProcessCaptcha (HXML node, HXML parentNode, ThreadData* info ){
+bool CJabberProto::ProcessCaptcha (HXML node, HXML parentNode, ThreadData* info ) {
CAPTCHA_FORM_PARAMS param;
char *ImageBuf = 0;
const TCHAR *PicType = 0;
@@ -165,7 +165,7 @@ bool CJabberProto::ProcessCaptcha (HXML node, HXML parentNode, ThreadData* info
return true;
}
-void CJabberProto::GetCaptchaImage ( HXML node, char *ImageBuf, const TCHAR *PicType, TCHAR*& CaptchaPath ){
+void CJabberProto::GetCaptchaImage ( HXML node, char *ImageBuf, const TCHAR *PicType, TCHAR*& CaptchaPath ) {
HXML o = xmlGetChild( node , "data" );
int bufferLen;
char* buffer = JabberBase64DecodeT(xmlGetText( o ), &bufferLen );
@@ -227,7 +227,7 @@ void CJabberProto::sendCaptchaResult(TCHAR* buf, ThreadData* info, LPCTSTR from,
info -> send (iq);
}
-void CJabberProto::sendCaptchaError(ThreadData* info, LPCTSTR from, LPCTSTR to, LPCTSTR challenge ){
+void CJabberProto::sendCaptchaError(ThreadData* info, LPCTSTR from, LPCTSTR to, LPCTSTR challenge ) {
XmlNode message( _T("message"));
HXML query= message << XATTR(_T("type"), _T("error")) << XATTR(_T("to"), from) << XATTR(_T("id"), challenge) << XATTR(_T("from"), to)
<< XCHILD(_T("error")) << XATTR(_T("type"), _T("modify"))
diff --git a/protocols/JabberG/jabber_events.cpp b/protocols/JabberG/jabber_events.cpp
index 7e26de73d9..722f55f6b4 100644
--- a/protocols/JabberG/jabber_events.cpp
+++ b/protocols/JabberG/jabber_events.cpp
@@ -45,7 +45,7 @@ Last change by : $Author: borkra $
int CJabberProto::OnContactDeleted( WPARAM wParam, LPARAM )
{
- if( !m_bJabberOnline ) // should never happen
+ if ( !m_bJabberOnline ) // should never happen
return 0;
DBVARIANT dbv;
diff --git a/protocols/JabberG/jabber_iq_handlers.cpp b/protocols/JabberG/jabber_iq_handlers.cpp
index 31a843f7bf..bcb7192c5b 100644
--- a/protocols/JabberG/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/jabber_iq_handlers.cpp
@@ -90,7 +90,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
- if( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)) )
+ if ( !(bOsVersionInfoEx = GetVersionEx ((OSVERSIONINFO *) &osvi)) )
return FALSE;
// Call GetNativeSystemInfo if supported or GetSystemInfo otherwise.
@@ -111,14 +111,14 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1 )
{
- if( osvi.wProductType == VER_NT_WORKSTATION )
+ if ( osvi.wProductType == VER_NT_WORKSTATION )
StringCchCat(pszOS, BUFSIZE, TEXT("Windows 7 "));
else StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 R2 " ));
}
if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 )
{
- if( osvi.wProductType == VER_NT_WORKSTATION )
+ if ( osvi.wProductType == VER_NT_WORKSTATION )
StringCchCat(pszOS, BUFSIZE, TEXT("Windows Vista "));
else StringCchCat(pszOS, BUFSIZE, TEXT("Windows Server 2008 " ));
@@ -190,13 +190,13 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2 )
{
- if( GetSystemMetrics(SM_SERVERR2) )
+ if ( GetSystemMetrics(SM_SERVERR2) )
StringCchCat(pszOS, BUFSIZE, TEXT( "Windows Server 2003 R2, "));
else if ( osvi.wSuiteMask==VER_SUITE_STORAGE_SERVER )
StringCchCat(pszOS, BUFSIZE, TEXT( "Windows Storage Server 2003"));
else if ( osvi.wSuiteMask==VER_SUITE_WH_SERVER )
StringCchCat(pszOS, BUFSIZE, TEXT( "Windows Home Server"));
- else if( osvi.wProductType == VER_NT_WORKSTATION &&
+ else if ( osvi.wProductType == VER_NT_WORKSTATION &&
si.wProcessorArchitecture==PROCESSOR_ARCHITECTURE_AMD64)
{
StringCchCat(pszOS, BUFSIZE, TEXT( "Windows XP Professional x64 Edition"));
@@ -208,17 +208,17 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
{
if ( si.wProcessorArchitecture==PROCESSOR_ARCHITECTURE_IA64 )
{
- if( osvi.wSuiteMask & VER_SUITE_DATACENTER )
+ if ( osvi.wSuiteMask & VER_SUITE_DATACENTER )
StringCchCat(pszOS, BUFSIZE, TEXT( "Datacenter Edition for Itanium-based Systems" ));
- else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE )
+ else if ( osvi.wSuiteMask & VER_SUITE_ENTERPRISE )
StringCchCat(pszOS, BUFSIZE, TEXT( "Enterprise Edition for Itanium-based Systems" ));
}
else if ( si.wProcessorArchitecture==PROCESSOR_ARCHITECTURE_AMD64 )
{
- if( osvi.wSuiteMask & VER_SUITE_DATACENTER )
+ if ( osvi.wSuiteMask & VER_SUITE_DATACENTER )
StringCchCat(pszOS, BUFSIZE, TEXT( "Datacenter x64 Edition" ));
- else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE )
+ else if ( osvi.wSuiteMask & VER_SUITE_ENTERPRISE )
StringCchCat(pszOS, BUFSIZE, TEXT( "Enterprise x64 Edition" ));
else StringCchCat(pszOS, BUFSIZE, TEXT( "Standard x64 Edition" ));
}
@@ -227,9 +227,9 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
{
if ( osvi.wSuiteMask & VER_SUITE_COMPUTE_SERVER )
StringCchCat(pszOS, BUFSIZE, TEXT( "Compute Cluster Edition" ));
- else if( osvi.wSuiteMask & VER_SUITE_DATACENTER )
+ else if ( osvi.wSuiteMask & VER_SUITE_DATACENTER )
StringCchCat(pszOS, BUFSIZE, TEXT( "Datacenter Edition" ));
- else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE )
+ else if ( osvi.wSuiteMask & VER_SUITE_ENTERPRISE )
StringCchCat(pszOS, BUFSIZE, TEXT( "Enterprise Edition" ));
else if ( osvi.wSuiteMask & VER_SUITE_BLADE )
StringCchCat(pszOS, BUFSIZE, TEXT( "Web Edition" ));
@@ -241,7 +241,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
if ( osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1 )
{
StringCchCat(pszOS, BUFSIZE, TEXT("Windows XP "));
- if( osvi.wSuiteMask & VER_SUITE_PERSONAL )
+ if ( osvi.wSuiteMask & VER_SUITE_PERSONAL )
StringCchCat(pszOS, BUFSIZE, TEXT( "Home Edition" ));
else StringCchCat(pszOS, BUFSIZE, TEXT( "Professional" ));
}
@@ -256,9 +256,9 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
}
else
{
- if( osvi.wSuiteMask & VER_SUITE_DATACENTER )
+ if ( osvi.wSuiteMask & VER_SUITE_DATACENTER )
StringCchCat(pszOS, BUFSIZE, TEXT( "Datacenter Server" ));
- else if( osvi.wSuiteMask & VER_SUITE_ENTERPRISE )
+ else if ( osvi.wSuiteMask & VER_SUITE_ENTERPRISE )
StringCchCat(pszOS, BUFSIZE, TEXT( "Advanced Server" ));
else StringCchCat(pszOS, BUFSIZE, TEXT( "Server" ));
}
@@ -266,7 +266,7 @@ BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE)
// Include service pack (if any) and build number.
- if( _tcslen(osvi.szCSDVersion) > 0 )
+ if ( _tcslen(osvi.szCSDVersion) > 0 )
{
StringCchCat(pszOS, BUFSIZE, TEXT(" ") );
StringCchCat(pszOS, BUFSIZE, osvi.szCSDVersion);
diff --git a/protocols/JabberG/jabber_iqid.cpp b/protocols/JabberG/jabber_iqid.cpp
index db15079953..72ddcf6d4c 100644
--- a/protocols/JabberG/jabber_iqid.cpp
+++ b/protocols/JabberG/jabber_iqid.cpp
@@ -345,7 +345,7 @@ void CJabberProto::GroupchatJoinByHContact( HANDLE hContact, bool autojoin )
TCHAR *nick = JGetStringT( hContact, "MyNick" );
if ( !nick ) {
nick = JabberNickFromJID( m_szJabberJID );
- if( !nick ) {
+ if ( !nick ) {
mir_free( roomjid );
return;
}
diff --git a/protocols/JabberG/jabber_iqid_muc.cpp b/protocols/JabberG/jabber_iqid_muc.cpp
index c088c265de..9cd4cdb51c 100644
--- a/protocols/JabberG/jabber_iqid_muc.cpp
+++ b/protocols/JabberG/jabber_iqid_muc.cpp
@@ -288,7 +288,7 @@ static INT_PTR CALLBACK JabberMucJidListDlgProc( HWND hwndDlg, UINT msg, WPARAM
ListView_GetSubItemRect( nm->nmcd.hdr.hwndFrom, nm->nmcd.dwItemSpec, nm->iSubItem, LVIR_LABEL, &rc );
if ( nm->iSubItem == 1 ) {
- if( nm->nmcd.lItemlParam == ( LPARAM )( -1 ))
+ if ( nm->nmcd.lItemlParam == ( LPARAM )( -1 ))
hIcon = ( HICON )LoadImage( hInst, MAKEINTRESOURCE( IDI_ADDCONTACT ), IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), 0 );
else
hIcon = ( HICON )LoadImage( hInst, MAKEINTRESOURCE( IDI_DELETE ), IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), 0 );
diff --git a/protocols/JabberG/jabber_list.cpp b/protocols/JabberG/jabber_list.cpp
index 47f336187f..2397e0bd73 100644
--- a/protocols/JabberG/jabber_list.cpp
+++ b/protocols/JabberG/jabber_list.cpp
@@ -82,7 +82,7 @@ void CJabberProto::ListWipe( void )
int i;
EnterCriticalSection( &m_csLists );
- for( i=0; i < m_lstRoster.getCount(); i++ )
+ for ( i=0; i < m_lstRoster.getCount(); i++ )
JabberListFreeItemInternal( m_lstRoster[i] );
m_lstRoster.destroy();
@@ -432,7 +432,7 @@ int CJabberProto::ListFindNext( JABBER_LIST list, int fromOffset )
{
EnterCriticalSection( &m_csLists );
int i = ( fromOffset >= 0 ) ? fromOffset : 0;
- for( ; i<m_lstRoster.getCount(); i++ )
+ for ( ; i<m_lstRoster.getCount(); i++ )
if ( m_lstRoster[i]->list == list ) {
LeaveCriticalSection( &m_csLists );
return i;
diff --git a/protocols/JabberG/jabber_opt.cpp b/protocols/JabberG/jabber_opt.cpp
index 574cf4b50c..5baae257e7 100644
--- a/protocols/JabberG/jabber_opt.cpp
+++ b/protocols/JabberG/jabber_opt.cpp
@@ -1292,7 +1292,7 @@ void CJabberProto::_RosterExportToFile(HWND hwndDlg)
ofn.nMaxFile = SIZEOF(filename);
ofn.nMaxFileTitle = MAX_PATH;
ofn.lpstrDefExt = _T("xml");
- if(!GetSaveFileName(&ofn)) return;
+ if (!GetSaveFileName(&ofn)) return;
FILE * fp = fopent(filename,_T("w"));
if (!fp) return;
diff --git a/protocols/JabberG/jabber_privacy.cpp b/protocols/JabberG/jabber_privacy.cpp
index f6c1514c29..67c8504d76 100644
--- a/protocols/JabberG/jabber_privacy.cpp
+++ b/protocols/JabberG/jabber_privacy.cpp
@@ -2153,7 +2153,7 @@ void CJabberDlgPrivacyLists::clcClist_OnClick(CCtrlClc::TEventInfo *evt)
if(evt->info->iColumn==-1) return;
hItem = m_clcClist.HitTest(evt->info->pt.x, evt->info->pt.y, &hitFlags);
if(hItem==NULL) return;
- if(!(hitFlags&CLCHT_ONITEMEXTRA)) return;
+ if (!(hitFlags&CLCHT_ONITEMEXTRA)) return;
iImage = m_clcClist.GetExtraImage(hItem, evt->info->iColumn);
if (iImage != 0xFF)
diff --git a/protocols/JabberG/jabber_proto.cpp b/protocols/JabberG/jabber_proto.cpp
index 21f067e12e..2457eab7a2 100644
--- a/protocols/JabberG/jabber_proto.cpp
+++ b/protocols/JabberG/jabber_proto.cpp
@@ -1130,7 +1130,7 @@ HANDLE __cdecl CJabberProto::SendFile( HANDLE hContact, const TCHAR* szDescripti
ft->std.ptszFiles = ( TCHAR** ) mir_calloc( sizeof( TCHAR* )* ft->std.totalFiles );
ft->fileSize = ( unsigned __int64* ) mir_calloc( sizeof( unsigned __int64 ) * ft->std.totalFiles );
- for( i=j=0; i < ft->std.totalFiles; i++ ) {
+ for ( i=j=0; i < ft->std.totalFiles; i++ ) {
if ( _tstati64( ppszFiles[i], &statbuf ))
Log( "'%s' is an invalid filename", ppszFiles[i] );
else {
@@ -1565,7 +1565,7 @@ int __cdecl CJabberProto::UserIsTyping( HANDLE hContact, int type )
if ( jcb & JABBER_CAPS_CHATSTATES ) {
m << XATTR( _T("type"), _T("chat")) << XATTRID( SerialNext());
- switch ( type ){
+ switch ( type ) {
case PROTOTYPE_SELFTYPING_OFF:
m << XCHILDNS( _T("paused"), _T(JABBER_FEAT_CHATSTATES));
m_ThreadInfo->send( m );
@@ -1581,7 +1581,7 @@ int __cdecl CJabberProto::UserIsTyping( HANDLE hContact, int type )
if ( item->messageEventIdStr != NULL )
x << XCHILD( _T("id"), item->messageEventIdStr );
- switch ( type ){
+ switch ( type ) {
case PROTOTYPE_SELFTYPING_OFF:
m_ThreadInfo->send( m );
break;
diff --git a/protocols/JabberG/jabber_proxy.cpp b/protocols/JabberG/jabber_proxy.cpp
index 9ee30bf03b..e6f7ef2f7b 100644
--- a/protocols/JabberG/jabber_proxy.cpp
+++ b/protocols/JabberG/jabber_proxy.cpp
@@ -37,14 +37,14 @@ int JabberHttpGatewayInit( HANDLE /*hConn*/, NETLIBOPENCONNECTION* /*nloc*/, NET
char szSid[33], szHttpServer[256], szHttpGetUrl[300], szHttpPostUrl[300];
NETLIBHTTPPROXYINFO nlhpi = {0};
- for( responseBytes = 0; ; ) {
+ for ( responseBytes = 0; ; ) {
recvResult = Netlib_Recv( hConn, response + responseBytes, sizeof( response ) - responseBytes, MSG_DUMPPROXY );
- if( recvResult<=0 ) break;
+ if ( recvResult<=0 ) break;
responseBytes += recvResult;
- if( responseBytes == sizeof( response ))
+ if ( responseBytes == sizeof( response ))
break;
}
- if( responseBytes < 31 )
+ if ( responseBytes < 31 )
{
SetLastError( ERROR_INVALID_DATA );
return 0;
@@ -60,7 +60,7 @@ int JabberHttpGatewayInit( HANDLE /*hConn*/, NETLIBOPENCONNECTION* /*nloc*/, NET
unpackDWord( &buf, &dwSid4 );
sprintf( szSid, "%08x%08x%08x%08x", dwSid1, dwSid2, dwSid3, dwSid4 );
unpackWord( &buf, &wIpLen );
- if( responseBytes < 30 + wIpLen || wIpLen == 0 || wIpLen > sizeof( szHttpServer ) - 1 )
+ if ( responseBytes < 30 + wIpLen || wIpLen == 0 || wIpLen > sizeof( szHttpServer ) - 1 )
{
SetLastError( ERROR_INVALID_DATA );
return 0;
@@ -111,9 +111,9 @@ int icq_httpGatewayWrapSend( HANDLE hConn, PBYTE buf, int len, int flags, MIRAND
packString( &packet, buf, ( WORD )len );
sendResult = Netlib_Send( hConn, packet.pData, packet.wLen, flags );
mir_free( packet.pData );
- if( sendResult <= 0 )
+ if ( sendResult <= 0 )
return sendResult;
- if( sendResult < 14 )
+ if ( sendResult < 14 )
return 0;
return sendResult - 14;
}
@@ -125,7 +125,7 @@ PBYTE icq_httpGatewayUnwrapRecv( NETLIBHTTPREQUEST *nlhr, PBYTE buf, int len, in
int i, copyBytes;
tbuf = buf;
- for( i = 0;; )
+ for ( i = 0;; )
{
if ( tbuf - buf + 2 > len ) break;
unpackWord( &tbuf, &wLen );
diff --git a/protocols/JabberG/jabber_search.h b/protocols/JabberG/jabber_search.h
index c978f2ff9c..ca754e4238 100644
--- a/protocols/JabberG/jabber_search.h
+++ b/protocols/JabberG/jabber_search.h
@@ -165,7 +165,7 @@ public:
int index=_Records.getIndex(rec);
if (index<0)
{
- if(!_Records.insert(rec)) delete rec;
+ if (!_Records.insert(rec)) delete rec;
else
{
index=_Records.getIndex(rec);
@@ -186,7 +186,7 @@ public:
if (index<0)
{
_KEYTYPE* newKey=CopyProc(Key);
- if(!_Records.insert(rec))
+ if (!_Records.insert(rec))
{
delete rec;
DestroyProc(newKey);
diff --git a/protocols/JabberG/jabber_svc.cpp b/protocols/JabberG/jabber_svc.cpp
index 31ff002999..ed5bfd7b78 100644
--- a/protocols/JabberG/jabber_svc.cpp
+++ b/protocols/JabberG/jabber_svc.cpp
@@ -480,7 +480,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI( WPARAM wParam, LPARAM l
return 1;
// skip //
- for( ++szJid; *szJid == _T( '/' ); ++szJid );
+ for ( ++szJid; *szJid == _T( '/' ); ++szJid );
// empty jid?
if ( !*szJid )
diff --git a/protocols/JabberG/jabber_thread.cpp b/protocols/JabberG/jabber_thread.cpp
index 3c343600c8..bfb3ba0129 100644
--- a/protocols/JabberG/jabber_thread.cpp
+++ b/protocols/JabberG/jabber_thread.cpp
@@ -1735,7 +1735,7 @@ void CJabberProto::OnProcessPresence( HXML node, ThreadData* info )
Log( "Not hasXAvatar" );
for ( int i = 1; ( xNode=xmlGetNthChild( node, _T("x"), i )) != NULL; i++ ) {
if ( !lstrcmp( xmlGetAttrValue( xNode, _T("xmlns")), _T("vcard-temp:x:update"))) {
- if (( xNode = xmlGetChild( xNode , "photo" )) != NULL ){
+ if (( xNode = xmlGetChild( xNode , "photo" )) != NULL ) {
LPCTSTR txt = xmlGetText( xNode );
if ( txt != NULL && txt[0] != 0) {
JSetByte( hContact, "AvatarXVcard", 1 );
diff --git a/protocols/JabberG/jabber_vcard.cpp b/protocols/JabberG/jabber_vcard.cpp
index ee7b2d4638..2ec8dcf3d7 100644
--- a/protocols/JabberG/jabber_vcard.cpp
+++ b/protocols/JabberG/jabber_vcard.cpp
@@ -817,7 +817,7 @@ static INT_PTR CALLBACK ContactDlgProc( HWND hwndDlg, UINT msg, WPARAM, LPARAM l
HICON hIcon;
ListView_GetSubItemRect( nm->nmcd.hdr.hwndFrom, nm->nmcd.dwItemSpec, nm->iSubItem, LVIR_LABEL, &rc );
- if( nm->nmcd.lItemlParam==( LPARAM )( -1 ) && nm->iSubItem==3 )
+ if ( nm->nmcd.lItemlParam==( LPARAM )( -1 ) && nm->iSubItem==3 )
hIcon = ( HICON )LoadImage( hInst, MAKEINTRESOURCE( IDI_ADDCONTACT ), IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), 0 );
else if ( nm->iSubItem==2 && nm->nmcd.lItemlParam!=( LPARAM )( -1 ))
hIcon = ( HICON )LoadImage( hInst, MAKEINTRESOURCE( IDI_EDIT ), IMAGE_ICON, GetSystemMetrics( SM_CXSMICON ), GetSystemMetrics( SM_CYSMICON ), 0 );
@@ -872,7 +872,7 @@ static INT_PTR CALLBACK ContactDlgProc( HWND hwndDlg, UINT msg, WPARAM, LPARAM l
char idstr[33];
DBVARIANT dbv;
- for( i=lvi.lParam;;i++ ) {
+ for ( i=lvi.lParam;;i++ ) {
WORD nFlag;
wsprintfA( idstr, szIdTemplate, i+1 );
diff --git a/protocols/JabberG/jabber_xstatus.cpp b/protocols/JabberG/jabber_xstatus.cpp
index 96bc7fd948..28e1c63096 100644
--- a/protocols/JabberG/jabber_xstatus.cpp
+++ b/protocols/JabberG/jabber_xstatus.cpp
@@ -443,7 +443,7 @@ void CPepService::ResetPublish()
void CPepService::ForceRepublishOnLogin()
{
- if(!m_wasPublished)
+ if (!m_wasPublished)
Publish();
}
@@ -799,7 +799,7 @@ void CPepMood::SetMood(HANDLE hContact, const TCHAR *szMood, const TCHAR *szText
void CPepMood::ShowSetDialog(BYTE bQuiet)
{
- if( !bQuiet ) {
+ if ( !bQuiet ) {
CJabberDlgPepSimple dlg(m_proto, TranslateT("Set Mood"));
for (int i = 1; i < SIZEOF(g_arrMoods); ++i)
dlg.AddStatusMode(i, g_arrMoods[i].szTag, m_icons.GetIcon(g_arrMoods[i].szTag), TranslateTS(g_arrMoods[i].szName));
@@ -1070,7 +1070,7 @@ void CPepActivity::InitGui()
TCHAR szSection[100];
mir_sntprintf(szSection, SIZEOF(szSection), _T("Status Icons/%s/Activities"), m_proto->m_tszUserName);
- for (int i = 0; i < SIZEOF(g_arrActivities); i++){
+ for (int i = 0; i < SIZEOF(g_arrActivities); i++) {
if (g_arrActivities[i].szFirst)
m_icons.RegisterIcon(g_arrActivities[i].szFirst, szFile, g_arrActivities[i].iconid, szSection, TranslateTS(g_arrActivities[i].szTitle));
if (g_arrActivities[i].szSecond)