summaryrefslogtreecommitdiff
path: root/protocols/Yahoo
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/Yahoo
parentce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff)
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo')
-rw-r--r--protocols/Yahoo/avatar.cpp12
-rw-r--r--protocols/Yahoo/file_transfer.cpp6
-rw-r--r--protocols/Yahoo/im.cpp12
-rw-r--r--protocols/Yahoo/libyahoo2/libyahoo2.c228
-rw-r--r--protocols/Yahoo/libyahoo2/yahoo_httplib.c32
-rw-r--r--protocols/Yahoo/libyahoo2/yahoo_list.c8
-rw-r--r--protocols/Yahoo/options.cpp2
-rw-r--r--protocols/Yahoo/proto.cpp14
-rw-r--r--protocols/Yahoo/services.cpp4
-rw-r--r--protocols/Yahoo/util.cpp4
-rw-r--r--protocols/Yahoo/yahoo.cpp10
11 files changed, 166 insertions, 166 deletions
diff --git a/protocols/Yahoo/avatar.cpp b/protocols/Yahoo/avatar.cpp
index 4ad7233cb9..9b093ccb3d 100644
--- a/protocols/Yahoo/avatar.cpp
+++ b/protocols/Yahoo/avatar.cpp
@@ -37,7 +37,7 @@ int YAHOO_avt_hash(const char *key, DWORD len)
while(i--) {
checksum = (checksum << 4) + *p++;
- if((g = (checksum & 0xf0000000)) != 0)
+ if ((g = (checksum & 0xf0000000)) != 0)
checksum ^= g >> 23;
checksum &= ~g;
@@ -186,7 +186,7 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt)
SetDword(hContact, "PictLoading", 1);
}
- if(!error) {
+ if (!error) {
NETLIBHTTPREQUEST nlhr={0},*nlhrReply;
@@ -406,7 +406,7 @@ void CYahooProto::ext_got_picture(const char *me, const char *who, const char *p
LOG(("[ext_yahoo_got_picture] My Checksum: %d", mcksum));
- if (!DBGetContactSettingString(NULL, m_szModuleName, "AvatarURL", &dbv)){
+ if (!DBGetContactSettingString(NULL, m_szModuleName, "AvatarURL", &dbv)) {
if (lstrcmpiA(pic_url, dbv.pszVal) == 0) {
DBVARIANT dbv2;
/*time_t ts;
@@ -562,7 +562,7 @@ void CYahooProto::ext_got_picture_upload(const char *me, const char *url,unsigne
SetString(NULL, "AvatarURL", url);
//YAHOO_SetDword("AvatarExpires", ts);
- if (!DBGetContactSettingString(NULL, m_szModuleName, "AvatarInv", &dbv) ){
+ if (!DBGetContactSettingString(NULL, m_szModuleName, "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));
@@ -809,8 +809,8 @@ INT_PTR __cdecl CYahooProto::GetMyAvatar(WPARAM wParam, LPARAM lParam)
DBVARIANT dbv;
int ret = -3;
- if (GetDword("AvatarHash", 0)){
- if (!DBGetContactSettingTString(NULL, m_szModuleName, "AvatarFile", &dbv)){
+ if (GetDword("AvatarHash", 0)) {
+ if (!DBGetContactSettingTString(NULL, m_szModuleName, "AvatarFile", &dbv)) {
if (_taccess(dbv.ptszVal, 0) == 0){
lstrcpyn(buffer, dbv.ptszVal, size-1);
buffer[size-1] = '\0';
diff --git a/protocols/Yahoo/file_transfer.cpp b/protocols/Yahoo/file_transfer.cpp
index c18ef4c22b..58958c3c4a 100644
--- a/protocols/Yahoo/file_transfer.cpp
+++ b/protocols/Yahoo/file_transfer.cpp
@@ -162,7 +162,7 @@ static void upload_file(int id, int fd, int error, void *data)
error = 1;
}
- if(!error) {
+ if (!error) {
HANDLE myhFile = CreateFile(sf->pfts.tszCurrentFile,
GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE,
@@ -304,7 +304,7 @@ static void dl_file(int id, int fd, int error, const char *filename, unsigned lo
error = 1;
}
- if(!error) {
+ if (!error) {
HANDLE myhFile;
TCHAR filefull[MAX_PATH];
@@ -734,7 +734,7 @@ HANDLE __cdecl CYahooProto::SendFile( HANDLE hContact, const PROTOCHAR* szDescri
/*DebugLog("Getting Files");
- if ( ppszFiles[1] != NULL ){
+ if ( ppszFiles[1] != NULL ) {
MessageBoxA(NULL, "YAHOO protocol allows only one file to be sent at a time", "Yahoo", MB_OK | MB_ICONINFORMATION);
return 0;
}
diff --git a/protocols/Yahoo/im.cpp b/protocols/Yahoo/im.cpp
index 455a545b74..03360e2374 100644
--- a/protocols/Yahoo/im.cpp
+++ b/protocols/Yahoo/im.cpp
@@ -50,7 +50,7 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons
return;
}
- if(!msg) {
+ if (!msg) {
LOG(("Empty Incoming Message, exiting."));
return;
}
@@ -80,15 +80,15 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons
// strip the fade tag
!_strnicmp(c, "<FADE ",6) || !_strnicmp(c,"</FADE>",7) ||
// strip the alternate colors tag
- !_strnicmp(c, "<ALT ",5) || !_strnicmp(c, "</ALT>",6)){
+ !_strnicmp(c, "<ALT ",5) || !_strnicmp(c, "</ALT>",6)) {
while ((*c++ != '>') && (*c != '\0'));
} else
// strip ANSI color combination
- if ((*c == 0x1b) && (*(c+1) == '[')){
+ if ((*c == 0x1b) && (*(c+1) == '[')) {
while ((*c++ != 'm') && (*c != '\0'));
} else
- if (*c != '\0'){
+ if (*c != '\0') {
umsg[oidx++] = *c;
/* Adding \r to \r\n conversion */
@@ -104,7 +104,7 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons
/* Need to strip off formatting stuff first. Then do all decoding/converting */
LOG(("%s: %s", who, umsg));
- //if(!strcmp(umsg, "<ding>"))
+ //if (!strcmp(umsg, "<ding>"))
// :P("\a");
ccs.szProtoService = PSR_MESSAGE;
@@ -236,7 +236,7 @@ int __cdecl CYahooProto::RecvMsg( HANDLE hContact, PROTORECVEVENT* pre )
DBDeleteContactSetting(hContact, "CList", "Hidden");
// NUDGES
- if( !lstrcmpA(pre->szMessage, "<ding>") && ServiceExists("NUDGE/Send")){
+ if ( !lstrcmpA(pre->szMessage, "<ding>") && ServiceExists("NUDGE/Send")) {
DebugLog("[YahooRecvMessage] Doing Nudge Service!");
NotifyEventHooks(hYahooNudge, (WPARAM)hContact, pre->timestamp);
return 0;
diff --git a/protocols/Yahoo/libyahoo2/libyahoo2.c b/protocols/Yahoo/libyahoo2/libyahoo2.c
index e118a76d18..287e4a3b9f 100644
--- a/protocols/Yahoo/libyahoo2/libyahoo2.c
+++ b/protocols/Yahoo/libyahoo2/libyahoo2.c
@@ -471,45 +471,45 @@ static struct yahoo_server_settings * _yahoo_assign_server_settings(va_list ap)
if(key == NULL)
break;
- if(!strcmp(key, "pager_host")) {
+ if (!strcmp(key, "pager_host")) {
svalue = va_arg(ap, char *);
free(yss->pager_host);
yss->pager_host = strdup(svalue);
- } else if(!strcmp(key, "pager_port")) {
+ } else if (!strcmp(key, "pager_port")) {
nvalue = va_arg(ap, int);
yss->pager_port = nvalue;
- } else if(!strcmp(key, "filetransfer_host")) {
+ } else if (!strcmp(key, "filetransfer_host")) {
svalue = va_arg(ap, char *);
free(yss->filetransfer_host);
yss->filetransfer_host = strdup(svalue);
- } else if(!strcmp(key, "filetransfer_port")) {
+ } else if (!strcmp(key, "filetransfer_port")) {
nvalue = va_arg(ap, int);
yss->filetransfer_port = nvalue;
- } else if(!strcmp(key, "webcam_host")) {
+ } else if (!strcmp(key, "webcam_host")) {
svalue = va_arg(ap, char *);
free(yss->webcam_host);
yss->webcam_host = strdup(svalue);
- } else if(!strcmp(key, "webcam_port")) {
+ } else if (!strcmp(key, "webcam_port")) {
nvalue = va_arg(ap, int);
yss->webcam_port = nvalue;
- } else if(!strcmp(key, "webcam_description")) {
+ } else if (!strcmp(key, "webcam_description")) {
svalue = va_arg(ap, char *);
free(yss->webcam_description);
yss->webcam_description = strdup(svalue);
- } else if(!strcmp(key, "local_host")) {
+ } else if (!strcmp(key, "local_host")) {
svalue = va_arg(ap, char *);
free(yss->local_host);
yss->local_host = strdup(svalue);
- } else if(!strcmp(key, "conn_type")) {
+ } else if (!strcmp(key, "conn_type")) {
nvalue = va_arg(ap, int);
yss->conn_type = nvalue;
- } else if(!strcmp(key, "picture_checksum")) {
+ } else if (!strcmp(key, "picture_checksum")) {
nvalue = va_arg(ap, int);
yss->pic_cksum = nvalue;
- } else if(!strcmp(key, "web_messenger")) {
+ } else if (!strcmp(key, "web_messenger")) {
nvalue = va_arg(ap, int);
yss->web_messenger = nvalue;
- } else if(!strcmp(key, "login_host")) {
+ } else if (!strcmp(key, "login_host")) {
svalue = va_arg(ap, char *);
free(yss->login_host);
yss->login_host = strdup(svalue);
@@ -525,7 +525,7 @@ static struct yahoo_server_settings * _yahoo_assign_server_settings(va_list ap)
static void yahoo_free_server_settings(struct yahoo_server_settings *yss)
{
- if(!yss)
+ if (!yss)
return;
free(yss->pager_host);
@@ -642,7 +642,7 @@ static void yahoo_free_buddies(YList * list)
for(l = list; l; l = l->next)
{
struct yahoo_buddy *bud = (struct yahoo_buddy *) l->data;
- if(!bud)
+ if (!bud)
continue;
FREE(bud->group);
@@ -973,7 +973,7 @@ static void yahoo_add_to_send_queue(struct yahoo_input_data *yid, void *data, in
yid->txqueues = y_list_append(yid->txqueues, tx);
- if(!yid->write_tag)
+ if (!yid->write_tag)
yid->write_tag=YAHOO_CALLBACK(ext_yahoo_add_handler)(yid->yd->client_id, yid->fd, YAHOO_INPUT_WRITE, yid);
}
@@ -1004,7 +1004,7 @@ static void yahoo_send_packet(struct yahoo_input_data *yid, struct yahoo_packet
yahoo_packet_read(pkt, data + pos, len - pos);
- if( yid->type == YAHOO_CONNECTION_FT ||
+ if ( yid->type == YAHOO_CONNECTION_FT ||
( yid->type == YAHOO_CONNECTION_PAGER &&
( pkt->service == YAHOO_SERVICE_KEEPALIVE ||
pkt->service == YAHOO_SERVICE_PING ||
@@ -1060,7 +1060,7 @@ static int yahoo_send_data(int fd, const char *data, int len)
void yahoo_close(int id)
{
struct yahoo_data *yd = find_conn_by_id(id);
- if(!yd)
+ if (!yd)
return;
del_from_list(yd);
@@ -1620,16 +1620,16 @@ static void yahoo_process_conference(struct yahoo_input_data *yid, struct yahoo_
utf8 = atoi(pair->value);
}
- if(!room)
+ if (!room)
return;
if(host) {
for(l = members; l; l = l->next) {
char * w = (char *) l->data;
- if(!strcmp(w, host))
+ if (!strcmp(w, host))
break;
}
- if(!l)
+ if (!l)
members = y_list_append(members, strdup(host));
}
/* invite, decline, join, left, message -> status == 1 */
@@ -1765,7 +1765,7 @@ static void yahoo_process_chat(struct yahoo_input_data *yid, struct yahoo_packet
}
}
- if(!room) {
+ if (!room) {
if (pkt->service == YAHOO_SERVICE_CHATLOGOUT) { /* yahoo originated chat logout */
YAHOO_CALLBACK(ext_yahoo_chat_yahoologout)(yid->yd->client_id, id);
return ;
@@ -1845,7 +1845,7 @@ static void yahoo_process_message(struct yahoo_input_data *yid, struct yahoo_pac
switch (pair->key) {
/*case 1: */
case 4:
- if(!message->from)
+ if (!message->from)
message->from = pair->value;
break;
@@ -2979,9 +2979,9 @@ static void yahoo_process_buddyadd(struct yahoo_input_data *yid, struct yahoo_pa
//yahoo_dump_unhandled(pkt);
- if(!who)
+ if (!who)
return;
- if(!where)
+ if (!where)
where = "Unknown";
bud = y_new0(struct yahoo_buddy, 1);
@@ -3037,7 +3037,7 @@ static void yahoo_process_buddydel(struct yahoo_input_data *yid, struct yahoo_pa
}
}
- if(!who || !where)
+ if (!who || !where)
return;
bud = y_new0(struct yahoo_buddy, 1);
@@ -3266,7 +3266,7 @@ void yahoo_send_picture_info(int id, const char *who, int type, const char *pic_
struct yahoo_packet *pkt = NULL;
struct yahoo_server_settings *yss;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -3299,7 +3299,7 @@ void yahoo_send_picture_update(int id, const char *who, int type)
struct yahoo_packet *pkt = NULL;
struct yahoo_server_settings *yss;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -3326,7 +3326,7 @@ void yahoo_send_picture_checksum(int id, const char *who, int cksum)
struct yahoo_packet *pkt = NULL;
struct yahoo_server_settings *yss;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -3359,7 +3359,7 @@ void yahoo_send_picture_status(int id, int buddy_icon)
struct yahoo_packet *pkt = NULL;
struct yahoo_server_settings *yss;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -3693,7 +3693,7 @@ static void yahoo_process_webcam_key(struct yahoo_input_data *yid, struct yahoo_
}
l = webcam_queue;
- if(!l)
+ if (!l)
return;
who = (char *) l->data;
@@ -3871,7 +3871,7 @@ static struct yahoo_packet * yahoo_getdata(struct yahoo_input_data * yid)
int pos = 0;
int pktlen;
- if(!yd)
+ if (!yd)
return NULL;
DEBUG_MSG(("rxlen is %d", yid->rxlen));
@@ -4009,7 +4009,7 @@ static struct yab * yahoo_getyab(struct yahoo_input_data *yid)
int pos = 0, end=0;
struct yahoo_data *yd = yid->yd;
- if(!yd)
+ if (!yd)
return NULL;
//DEBUG_MSG(("rxlen is %d", yid->rxlen));
@@ -4061,7 +4061,7 @@ static char * yahoo_getwebcam_master(struct yahoo_input_data *yid)
char *server=NULL;
struct yahoo_data *yd = yid->yd;
- if(!yid || !yd)
+ if (!yid || !yd)
return NULL;
DEBUG_MSG(("rxlen is %d", yid->rxlen));
@@ -4114,10 +4114,10 @@ static int yahoo_get_webcam_data(struct yahoo_input_data *yid)
int connect=0;
struct yahoo_data *yd = yid->yd;
- if(!yd)
+ if (!yd)
return -1;
- if(!yid->wcm || !yid->wcd || !yid->rxlen)
+ if (!yid->wcm || !yid->wcd || !yid->rxlen)
return -1;
DEBUG_MSG(("rxlen is %d", yid->rxlen));
@@ -4272,7 +4272,7 @@ int yahoo_write_ready(int id, int fd, void *data)
struct data_queue *tx;
LOG(("write callback: id=%d fd=%d data=%p", id, fd, data));
- if(!yid || !yid->txqueues)
+ if (!yid || !yid->txqueues)
return -2;
tx = (struct data_queue *) yid->txqueues->data;
@@ -4313,7 +4313,7 @@ int yahoo_write_ready(int id, int fd, void *data)
free(tx);
yid->txqueues = y_list_remove_link(yid->txqueues, yid->txqueues);
y_list_free_1(l);
- if(!yid->txqueues) {
+ if (!yid->txqueues) {
//LOG(("yahoo_write_ready(%d, %d) !txqueues", id, fd));
YAHOO_CALLBACK(ext_yahoo_remove_handler)(id, yid->write_tag);
yid->write_tag = 0;
@@ -4372,7 +4372,7 @@ static void yahoo_process_yab_connection(struct yahoo_input_data *yid, int over)
while(find_input_by_id_and_type(id, YAHOO_CONNECTION_YAB)
&& (yab = yahoo_getyab(yid)) != NULL) {
- if(!yab->id)
+ if (!yab->id)
continue;
//changed=1;
@@ -4380,7 +4380,7 @@ static void yahoo_process_yab_connection(struct yahoo_input_data *yid, int over)
for(buds = yd->buddies; buds; buds=buds->next) {
struct yahoo_buddy * bud = (struct yahoo_buddy *) buds->data;
- if(!strcmp(bud->id, yab->id)) {
+ if (!strcmp(bud->id, yab->id)) {
yab_used = TRUE;
bud->yab_entry = yab;
if(yab->nname) {
@@ -4432,7 +4432,7 @@ static void yahoo_process_search_connection(struct yahoo_input_data *yid, int ov
pyid = find_input_by_id_and_type(yid->yd->client_id, YAHOO_CONNECTION_PAGER);
- if(!over || !pyid) {
+ if (!over || !pyid) {
LOG(("yahoo_process_search_connection] ?? Not Done yet? Waiting for more packets!"));
return;
}
@@ -4458,7 +4458,7 @@ static void yahoo_process_search_connection(struct yahoo_input_data *yid, int ov
cp = p;
np = strchr(p, 4);
- if(!np)
+ if (!np)
break;
*np = 0;
p = np+1;
@@ -4685,7 +4685,7 @@ int yahoo_read_ready(int id, int fd, void *data)
int len;
//LOG(("read callback: id=%d fd=%d data=%p", id, fd, data));
- if(!yid)
+ if (!yid)
return -2;
@@ -4746,7 +4746,7 @@ int yahoo_init_with_attributes(const char *username, const char *password, const
yd = y_new0(struct yahoo_data, 1);
- if(!yd)
+ if (!yd)
return 0;
yd->user = strdup(username);
@@ -4853,7 +4853,7 @@ void yahoo_login(int id, enum yahoo_status initial)
LOG(("[yahoo_login] id: %d, initial status: %d", id, initial));
- if(!yd)
+ if (!yd)
return;
yss = yd->server_settings;
@@ -4871,7 +4871,7 @@ void yahoo_login(int id, enum yahoo_status initial)
int yahoo_get_fd(int id)
{
struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER);
- if(!yid)
+ if (!yid)
return 0;
else
return yid->fd;
@@ -4884,7 +4884,7 @@ void yahoo_send_im(int id, const char *from, const char *who, int protocol, cons
struct yahoo_data *yd;
struct yahoo_server_settings *yss;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -4941,7 +4941,7 @@ void yahoo_send_typing(int id, const char *from, const char *who, int protocol,
struct yahoo_packet *pkt = NULL;
struct yahoo_server_settings *yss;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -4980,7 +4980,7 @@ void yahoo_set_away(int id, enum yahoo_status state, const char *msg, int away)
//int service;
enum yahoo_status cs;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5059,7 +5059,7 @@ void yahoo_set_stealth(int id, const char *buddy, int protocol, int add)
//int service;
//char s[4];
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5090,7 +5090,7 @@ void yahoo_logoff(int id)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5127,7 +5127,7 @@ void yahoo_get_list(int id)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5159,7 +5159,7 @@ void yahoo_get_yab(int id)
char url[1024];
char buff[1024];
- if(!yd)
+ if (!yd)
return;
yid = y_new0(struct yahoo_input_data, 1);
@@ -5188,7 +5188,7 @@ void yahoo_set_yab(int id, struct yab * yab)
char *temp;
int size = sizeof(url)-1;
- if(!yd)
+ if (!yd)
return;
yid = y_new0(struct yahoo_input_data, 1);
@@ -5271,7 +5271,7 @@ void yahoo_set_identity_status(int id, const char * identity, int active)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5290,7 +5290,7 @@ void yahoo_refresh(int id)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5306,7 +5306,7 @@ void yahoo_send_ping(int id)
struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER);
struct yahoo_data *yd;
struct yahoo_packet *pkt=NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5320,7 +5320,7 @@ void yahoo_keepalive(int id)
struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER);
struct yahoo_data *yd;
struct yahoo_packet *pkt=NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5352,7 +5352,7 @@ void yahoo_add_buddy(int id, const char *fname, const char *lname, const char *w
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5410,7 +5410,7 @@ void yahoo_remove_buddy(int id, const char *who, int protocol, const char *group
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5434,7 +5434,7 @@ void yahoo_accept_buddy(int id, const char *who, int protocol)
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5461,7 +5461,7 @@ void yahoo_reject_buddy(int id, const char *who, int protocol, const char *msg)
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5489,7 +5489,7 @@ void yahoo_ignore_buddy(int id, const char *who, int unignore)
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5510,7 +5510,7 @@ void yahoo_change_buddy_group(int id, const char *who, const char *old_group, co
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5549,7 +5549,7 @@ void yahoo_group_rename(int id, const char *old_group, const char *new_group)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5568,7 +5568,7 @@ void yahoo_conference_addinvite(int id, const char * from, const char *who, cons
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5579,7 +5579,7 @@ void yahoo_conference_addinvite(int id, const char * from, const char *who, cons
yahoo_packet_hash(pkt, 57, room);
yahoo_packet_hash(pkt, 58, msg);
yahoo_packet_hash(pkt, 13, "0");
- for(; members; members = members->next) {
+ for (; members; members = members->next) {
yahoo_packet_hash(pkt, 52, (char *)members->data);
yahoo_packet_hash(pkt, 53, (char *)members->data);
}
@@ -5596,7 +5596,7 @@ void yahoo_conference_invite(int id, const char * from, YList *who, const char *
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5604,7 +5604,7 @@ void yahoo_conference_invite(int id, const char * from, YList *who, const char *
yahoo_packet_hash(pkt, 1, (from?from:yd->user));
yahoo_packet_hash(pkt, 50, yd->user);
- for(; who; who = who->next) {
+ for (; who; who = who->next) {
yahoo_packet_hash(pkt, 52, (char *)who->data);
}
yahoo_packet_hash(pkt, 57, room);
@@ -5622,7 +5622,7 @@ void yahoo_conference_logon(int id, const char *from, YList *who, const char *ro
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5633,7 +5633,7 @@ void yahoo_conference_logon(int id, const char *from, YList *who, const char *ro
yahoo_packet_hash(pkt, 57, room);
- for(; who; who = who->next) {
+ for (; who; who = who->next) {
yahoo_packet_hash(pkt, 3, (char *)who->data);
}
@@ -5648,14 +5648,14 @@ void yahoo_conference_decline(int id, const char * from, YList *who, const char
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
pkt = yahoo_packet_new(YAHOO_SERVICE_CONFDECLINE, YPACKET_STATUS_DEFAULT, yd->session_id);
yahoo_packet_hash(pkt, 1, (from?from:yd->user));
- for(; who; who = who->next) {
+ for (; who; who = who->next) {
yahoo_packet_hash(pkt, 3, (char *)who->data);
}
yahoo_packet_hash(pkt, 57, room);
@@ -5672,14 +5672,14 @@ void yahoo_conference_logoff(int id, const char * from, YList *who, const char *
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
pkt = yahoo_packet_new(YAHOO_SERVICE_CONFLOGOFF, YPACKET_STATUS_DEFAULT, yd->session_id);
yahoo_packet_hash(pkt, 1, (from?from:yd->user));
- for(; who; who = who->next) {
+ for (; who; who = who->next) {
yahoo_packet_hash(pkt, 3, (char *)who->data);
}
yahoo_packet_hash(pkt, 57, room);
@@ -5695,14 +5695,14 @@ void yahoo_conference_message(int id, const char * from, YList *who, const char
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
pkt = yahoo_packet_new(YAHOO_SERVICE_CONFMSG, YPACKET_STATUS_DEFAULT, yd->session_id);
yahoo_packet_hash(pkt, 1, (from?from:yd->user));
- for(; who; who = who->next) {
+ for (; who; who = who->next) {
yahoo_packet_hash(pkt, 53, (char *)who->data);
}
yahoo_packet_hash(pkt, 57, room);
@@ -5723,7 +5723,7 @@ void yahoo_get_chatrooms(int id, int chatroomid)
char url[1024];
char buff[1024];
- if(!yd)
+ if (!yd)
return;
yid = y_new0(struct yahoo_input_data, 1);
@@ -5752,7 +5752,7 @@ void yahoo_chat_logon(int id, const char *from, const char *room, const char *ro
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5786,7 +5786,7 @@ void yahoo_chat_message(int id, const char *from, const char *room, const char
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5814,7 +5814,7 @@ void yahoo_chat_logoff(int id, const char *from)
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -5842,7 +5842,7 @@ void yahoo_webcam_get_feed(int id, const char *who)
struct yahoo_data *yd;
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
/*
@@ -5928,7 +5928,7 @@ void yahoo_webcam_invite(int id, const char *who)
struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER);
struct yahoo_packet *pkt;
- if(!yid)
+ if (!yid)
return;
pkt = yahoo_packet_new(YAHOO_SERVICE_NOTIFY, YPACKET_STATUS_NOTIFY, yid->yd->session_id);
@@ -5951,7 +5951,7 @@ static void yahoo_search_internal(int id, int t, const char *text, int g, int ar
char buff[1024];
char *ctext, *p;
- if(!yd)
+ if (!yd)
return;
yid = y_new0(struct yahoo_input_data, 1);
@@ -5991,10 +5991,10 @@ void yahoo_search(int id, enum yahoo_search_type t, const char *text, enum yahoo
struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER);
struct yahoo_search_state *yss;
- if(!yid)
+ if (!yid)
return;
- if(!yid->ys)
+ if (!yid->ys)
yid->ys = y_new0(struct yahoo_search_state, 1);
yss = yid->ys;
@@ -6015,7 +6015,7 @@ void yahoo_search_again(int id, int start)
struct yahoo_input_data *yid = find_input_by_id_and_type(id, YAHOO_CONNECTION_PAGER);
struct yahoo_search_state *yss;
- if(!yid || !yid->ys)
+ if (!yid || !yid->ys)
return;
yss = yid->ys;
@@ -6070,7 +6070,7 @@ static void _yahoo_send_file_connected(int id, int fd, int error, void *data)
inputs = y_list_remove(inputs, yid);
/*
while(yahoo_tcp_readline(buff, sizeof(buff), nyd->fd) > 0) {
- if(!strcmp(buff, ""))
+ if (!strcmp(buff, ""))
break;
}
@@ -6093,7 +6093,7 @@ void yahoo_send_file(int id, const char *who, const char *msg,
struct send_file_data *sfd;
const char *s;
- if(!yd)
+ if (!yd)
return;
yss = yd->server_settings;
@@ -6147,7 +6147,7 @@ void yahoo_send_file_y7(int id, const char *from, const char *to, const char *re
char url[255];
char *s;
- if(!yd)
+ if (!yd)
return;
yss = yd->server_settings;
@@ -6183,7 +6183,7 @@ void yahoo_send_avatar(int id, const char *name, unsigned long size,
struct send_file_data *sfd;
const char *s;
- if(!yd)
+ if (!yd)
return;
yss = yd->server_settings;
@@ -6237,7 +6237,7 @@ enum yahoo_status yahoo_current_status(int id)
{
struct yahoo_data *yd = find_conn_by_id(id);
- if(!yd)
+ if (!yd)
return YAHOO_STATUS_OFFLINE;
return yd->current_status;
@@ -6246,7 +6246,7 @@ enum yahoo_status yahoo_current_status(int id)
const YList * yahoo_get_buddylist(int id)
{
struct yahoo_data *yd = find_conn_by_id(id);
- if(!yd)
+ if (!yd)
return NULL;
return yd->buddies;
}
@@ -6254,7 +6254,7 @@ const YList * yahoo_get_buddylist(int id)
const YList * yahoo_get_ignorelist(int id)
{
struct yahoo_data *yd = find_conn_by_id(id);
- if(!yd)
+ if (!yd)
return NULL;
return yd->ignore;
}
@@ -6262,7 +6262,7 @@ const YList * yahoo_get_ignorelist(int id)
const YList * yahoo_get_identities(int id)
{
struct yahoo_data *yd = find_conn_by_id(id);
- if(!yd)
+ if (!yd)
return NULL;
return yd->identities;
}
@@ -6270,17 +6270,17 @@ const YList * yahoo_get_identities(int id)
const char * yahoo_get_cookie(int id, const char *which)
{
struct yahoo_data *yd = find_conn_by_id(id);
- if(!yd)
+ if (!yd)
return NULL;
- if(!strncasecmp(which, "y", 1))
+ if (!strncasecmp(which, "y", 1))
return yd->cookie_y;
- if(!strncasecmp(which, "t", 1))
+ if (!strncasecmp(which, "t", 1))
return yd->cookie_t;
- if(!strncasecmp(which, "c", 1))
+ if (!strncasecmp(which, "c", 1))
return yd->cookie_c;
- if(!strncasecmp(which, "login", 5))
+ if (!strncasecmp(which, "login", 5))
return yd->login_cookie;
- if(!strncasecmp(which, "b", 1))
+ if (!strncasecmp(which, "b", 1))
return yd->cookie_b;
return NULL;
}
@@ -6288,7 +6288,7 @@ const char * yahoo_get_cookie(int id, const char *which)
const char * yahoo_get_pw_token(int id)
{
struct yahoo_data *yd = find_conn_by_id(id);
- if(!yd)
+ if (!yd)
return NULL;
return yd->pw_token;
@@ -6298,7 +6298,7 @@ void yahoo_get_url_handle(int id, const char *url,
yahoo_get_url_handle_callback callback, void *data)
{
struct yahoo_data *yd = find_conn_by_id(id);
- if(!yd)
+ if (!yd)
return;
yahoo_get_url_fd(id, url, yd, callback, data);
@@ -6316,7 +6316,7 @@ void yahoo_request_buddy_avatar(int id, const char *buddy)
struct yahoo_packet *pkt = NULL;
struct yahoo_server_settings *yss;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -6342,7 +6342,7 @@ void yahoo_ftdc_deny(int id, const char *buddy, const char *filename, const char
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -6366,7 +6366,7 @@ void yahoo_ft7dc_accept(int id, const char *buddy, const char *ft_token)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -6388,7 +6388,7 @@ void yahoo_ft7dc_deny(int id, const char *buddy, const char *ft_token)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -6410,7 +6410,7 @@ void yahoo_ft7dc_abort(int id, const char *buddy, const char *ft_token)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -6432,7 +6432,7 @@ void yahoo_ft7dc_relay(int id, const char *buddy, const char *ft_token)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -6454,7 +6454,7 @@ void yahoo_ft7dc_nextfile(int id, const char *buddy, const char *ft_token)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -6480,7 +6480,7 @@ char *yahoo_ft7dc_send(int id, const char *buddy, YList *files)
md5_byte_t result[16];
md5_state_t ctx;
- if(!yid)
+ if (!yid)
return NULL;
md5_init(&ctx);
@@ -6541,7 +6541,7 @@ void yahoo_send_file7info(int id, const char *me, const char *who, const char *f
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid)
+ if (!yid)
return;
yd = yid->yd;
@@ -6569,7 +6569,7 @@ unsigned char *yahoo_webmessenger_idle_packet(int id, int *len)
int pos = 0;
int web_messenger = 1;
- if(!yid) {
+ if (!yid) {
DEBUG_MSG(("NO Yahoo Input Data???"));
return NULL;
}
@@ -6612,7 +6612,7 @@ void yahoo_send_idle_packet(int id)
struct yahoo_data *yd;
struct yahoo_packet *pkt = NULL;
- if(!yid) {
+ if (!yid) {
DEBUG_MSG(("NO Yahoo Input Data???"));
return;
}
@@ -6638,7 +6638,7 @@ void yahoo_send_im_ack(int id, const char *me, const char *buddy, const char *se
DEBUG_MSG(("[yahoo_send_im_ack] My Id: %s, Buddy: %s, Seq #: %s, Retry: %d", me, buddy, seqn, sendn));
- if(!yid) {
+ if (!yid) {
DEBUG_MSG(("NO Yahoo Input Data???"));
return;
}
diff --git a/protocols/Yahoo/libyahoo2/yahoo_httplib.c b/protocols/Yahoo/libyahoo2/yahoo_httplib.c
index 39b33fa2e1..c7bcb55858 100644
--- a/protocols/Yahoo/libyahoo2/yahoo_httplib.c
+++ b/protocols/Yahoo/libyahoo2/yahoo_httplib.c
@@ -126,14 +126,14 @@ int url_to_host_port_path(const char *url, char *host, int *port, char *path)
slash = strchr(urlcopy, '/');
colon = strchr(urlcopy, ':');
- if(!colon || (slash && slash < colon)) {
+ if (!colon || (slash && slash < colon)) {
*port = 80;
} else {
*colon = 0;
*port = atoi(colon+1);
}
- if(!slash) {
+ if (!slash) {
strcpy(path, "/");
} else {
strcpy(path, slash);
@@ -158,13 +158,13 @@ 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]) {
while(isurlchar(instr[ipos]))
str[bpos++] = instr[ipos++];
- if(!instr[ipos])
+ if (!instr[ipos])
break;
snprintf(&str[bpos], 4, "%%%.2x", 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]) {
@@ -198,7 +198,7 @@ char *yahoo_urldecode(const char *instr)
ipos++;
} else
str[bpos++] = instr[ipos++];
- if(!instr[ipos])
+ if (!instr[ipos])
break;
if(instr[ipos+1] && instr[ipos+2]) {
@@ -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]) {
@@ -245,7 +245,7 @@ char *yahoo_xmldecode(const char *instr)
ipos++;
} else
str[bpos++] = instr[ipos++];
- if(!instr[ipos] || !instr[ipos+1])
+ if (!instr[ipos] || !instr[ipos+1])
break;
ipos++;
@@ -260,7 +260,7 @@ char *yahoo_xmldecode(const char *instr)
} else {
int i;
for (i=0; i<5; i++)
- if(!strncmp(instr+ipos, entitymap[i][0],
+ if (!strncmp(instr+ipos, entitymap[i][0],
strlen(entitymap[i][0]))) {
str[bpos++] = entitymap[i][1][0];
ipos += strlen(entitymap[i][0]);
@@ -319,7 +319,7 @@ void yahoo_http_post(int id, const char *url, const char *cookies, long content_
char ck[2048];
char buff[4096];
- if(!url_to_host_port_path(url, host, &port, path))
+ if (!url_to_host_port_path(url, host, &port, path))
return;
if (cookies == NULL || cookies[0] == '\0')
@@ -351,7 +351,7 @@ void yahoo_http_get(int id, const char *url, const char *cookies,
char ck[2048];
char buff[4096];
- if(!url_to_host_port_path(url, host, &port, path))
+ if (!url_to_host_port_path(url, host, &port, path))
return;
if (cookies == NULL || cookies[0] == '\0')
@@ -394,17 +394,17 @@ static void yahoo_got_url_fd(int id, int fd, int error, void *data)
while((n=yahoo_tcp_readline(buff, sizeof(buff), fd)) > 0) {
LOG(("Read:%s:\n", buff));
- if(!strcmp(buff, ""))
+ if (!strcmp(buff, ""))
break;
- if( !strncasecmp(buff, "Content-length:",
+ if ( !strncasecmp(buff, "Content-length:",
strlen("Content-length:")) ) {
tmp = strrchr(buff, ' ');
if(tmp)
filesize = atol(tmp);
}
- if( !strncasecmp(buff, "Content-disposition:",
+ if ( !strncasecmp(buff, "Content-disposition:",
strlen("Content-disposition:")) ) {
tmp = strstr(buff, "name=");
if(tmp) {
@@ -418,9 +418,9 @@ static void yahoo_got_url_fd(int id, int fd, int error, void *data)
} else {
char *tmp2;
tmp2 = strchr(tmp, ';');
- if(!tmp2)
+ if (!tmp2)
tmp2 = strchr(tmp, '\r');
- if(!tmp2)
+ if (!tmp2)
tmp2 = strchr(tmp, '\n');
if(tmp2)
*tmp2 = '\0';
diff --git a/protocols/Yahoo/libyahoo2/yahoo_list.c b/protocols/Yahoo/libyahoo2/yahoo_list.c
index ae7e86b9c6..b3e40c208e 100644
--- a/protocols/Yahoo/libyahoo2/yahoo_list.c
+++ b/protocols/Yahoo/libyahoo2/yahoo_list.c
@@ -66,10 +66,10 @@ YList *y_list_concat(YList * list, YList * add)
{
YList *l;
- if(!list)
+ if (!list)
return add;
- if(!add)
+ if (!add)
return list;
for (l = list; l->next; l = l->next)
@@ -132,7 +132,7 @@ int y_list_length(const YList * list)
*/
int y_list_empty(const YList * list)
{
- if(!list)
+ if (!list)
return 1;
else
return 0;
@@ -140,7 +140,7 @@ int y_list_empty(const YList * list)
int y_list_singleton(const YList * list)
{
- if(!list || list->next)
+ if (!list || list->next)
return 0;
return 1;
}
diff --git a/protocols/Yahoo/options.cpp b/protocols/Yahoo/options.cpp
index 764fe0c56e..01fa96330a 100644
--- a/protocols/Yahoo/options.cpp
+++ b/protocols/Yahoo/options.cpp
@@ -171,7 +171,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsConn(HWND hwndDlg, UINT msg, WPARAM wPar
ppro = ( CYahooProto* )lParam;
SetWindowLongPtr( hwndDlg, GWLP_USERDATA, lParam );
- if ( !ppro->GetString( YAHOO_LOGINSERVER, &dbv )){
+ if ( !ppro->GetString( YAHOO_LOGINSERVER, &dbv )) {
SetDlgItemTextA( hwndDlg, IDC_LOGINSERVER, dbv.pszVal );
DBFreeVariant( &dbv );
}
diff --git a/protocols/Yahoo/proto.cpp b/protocols/Yahoo/proto.cpp
index 2aad750efa..e5de41ae29 100644
--- a/protocols/Yahoo/proto.cpp
+++ b/protocols/Yahoo/proto.cpp
@@ -241,7 +241,7 @@ int CYahooProto::Authorize( HANDLE hdbe )
/* Need to remove the buddy from our Miranda Lists */
DBVARIANT dbv;
- if (hContact != NULL && !DBGetContactSettingString( hContact, m_szModuleName, YAHOO_LOGINID, &dbv )){
+ if (hContact != NULL && !DBGetContactSettingString( hContact, m_szModuleName, YAHOO_LOGINID, &dbv )) {
DebugLog("Accepting buddy:%s", dbv.pszVal);
accept(dbv.pszVal, GetWord(hContact, "yprotoid", 0));
DBFreeVariant(&dbv);
@@ -263,23 +263,23 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason )
memset( &dbei, 0, sizeof( dbei ));
dbei.cbSize = sizeof( dbei );
- if (( dbei.cbBlob = YAHOO_CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hdbe, 0 )) == -1 ){
+ if (( dbei.cbBlob = YAHOO_CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hdbe, 0 )) == -1 ) {
DebugLog("[YahooAuthDeny] ERROR: Can't get blob size");
return 1;
}
dbei.pBlob = ( PBYTE )alloca( dbei.cbBlob );
- if ( YAHOO_CallService( MS_DB_EVENT_GET, ( WPARAM )hdbe, ( LPARAM )&dbei )){
+ if ( YAHOO_CallService( MS_DB_EVENT_GET, ( WPARAM )hdbe, ( LPARAM )&dbei )) {
DebugLog("YahooAuthDeny - Can't get db event!");
return 1;
}
- if ( dbei.eventType != EVENTTYPE_AUTHREQUEST ){
+ if ( dbei.eventType != EVENTTYPE_AUTHREQUEST ) {
DebugLog("YahooAuthDeny - not Authorization event");
return 1;
}
- if ( strcmp( dbei.szModule, m_szModuleName )){
+ if ( strcmp( dbei.szModule, m_szModuleName )) {
DebugLog("YahooAuthDeny - wrong module?");
return 1;
}
@@ -289,7 +289,7 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason )
/* Need to remove the buddy from our Miranda Lists */
DBVARIANT dbv;
- if (hContact != NULL && !DBGetContactSettingString( hContact, m_szModuleName, YAHOO_LOGINID, &dbv )){
+ if (hContact != NULL && !DBGetContactSettingString( hContact, m_szModuleName, YAHOO_LOGINID, &dbv )) {
char *u_reason;
u_reason = mir_utf8encodeT(reason);
@@ -720,7 +720,7 @@ int __cdecl CYahooProto::SetAwayMsg( int status, const PROTOCHAR* msg )
DebugLog("[YahooSetAwayMessage] Status: %s, Msg: %s",(char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, status, 0), (char*) c);
- if(!m_bLoggedIn){
+ if (!m_bLoggedIn){
if (m_iStatus == ID_STATUS_OFFLINE) {
DebugLog("[YahooSetAwayMessage] WARNING: WE ARE OFFLINE!");
mir_free(c);
diff --git a/protocols/Yahoo/services.cpp b/protocols/Yahoo/services.cpp
index 0245ca1d8d..77e99626ed 100644
--- a/protocols/Yahoo/services.cpp
+++ b/protocols/Yahoo/services.cpp
@@ -105,7 +105,7 @@ INT_PTR __cdecl CYahooProto::OnContactDeleted( WPARAM wParam, LPARAM lParam )
return 0;
}
- if ( !DBGetContactSettingString(hContact, m_szModuleName, YAHOO_LOGINID, &dbv )){
+ if ( !DBGetContactSettingString(hContact, m_szModuleName, YAHOO_LOGINID, &dbv )) {
DebugLog("[YahooContactDeleted] Removing %s", dbv.pszVal);
remove_buddy(dbv.pszVal, GetWord(hContact, "yprotoid", 0));
@@ -331,7 +331,7 @@ INT_PTR __cdecl CYahooProto::OnCalendarCommand( WPARAM wParam, LPARAM lParam )
//=======================================================
INT_PTR __cdecl CYahooProto::OnRefreshCommand( WPARAM wParam, LPARAM lParam )
{
- if ( !m_bLoggedIn ){
+ if ( !m_bLoggedIn ) {
ShowNotification(Translate("Yahoo Error"), Translate("You need to be connected to refresh your buddy list"), NIIF_ERROR);
return 0;
}
diff --git a/protocols/Yahoo/util.cpp b/protocols/Yahoo/util.cpp
index 08844f22f8..f259b12d33 100644
--- a/protocols/Yahoo/util.cpp
+++ b/protocols/Yahoo/util.cpp
@@ -314,7 +314,7 @@ INT_PTR __cdecl CYahooProto::OnSettingChanged(WPARAM wParam, LPARAM lParam)
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0)) {
DBVARIANT dbv;
- if ( !DBGetContactSettingString( (HANDLE) wParam, m_szModuleName, YAHOO_LOGINID, &dbv )){
+ if ( !DBGetContactSettingString( (HANDLE) wParam, m_szModuleName, YAHOO_LOGINID, &dbv )) {
DebugLog("Adding Permanently %s to list.", dbv.pszVal);
AddBuddy(dbv.pszVal,GetWord((HANDLE) wParam, "yprotoid", 0), "miranda", NULL);
DBFreeVariant(&dbv);
@@ -326,7 +326,7 @@ INT_PTR __cdecl CYahooProto::OnSettingChanged(WPARAM wParam, LPARAM lParam)
DebugLog("DB Setting changed. YAHOO user's visible setting changed.");
- if ( !DBGetContactSettingString( (HANDLE) wParam, m_szModuleName, YAHOO_LOGINID, &dbv )){
+ if ( !DBGetContactSettingString( (HANDLE) wParam, m_szModuleName, YAHOO_LOGINID, &dbv )) {
int iAdd = (ID_STATUS_OFFLINE == DBGetContactSettingWord((HANDLE) wParam, m_szModuleName, "ApparentMode", 0));
stealth(dbv.pszVal, iAdd);
DBFreeVariant(&dbv);
diff --git a/protocols/Yahoo/yahoo.cpp b/protocols/Yahoo/yahoo.cpp
index 4383278e0d..f14a311d0a 100644
--- a/protocols/Yahoo/yahoo.cpp
+++ b/protocols/Yahoo/yahoo.cpp
@@ -238,12 +238,12 @@ void CYahooProto::AddBuddy( const char *who, int protocol, const char *group, co
No refresh needed. */
- if ( !DBGetContactSettingString( NULL, m_szModuleName, "First Name", &dbv )){
+ if ( !DBGetContactSettingString( NULL, m_szModuleName, "First Name", &dbv )) {
fname = strdup(dbv.pszVal);
DBFreeVariant(&dbv);
}
- if ( !DBGetContactSettingString( NULL, m_szModuleName, "Last Name", &dbv )){
+ if ( !DBGetContactSettingString( NULL, m_szModuleName, "Last Name", &dbv )) {
lname = strdup(dbv.pszVal);
DBFreeVariant(&dbv);
}
@@ -627,7 +627,7 @@ void CYahooProto::ext_got_buddies(YList * buds)
}
YAHOO_DEBUGLOG(("[ext_got_buddies] Walking buddy list..."));
- for(; buds; buds = buds->next) {
+ for (; buds; buds = buds->next) {
HANDLE hContact;
yahoo_buddy *bud = ( yahoo_buddy* )buds->data;
@@ -979,7 +979,7 @@ void CYahooProto::ext_mail_notify(const char *from, const char *subj, int cnt)
snprintf(z, sizeof(z), Translate("From: %s\nSubject: %s"), from, subj);
}
- if(!ShowPopup( title, z, "http://mail.yahoo.com" ))
+ if (!ShowPopup( title, z, "http://mail.yahoo.com" ))
ShowNotification(title, z, NIIF_INFO);
}
}
@@ -1239,7 +1239,7 @@ void CYahooProto::ext_send_http_request(enum yahoo_connection_type type, const c
LOG(("[ext_send_http_request] type: %d, method: %s, url: %s, cookies: %s, content length: %ld",
type, method, url, cookies, content_length));
- if(!url_to_host_port_path(url, host, &port, path))
+ if (!url_to_host_port_path(url, host, &port, path))
return;
fd = ext_connect(host, port, type);