From 30ab6ceb71842f003f649b3d62b89af010cf40d1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 20 Jun 2012 17:00:14 +0000 Subject: - direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call; - obsolete structure SKINSOUNDDESC removed - dynamically translated hot keys; - checked correct LPGEN'ing of the sounds creation; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Yahoo/avatar.cpp | 2 +- protocols/Yahoo/file_transfer.cpp | 2 +- protocols/Yahoo/http_gateway.cpp | 4 ++-- protocols/Yahoo/libyahoo2/libyahoo2.c | 6 +++--- protocols/Yahoo/libyahoo2/yahoo_httplib.c | 10 +++++----- protocols/Yahoo/options.cpp | 2 +- protocols/Yahoo/proto.cpp | 6 +++--- protocols/Yahoo/server.cpp | 2 +- protocols/Yahoo/services.cpp | 4 ++-- protocols/Yahoo/util.cpp | 6 +++--- 10 files changed, 22 insertions(+), 22 deletions(-) (limited to 'protocols/Yahoo') diff --git a/protocols/Yahoo/avatar.cpp b/protocols/Yahoo/avatar.cpp index 254acfd07f..3f263bf4c5 100644 --- a/protocols/Yahoo/avatar.cpp +++ b/protocols/Yahoo/avatar.cpp @@ -554,7 +554,7 @@ void CYahooProto::ext_got_picture_upload(const char *me, const char *url,unsigne SetString(NULL, "AvatarURL", url); //YAHOO_SetDword("AvatarExpires", ts); - if (!GetString("AvatarInv", &dbv) ) { + if (!GetString("AvatarInv", &dbv)) { LOG(("[ext_yahoo_got_picture_upload] Buddy: %s told us this is bad??", dbv.pszVal)); LOG(("[ext_yahoo_got_picture] Sending url: %s checksum: %d to '%s'!", url, cksum, dbv.pszVal)); diff --git a/protocols/Yahoo/file_transfer.cpp b/protocols/Yahoo/file_transfer.cpp index 038ba3ea05..85f091b81c 100644 --- a/protocols/Yahoo/file_transfer.cpp +++ b/protocols/Yahoo/file_transfer.cpp @@ -653,7 +653,7 @@ void ext_yahoo_send_file7info(int id, const char *me, const char *who, const cha PHOSTENT he = gethostbyname("relay.msg.yahoo.com"); if (he) { - ft->relay = strdup( inet_ntoa(*( PIN_ADDR )he->h_addr_list[0]) ); + ft->relay = strdup( inet_ntoa(*( PIN_ADDR )he->h_addr_list[0])); LOG(("Got Relay IP: %s", ft->relay)); } else { ft->relay = strdup( "98.136.112.33" ); diff --git a/protocols/Yahoo/http_gateway.cpp b/protocols/Yahoo/http_gateway.cpp index 7d7cb37a73..e62219f108 100644 --- a/protocols/Yahoo/http_gateway.cpp +++ b/protocols/Yahoo/http_gateway.cpp @@ -21,7 +21,7 @@ int YAHOO_httpGatewayInit(HANDLE hConn, NETLIBOPENCONNECTION *nloc, NETLIBHTTPRE DebugLog("YAHOO_httpGatewayInit!!!"); - ZeroMemory(&nlhpi, sizeof(nlhpi) ); + ZeroMemory(&nlhpi, sizeof(nlhpi)); nlhpi.cbSize = sizeof(nlhpi); nlhpi.szHttpPostUrl = "http://shttp.msg.yahoo.com/notify/"; @@ -71,7 +71,7 @@ PBYTE YAHOO_httpGatewayUnwrapRecv(NETLIBHTTPREQUEST *nlhr, PBYTE buf, int len, i if (len == 4) { *outBufLen = 0; return buf; - } else if ( (buf[4] == 'Y') && (buf[5] == 'M') && (buf[6] == 'S') && (buf[7] == 'G') ) { + } else if ( (buf[4] == 'Y') && (buf[5] == 'M') && (buf[6] == 'S') && (buf[7] == 'G')) { MoveMemory( buf, buf + 4, len - 4); *outBufLen = len-4;// we take off 4 bytes from the beginning diff --git a/protocols/Yahoo/libyahoo2/libyahoo2.c b/protocols/Yahoo/libyahoo2/libyahoo2.c index 558a355e94..77802f4ca2 100644 --- a/protocols/Yahoo/libyahoo2/libyahoo2.c +++ b/protocols/Yahoo/libyahoo2/libyahoo2.c @@ -406,7 +406,7 @@ const char *dbg_key(int key) { int i=0; - while ((packet_keys[i].key >=0) && (packet_keys[i].key != key) ) + while ((packet_keys[i].key >=0) && (packet_keys[i].key != key)) i++; if (packet_keys[i].key != key) @@ -419,7 +419,7 @@ const char *dbg_service(int key) { int i=0; - while ((ymsg_service_vals[i].key > 0) && (ymsg_service_vals[i].key != key) ) + while ((ymsg_service_vals[i].key > 0) && (ymsg_service_vals[i].key != key)) i++; if (ymsg_service_vals[i].key != key) @@ -1008,7 +1008,7 @@ static void yahoo_send_packet(struct yahoo_input_data *yid, struct yahoo_packet ( yid->type == YAHOO_CONNECTION_PAGER && ( pkt->service == YAHOO_SERVICE_KEEPALIVE || pkt->service == YAHOO_SERVICE_PING || - pkt->service == YAHOO_SERVICE_LOGOFF) ) + pkt->service == YAHOO_SERVICE_LOGOFF)) ) { yahoo_send_data(yid->fd, (const char *)data, len); } else { diff --git a/protocols/Yahoo/libyahoo2/yahoo_httplib.c b/protocols/Yahoo/libyahoo2/yahoo_httplib.c index c7bcb55858..7305157d83 100644 --- a/protocols/Yahoo/libyahoo2/yahoo_httplib.c +++ b/protocols/Yahoo/libyahoo2/yahoo_httplib.c @@ -158,7 +158,7 @@ char *yahoo_urlencode(const char *instr) char *str = NULL; int len = strlen(instr); - if (!(str = y_new(char, 3*len + 1) )) + if (!(str = y_new(char, 3*len + 1))) return ""; while(instr[ipos]) { @@ -188,7 +188,7 @@ char *yahoo_urldecode(const char *instr) unsigned dec; int len = strlen(instr); - if (!(str = y_new(char, len+1) )) + if (!(str = y_new(char, len+1))) return ""; while(instr[ipos]) { @@ -235,7 +235,7 @@ char *yahoo_xmldecode(const char *instr) unsigned dec; int len = strlen(instr); - if (!(str = y_new(char, len+1) )) + if (!(str = y_new(char, len+1))) return ""; while(instr[ipos]) { @@ -398,14 +398,14 @@ static void yahoo_got_url_fd(int id, int fd, int error, void *data) break; if ( !strncasecmp(buff, "Content-length:", - strlen("Content-length:")) ) { + strlen("Content-length:"))) { tmp = strrchr(buff, ' '); if(tmp) filesize = atol(tmp); } if ( !strncasecmp(buff, "Content-disposition:", - strlen("Content-disposition:")) ) { + strlen("Content-disposition:"))) { tmp = strstr(buff, "name="); if(tmp) { tmp+=strlen("name="); diff --git a/protocols/Yahoo/options.cpp b/protocols/Yahoo/options.cpp index 6acd8c0dca..8ed3168650 100644 --- a/protocols/Yahoo/options.cpp +++ b/protocols/Yahoo/options.cpp @@ -182,7 +182,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsConn(HWND hwndDlg, UINT msg, WPARAM wPar SetDlgItemInt( hwndDlg, IDC_YAHOOPORT, ppro->GetWord( NULL, YAHOO_LOGINPORT, YAHOO_DEFAULT_PORT ), FALSE ); - SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ) ); + SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 )); return TRUE; case WM_COMMAND: diff --git a/protocols/Yahoo/proto.cpp b/protocols/Yahoo/proto.cpp index 268bdc7358..1fc2ef8af8 100644 --- a/protocols/Yahoo/proto.cpp +++ b/protocols/Yahoo/proto.cpp @@ -198,7 +198,7 @@ HANDLE __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDL blob is: uin(DWORD), hcontact(HANDLE), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ) */ - memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD ) ), sizeof(HANDLE)); + memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD )), sizeof(HANDLE)); if (hContact != NULL) { DebugLog("Temp Buddy found at: %p ", hContact); @@ -236,7 +236,7 @@ int CYahooProto::Authorize( HANDLE hdbe ) return 1; HANDLE hContact; - memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD ) ), sizeof(HANDLE)); + memcpy(&hContact,( char* )( dbei.pBlob + sizeof( DWORD )), sizeof(HANDLE)); /* Need to remove the buddy from our Miranda Lists */ @@ -848,7 +848,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM DBFreeVariant(&dbv); } - SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 ) ); + SetButtonCheck( hwndDlg, IDC_YAHOO_JAPAN, ppro->GetByte( "YahooJapan", 0 )); return TRUE; } diff --git a/protocols/Yahoo/server.cpp b/protocols/Yahoo/server.cpp index 0de8fe2f5d..0a6886e037 100644 --- a/protocols/Yahoo/server.cpp +++ b/protocols/Yahoo/server.cpp @@ -144,7 +144,7 @@ void __cdecl CYahooProto::server_main(void *empty) DebugLog("[SERVER] Got packets: %d", ylad->rpkts); if ( m_bLoggedIn && ( (ylad->rpkts > 0 && (time(NULL) - lLastSend) >=3) || - ( (time(NULL) - lLastSend) >= 13) ) ) { + ( (time(NULL) - lLastSend) >= 13)) ) { LOG(("[TIMER] Sending an idle message...")); yahoo_send_idle_packet(m_id); diff --git a/protocols/Yahoo/services.cpp b/protocols/Yahoo/services.cpp index a6e7fa5012..363c000ad2 100644 --- a/protocols/Yahoo/services.cpp +++ b/protocols/Yahoo/services.cpp @@ -130,8 +130,8 @@ static INT_PTR CALLBACK DlgProcSetCustStat(HWND hwndDlg, UINT msg, WPARAM wParam CYahooProto* ppro = ( CYahooProto* )lParam; SetWindowLongPtr( hwndDlg, GWLP_USERDATA, lParam ); - SendMessage( hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)ppro->LoadIconEx( "yahoo", true ) ); - SendMessage( hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)ppro->LoadIconEx( "yahoo" ) ); + SendMessage( hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)ppro->LoadIconEx( "yahoo", true )); + SendMessage( hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)ppro->LoadIconEx( "yahoo" )); if ( !DBGetContactSettingString( NULL, ppro->m_szModuleName, YAHOO_CUSTSTATDB, &dbv )) { SetDlgItemTextA( hwndDlg, IDC_CUSTSTAT, dbv. pszVal ); diff --git a/protocols/Yahoo/util.cpp b/protocols/Yahoo/util.cpp index 197bc37497..6be9439380 100644 --- a/protocols/Yahoo/util.cpp +++ b/protocols/Yahoo/util.cpp @@ -29,7 +29,7 @@ void CYahooProto::YCreateService( const char* szService, YServiceFunc servicePro len = snprintf(str, sizeof(str), "%s%s", m_szModuleName, szService); - if (len >= sizeof(str) ) { + if (len >= sizeof(str)) { DebugLog("[YCreateService] Failed Registering Service: %s. Reason: buffer too small?", szService); return; } @@ -162,7 +162,7 @@ int CYahooProto::SendBroadcast( HANDLE hContact, int type, int result, HANDLE hP { ACKDATA ack; - ZeroMemory(&ack, sizeof(ack) ); + ZeroMemory(&ack, sizeof(ack)); ack.cbSize = sizeof( ACKDATA ); ack.szModule = m_szModuleName; @@ -247,7 +247,7 @@ int CYahooProto::ShowPopup( const char* nickname, const char* msg, const char *s if ( !ServiceExists( MS_POPUP_ADDPOPUPEX )) return 0; - ZeroMemory(&ppd, sizeof(ppd) ); + ZeroMemory(&ppd, sizeof(ppd)); lstrcpyA( ppd.lpzContactName, nickname ); lstrcpyA( ppd.lpzText, msg ); -- cgit v1.2.3