summaryrefslogtreecommitdiff
path: root/protocols/MRA
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-02 20:55:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-02 20:55:18 +0000
commit78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch)
tree8512c50df70b8dd80c919e88ade3419207c95956 /protocols/MRA
parentce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff)
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA')
-rw-r--r--protocols/MRA/Mra.cpp2
-rw-r--r--protocols/MRA/MraAdvancedSearch.cpp2
-rw-r--r--protocols/MRA/MraAntiSpam.cpp4
-rw-r--r--protocols/MRA/MraAvatars.cpp2
-rw-r--r--protocols/MRA/MraFilesQueue.cpp4
-rw-r--r--protocols/MRA/MraFilesQueue_mod.cpp4
-rw-r--r--protocols/MRA/MraMRIMProxy.cpp2
-rw-r--r--protocols/MRA/MraPopUp.cpp2
-rw-r--r--protocols/MRA/MraSelectEMail.cpp2
-rw-r--r--protocols/MRA/Mra_functions.cpp10
-rw-r--r--protocols/MRA/Mra_options.cpp4
-rw-r--r--protocols/MRA/Mra_proto.cpp12
-rw-r--r--protocols/MRA/Sdk/Base64.h8
13 files changed, 29 insertions, 29 deletions
diff --git a/protocols/MRA/Mra.cpp b/protocols/MRA/Mra.cpp
index e5e5d22e0f..26cdc4ffec 100644
--- a/protocols/MRA/Mra.cpp
+++ b/protocols/MRA/Mra.cpp
@@ -326,7 +326,7 @@ return(0);
void VersionConversions()
{
- /*switch(DB_Mra_GetDword(NULL,"LastPluginVersion",PLUGIN_MAKE_VERSION(0,0,0,0))){
+ /*switch(DB_Mra_GetDword(NULL,"LastPluginVersion",PLUGIN_MAKE_VERSION(0,0,0,0))) {
default:
case PLUGIN_MAKE_VERSION(1,14,0,0):
case PLUGIN_MAKE_VERSION(1,14,0,1):
diff --git a/protocols/MRA/MraAdvancedSearch.cpp b/protocols/MRA/MraAdvancedSearch.cpp
index 86ac51309a..c97ae8aba2 100644
--- a/protocols/MRA/MraAdvancedSearch.cpp
+++ b/protocols/MRA/MraAdvancedSearch.cpp
@@ -196,7 +196,7 @@ INT_PTR CALLBACK AdvancedSearchDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,L
}
break;
case WM_COMMAND:
- switch(LOWORD(wParam)){
+ switch(LOWORD(wParam)) {
case IDOK:
SendMessage(GetParent(hWndDlg),WM_COMMAND,MAKEWPARAM(IDOK,BN_CLICKED),(LPARAM)GetDlgItem(GetParent(hWndDlg),IDOK));
break;
diff --git a/protocols/MRA/MraAntiSpam.cpp b/protocols/MRA/MraAntiSpam.cpp
index 38607c2107..20be25d33a 100644
--- a/protocols/MRA/MraAntiSpam.cpp
+++ b/protocols/MRA/MraAntiSpam.cpp
@@ -224,7 +224,7 @@ INT_PTR CALLBACK MraAntiSpamDlgProcOpts(HWND hWndDlg,UINT msg,WPARAM wParam,LPAR
}
dwCount=((i*2)+1024);
- for(;i<dwCount;i++)
+ for (;i<dwCount;i++)
{
mir_snprintf(szSettingName,SIZEOF(szSettingName),"AntiSpamBadWord %lu",i);
DB_Mra_DeleteValue(NULL,szSettingName);
@@ -271,7 +271,7 @@ void MraAntiSpamResetBadWordsList()
}
dwMax=(i+1024);
- for(;i<dwMax;i++)
+ for (;i<dwMax;i++)
{
mir_snprintf(szSettingName,SIZEOF(szSettingName),"AntiSpamBadWord %lu",i);
DB_Mra_DeleteValue(NULL,szSettingName);
diff --git a/protocols/MRA/MraAvatars.cpp b/protocols/MRA/MraAvatars.cpp
index 1916f5ab16..b1ca17ca29 100644
--- a/protocols/MRA/MraAvatars.cpp
+++ b/protocols/MRA/MraAvatars.cpp
@@ -347,7 +347,7 @@ void MraAvatarsThreadProc(LPVOID lpParameter)
nls.hReadConns[0] = hConnection;
while ( bContinue ) {
- switch(CallService(MS_NETLIB_SELECT,0,(LPARAM)&nls)){
+ switch(CallService(MS_NETLIB_SELECT,0,(LPARAM)&nls)) {
case SOCKET_ERROR:
case 0:// Time out
dwErrorCode=GetLastError();
diff --git a/protocols/MRA/MraFilesQueue.cpp b/protocols/MRA/MraFilesQueue.cpp
index 3dd2055501..09e052c822 100644
--- a/protocols/MRA/MraFilesQueue.cpp
+++ b/protocols/MRA/MraFilesQueue.cpp
@@ -871,7 +871,7 @@ LPWSTR GetFileNameFromFullPathW(LPWSTR lpwszFullPath,SIZE_T dwFullPathSize)
LPWSTR lpwszFileName=lpwszFullPath,lpwszCurPos;
lpwszCurPos=(lpwszFullPath+dwFullPathSize);
- for(;lpwszCurPos>lpwszFullPath;lpwszCurPos--)
+ for (;lpwszCurPos>lpwszFullPath;lpwszCurPos--)
{
if ((*lpwszCurPos)=='\\')
{
@@ -1129,7 +1129,7 @@ void MraFilesQueueRecvThreadProc(LPVOID lpParameter)
while(bContinue)
{
- switch(CallService(MS_NETLIB_SELECT,0,(LPARAM)&nls)){
+ switch(CallService(MS_NETLIB_SELECT,0,(LPARAM)&nls)) {
case SOCKET_ERROR:
case 0:// Time out
dwRetErrorCode=GetLastError();
diff --git a/protocols/MRA/MraFilesQueue_mod.cpp b/protocols/MRA/MraFilesQueue_mod.cpp
index 23488c9a91..b315636a69 100644
--- a/protocols/MRA/MraFilesQueue_mod.cpp
+++ b/protocols/MRA/MraFilesQueue_mod.cpp
@@ -104,7 +104,7 @@ BOOL CALLBACK MraFilesQueueDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LP
CheckDlgButton(hWndDlg,IDC_FILE_SEND_IGNORYADDITIONALPORTS,DB_Mra_GetByte(NULL,"FileSendIgnoryAdditionalPorts",MRA_DEF_FS_IGNORY_ADDITIONAL_PORTS));
CheckDlgButton(hWndDlg,IDC_FILE_SEND_HIDE_MY_ADDRESSES,DB_Mra_GetByte(NULL,"FileSendHideMyAddresses",MRA_DEF_FS_HIDE_MY_ADDRESSES));
CheckDlgButton(hWndDlg,IDC_FILE_SEND_ADD_EXTRA_ADDRESS,DB_Mra_GetByte(NULL,"FileSendAddExtraAddresses",MRA_DEF_FS_ADD_EXTRA_ADDRESSES));
- if(!DBGetContactSetting(NULL,PROTOCOL_NAME,"FileSendExtraAddresses",&dbv)) {
+ if (!DBGetContactSetting(NULL,PROTOCOL_NAME,"FileSendExtraAddresses",&dbv)) {
//bit of a security hole here, since it's easy to extract a password from an edit box
SetDlgItemText(hWndDlg,IDC_FILE_SEND_EXTRA_ADDRESS,dbv.pszVal);
DBFreeVariant(&dbv);
@@ -846,7 +846,7 @@ HANDLE MraFilesQueueConnectOut(MRA_FILES_QUEUE_ITEM *pmrafqFilesQueueItem)
nloc.flags=NLOCF_V2;
if (DB_Mra_GetByte(NULL,"FileSendIgnoryAdditionalPorts",MRA_DEF_FS_IGNORY_ADDITIONAL_PORTS))
{// фильтруем порты для одного IP, вместо 3 будем коннектится только к одному
- switch(DB_Mra_GetWord(NULL,"ServerPort",MRA_DEFAULT_SERVER_PORT)){
+ switch(DB_Mra_GetWord(NULL,"ServerPort",MRA_DEFAULT_SERVER_PORT)) {
case MRA_SERVER_PORT_STANDART_NLB:
dwLocalPort=MRA_SERVER_PORT_STANDART;
break;
diff --git a/protocols/MRA/MraMRIMProxy.cpp b/protocols/MRA/MraMRIMProxy.cpp
index 296cd5f4de..1eb3ac24c9 100644
--- a/protocols/MRA/MraMRIMProxy.cpp
+++ b/protocols/MRA/MraMRIMProxy.cpp
@@ -162,7 +162,7 @@ DWORD MraMrimProxyConnect(HANDLE hMraMrimProxyData,HANDLE *phConnection)
while(bContinue)
{
- switch(CallService(MS_NETLIB_SELECT,0,(LPARAM)&nls)){
+ switch(CallService(MS_NETLIB_SELECT,0,(LPARAM)&nls)) {
case SOCKET_ERROR:
case 0:// Time out
dwRetErrorCode=GetLastError();
diff --git a/protocols/MRA/MraPopUp.cpp b/protocols/MRA/MraPopUp.cpp
index 9a2fac8fb9..00247bd3a7 100644
--- a/protocols/MRA/MraPopUp.cpp
+++ b/protocols/MRA/MraPopUp.cpp
@@ -64,7 +64,7 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
}
return(TRUE);
case WM_COMMAND:
- switch(LOWORD(wParam)){
+ switch(LOWORD(wParam)) {
case IDC_COMBO_POPUP_TYPE:
if (HIWORD(wParam) == CBN_SELCHANGE) {
BOOL bEnabled, bUseWinColors;
diff --git a/protocols/MRA/MraSelectEMail.cpp b/protocols/MRA/MraSelectEMail.cpp
index ba9da3d471..cf993ebd7e 100644
--- a/protocols/MRA/MraSelectEMail.cpp
+++ b/protocols/MRA/MraSelectEMail.cpp
@@ -61,7 +61,7 @@ INT_PTR CALLBACK MraSelectEMailDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,L
EndDialog(hWndDlg,NO_ERROR);
break;
case WM_COMMAND:
- switch(LOWORD(wParam)){
+ switch(LOWORD(wParam)) {
case IDC_LIST_EMAILS:
if (HIWORD(wParam)==LBN_DBLCLK)
{
diff --git a/protocols/MRA/Mra_functions.cpp b/protocols/MRA/Mra_functions.cpp
index 222dd85dda..bb88dc3dcd 100644
--- a/protocols/MRA/Mra_functions.cpp
+++ b/protocols/MRA/Mra_functions.cpp
@@ -462,7 +462,7 @@ DWORD GetContactFlags(HANDLE hContact)
if (DBGetContactSettingByte(hContact,"CList","Hidden",0)) dwRet|=CONTACT_FLAG_SHADOW;
- switch(DB_Mra_GetWord(hContact,"ApparentMode",0)){
+ switch(DB_Mra_GetWord(hContact,"ApparentMode",0)) {
case ID_STATUS_OFFLINE:
dwRet|=CONTACT_FLAG_INVISIBLE;
break;
@@ -490,7 +490,7 @@ DWORD SetContactFlags(HANDLE hContact,DWORD dwContactFlag)
}else{
DBDeleteContactSetting(hContact,"CList","Hidden");
}
- switch(dwContactFlag&(CONTACT_FLAG_INVISIBLE|CONTACT_FLAG_VISIBLE)){
+ switch(dwContactFlag&(CONTACT_FLAG_INVISIBLE|CONTACT_FLAG_VISIBLE)) {
case CONTACT_FLAG_INVISIBLE:
DB_Mra_SetWord(hContact,"ApparentMode",ID_STATUS_OFFLINE);
break;
@@ -578,7 +578,7 @@ DWORD SetContactBasicInfoW(HANDLE hContact,DWORD dwSetInfoFlags,DWORD dwFlags,DW
if(dwFlags&SCBIF_NICK)
{
- if((dwFlags&SCBIF_FLAG) && ((dwContactFlag&CONTACT_FLAG_UNICODE_NAME)==0))
+ if ((dwFlags&SCBIF_FLAG) && ((dwContactFlag&CONTACT_FLAG_UNICODE_NAME)==0))
{
if (lpwszNick && dwNickSize) DB_SetStringExA(hContact,"CList","MyHandle",(LPSTR)lpwszNick,dwNickSize);
}else{
@@ -1759,7 +1759,7 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARA
DestroyWindow(hWndDlg);
break;
case WM_COMMAND:
- switch(LOWORD(wParam)){
+ switch(LOWORD(wParam)) {
case IDOK:
DestroyWindow(hWndDlg);
break;
@@ -1895,7 +1895,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg,UINT message,WPARAM wPa
DestroyWindow(hWndDlg);
break;
case WM_COMMAND:
- switch(LOWORD(wParam)){
+ switch(LOWORD(wParam)) {
case IDOK:
{
DWORD dwFlags;
diff --git a/protocols/MRA/Mra_options.cpp b/protocols/MRA/Mra_options.cpp
index b0f1484843..d478ac5308 100644
--- a/protocols/MRA/Mra_options.cpp
+++ b/protocols/MRA/Mra_options.cpp
@@ -72,7 +72,7 @@ INT_PTR CALLBACK DlgProcOptsAccount(HWND hWndDlg,UINT msg,WPARAM wParam,LPARAM l
}
return(TRUE);
case WM_COMMAND:
- switch (LOWORD(wParam)){
+ switch (LOWORD(wParam)) {
case IDC_NEW_ACCOUNT_LINK:
CallService(MS_UTILS_OPENURL,TRUE,(LPARAM)MRA_REGISTER_URL);
return(TRUE);
@@ -152,7 +152,7 @@ INT_PTR CALLBACK DlgProcOptsConnections(HWND hWndDlg,UINT msg,WPARAM wParam,LPAR
}
return(TRUE);
case WM_COMMAND:
- switch(LOWORD(wParam)){
+ switch(LOWORD(wParam)) {
case IDC_BUTTON_DEFAULT:
SET_DLG_ITEM_TEXTA(hWndDlg,IDC_SERVER,MRA_DEFAULT_SERVER);
SetDlgItemInt(hWndDlg,IDC_SERVERPORT,MRA_DEFAULT_SERVER_PORT,FALSE);
diff --git a/protocols/MRA/Mra_proto.cpp b/protocols/MRA/Mra_proto.cpp
index 7d1c865d5f..04e6023dd8 100644
--- a/protocols/MRA/Mra_proto.cpp
+++ b/protocols/MRA/Mra_proto.cpp
@@ -230,7 +230,7 @@ DWORD MraGetNLBData(LPSTR lpszHost,SIZE_T dwHostBuffSize,WORD *pwPort)
while(MraGetStatus(0,0)!=ID_STATUS_OFFLINE && bContinue)
{
- switch(CallService(MS_NETLIB_SELECT,0,(LPARAM)&nls)){
+ switch(CallService(MS_NETLIB_SELECT,0,(LPARAM)&nls)) {
case SOCKET_ERROR:
case 0:// Time out
bContinue=FALSE;
@@ -951,7 +951,7 @@ DWORD MraCommandDispather(mrim_packet_header_t *pmaHeader,DWORD *pdwPingPeriod,D
case MRIM_CS_ANKETA_INFO:
if (MraSendQueueFind(masMraSettings.hSendQueueHandle,pmaHeader->seq,NULL,&hContact,&dwAckType,(LPBYTE*)&lpsString.lpszData,&lpsString.dwSize)==NO_ERROR)
{
- switch(GetUL(&lpbDataCurrent)){
+ switch(GetUL(&lpbDataCurrent)) {
case MRIM_ANKETA_INFO_STATUS_OK:// поиск успешно завершен
{
DWORD dwFeildsNum,dwMaxRows,dwServerTime,dwStatus;
@@ -1014,7 +1014,7 @@ DWORD MraCommandDispather(mrim_packet_header_t *pmaHeader,DWORD *pdwPingPeriod,D
}else
if (CompareStringA(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),NORM_IGNORECASE,pmralpsFeilds[i].lpszData,pmralpsFeilds[i].dwSize,"Sex",3)==CSTR_EQUAL)
{
- switch(StrToUNum32(pmralpsValues[i].lpszData,pmralpsValues[i].dwSize)){
+ switch(StrToUNum32(pmralpsValues[i].lpszData,pmralpsValues[i].dwSize)) {
case 1:// мужской
DB_Mra_SetByte(hContact,"Gender",'M');
break;
@@ -1400,7 +1400,7 @@ DWORD MraCommandDispather(mrim_packet_header_t *pmaHeader,DWORD *pdwPingPeriod,D
dwControlParam=0;
for(j=0;j<dwGroupMaskSize;j++)//enumerating parameters
{
- switch(szGroupMask[j]){
+ switch(szGroupMask[j]) {
case 's'://LPS
GetLPS(lpbData,dwDataSize,&lpbDataCurrent,&lpsString);
break;
@@ -1463,7 +1463,7 @@ DWORD MraCommandDispather(mrim_packet_header_t *pmaHeader,DWORD *pdwPingPeriod,D
dwControlParam=0;
for(j=0;j<dwContactMaskSize;j++)//enumerating parameters
{
- switch(szContactMask[j]){
+ switch(szContactMask[j]) {
case 's'://LPS
GetLPS(lpbData,dwDataSize,&lpbDataCurrent,&lpsString);
break;
@@ -1645,7 +1645,7 @@ DWORD MraCommandDispather(mrim_packet_header_t *pmaHeader,DWORD *pdwPingPeriod,D
DebugBreak();
}else{
dwTemp=GetMiradaStatusFromMraStatus(dwStatus,GetMraXStatusIDFromMraUriStatus(lpsSpecStatusUri.lpszData,lpsSpecStatusUri.dwSize),&dwXStatus);
- if((dwContactFlag&CONTACT_FLAG_UNICODE_NAME)) mralpsNick.dwSize/=sizeof(WCHAR);
+ if ((dwContactFlag&CONTACT_FLAG_UNICODE_NAME)) mralpsNick.dwSize/=sizeof(WCHAR);
if (bAdded)
{// update user info
diff --git a/protocols/MRA/Sdk/Base64.h b/protocols/MRA/Sdk/Base64.h
index f371399a06..24d7605c47 100644
--- a/protocols/MRA/Sdk/Base64.h
+++ b/protocols/MRA/Sdk/Base64.h
@@ -271,8 +271,8 @@ __inline DWORD BASE64DecodeUnSafe(LPCVOID lpcSource,SIZE_T dwSourceSize,LPCVOID
}
dwDecodedSize=(lpbtDestination-((LPBYTE)lpcDestination));
- if((*((BYTE*)lpcSource+(dwSourceSize-1)))=='=') dwDecodedSize--;
- if((*((BYTE*)lpcSource+(dwSourceSize-2)))=='=') dwDecodedSize--;
+ if ((*((BYTE*)lpcSource+(dwSourceSize-1)))=='=') dwDecodedSize--;
+ if ((*((BYTE*)lpcSource+(dwSourceSize-2)))=='=') dwDecodedSize--;
#else
@@ -329,8 +329,8 @@ __inline DWORD BASE64DecodeUnSafe(LPCVOID lpcSource,SIZE_T dwSourceSize,LPCVOID
pop ebx // восстанавливаем содержимое регистра
}
- if((*((BYTE*)lpcSource+(dwSourceSize-1)))=='=') dwDecodedSize--;
- if((*((BYTE*)lpcSource+(dwSourceSize-2)))=='=') dwDecodedSize--;
+ if ((*((BYTE*)lpcSource+(dwSourceSize-1)))=='=') dwDecodedSize--;
+ if ((*((BYTE*)lpcSource+(dwSourceSize-2)))=='=') dwDecodedSize--;
#endif
dwRetErrorCode=NO_ERROR;
}else{// во входном буффере слишком мало данных