diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-11-28 20:39:37 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-11-28 20:39:37 +0000 |
commit | 92beff959051eec8d60e4e146aa3d8a13bee9fea (patch) | |
tree | b06ceb3079028d38f6d0f2481a5ab62b05e83e80 /protocols/Xfire/src/variables.cpp | |
parent | 8ef64da1b7cc3ef5026ab2dc80e7e0fd88971d59 (diff) |
XFire: Reformat sources
git-svn-id: http://svn.miranda-ng.org/main/trunk@11134 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/variables.cpp')
-rw-r--r-- | protocols/Xfire/src/variables.cpp | 93 |
1 files changed, 48 insertions, 45 deletions
diff --git a/protocols/Xfire/src/variables.cpp b/protocols/Xfire/src/variables.cpp index 5f9c7ee762..1dd8d5ffac 100644 --- a/protocols/Xfire/src/variables.cpp +++ b/protocols/Xfire/src/variables.cpp @@ -10,10 +10,10 @@ using namespace std; char* Varxfiregame(ARGUMENTSINFO *ai)
{
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
+ if (ai->cbSize < sizeof(ARGUMENTSINFO))
return NULL;
- if (ai->fi->hContact==NULL)
+ if (ai->fi->hContact == NULL)
{
//
}
@@ -21,27 +21,27 @@ char* Varxfiregame(ARGUMENTSINFO *ai) {
char temp[256];
DBVARIANT dbv3;
- if (!db_get(ai->fi->hContact,protocolname, "RGame",&dbv3))
+ if (!db_get(ai->fi->hContact, protocolname, "RGame", &dbv3))
{
- strncpy(temp,dbv3.pszVal,255);
+ strncpy(temp, dbv3.pszVal, 255);
db_free(&dbv3);
return mir_strdup(temp);
}
}
-
+
ai->flags = AIF_FALSE;
return mir_strdup("");
}
char* Varmyxfiregame(ARGUMENTSINFO *ai)
{
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
+ if (ai->cbSize < sizeof(ARGUMENTSINFO))
return NULL;
DBVARIANT dbv3;
- if (!db_get(NULL,protocolname, "currentgamename",&dbv3))
+ if (!db_get(NULL, protocolname, "currentgamename", &dbv3))
{
- char* ret=mir_strdup(dbv3.pszVal);
+ char* ret = mir_strdup(dbv3.pszVal);
db_free(&dbv3);
return ret;
}
@@ -51,13 +51,13 @@ char* Varmyxfiregame(ARGUMENTSINFO *ai) char* Varxfirevoice(ARGUMENTSINFO *ai)
{
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
+ if (ai->cbSize < sizeof(ARGUMENTSINFO))
return NULL;
DBVARIANT dbv3;
- if (!db_get(ai->fi->hContact,protocolname, "RVoice",&dbv3))
+ if (!db_get(ai->fi->hContact, protocolname, "RVoice", &dbv3))
{
- char* ret=mir_strdup(dbv3.pszVal);
+ char* ret = mir_strdup(dbv3.pszVal);
db_free(&dbv3);
return ret;
}
@@ -68,42 +68,42 @@ char* Varxfirevoice(ARGUMENTSINFO *ai) char* Varmyxfirevoiceip(ARGUMENTSINFO *ai) {
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
+ if (ai->cbSize < sizeof(ARGUMENTSINFO))
return NULL;
DBVARIANT dbv3;
- if (!db_get(NULL,protocolname, "VServerIP",&dbv3))
+ if (!db_get(NULL, protocolname, "VServerIP", &dbv3))
{
- char* ret=mir_strdup(dbv3.pszVal);
+ char* ret = mir_strdup(dbv3.pszVal);
db_free(&dbv3);
return ret;
}
-
+
ai->flags = AIF_FALSE;
return mir_strdup("");
}
char* Varmyxfireserverip(ARGUMENTSINFO *ai) {
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
+ if (ai->cbSize < sizeof(ARGUMENTSINFO))
return NULL;
DBVARIANT dbv3;
- if (!db_get(NULL,protocolname, "ServerIP",&dbv3))
+ if (!db_get(NULL, protocolname, "ServerIP", &dbv3))
{
- char* ret=mir_strdup(dbv3.pszVal);
+ char* ret = mir_strdup(dbv3.pszVal);
db_free(&dbv3);
return ret;
}
-
+
ai->flags = AIF_FALSE;
return mir_strdup("");
}
char* Varxfireserverip(ARGUMENTSINFO *ai) {
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
+ if (ai->cbSize < sizeof(ARGUMENTSINFO))
return NULL;
- if (ai->fi->hContact==NULL)
+ if (ai->fi->hContact == NULL)
{
ai->flags = AIF_FALSE;
return mir_strdup("");
@@ -112,7 +112,7 @@ char* Varxfireserverip(ARGUMENTSINFO *ai) { {
char temp[24];
DBVARIANT dbv3;
- if (!db_get(ai->fi->hContact,protocolname, "ServerIP",&dbv3))
+ if (!db_get(ai->fi->hContact, protocolname, "ServerIP", &dbv3))
{
mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv3.pszVal, db_get_w(ai->fi->hContact, protocolname, "Port", 0));
db_free(&dbv3);
@@ -121,16 +121,16 @@ char* Varxfireserverip(ARGUMENTSINFO *ai) { ai->flags = AIF_FALSE;
return mir_strdup("");
}
-
+
ai->flags = AIF_FALSE;
return mir_strdup("");
}
char* Varxfirevoiceip(ARGUMENTSINFO *ai) {
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
+ if (ai->cbSize < sizeof(ARGUMENTSINFO))
return NULL;
- if (ai->fi->hContact==NULL)
+ if (ai->fi->hContact == NULL)
{
ai->flags = AIF_FALSE;
return mir_strdup("");
@@ -139,7 +139,7 @@ char* Varxfirevoiceip(ARGUMENTSINFO *ai) { {
char temp[24];
DBVARIANT dbv3;
- if (!db_get(ai->fi->hContact,protocolname, "VServerIP",&dbv3))
+ if (!db_get(ai->fi->hContact, protocolname, "VServerIP", &dbv3))
{
mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv3.pszVal, db_get_w(ai->fi->hContact, protocolname, "VPort", 0));
db_free(&dbv3);
@@ -148,20 +148,20 @@ char* Varxfirevoiceip(ARGUMENTSINFO *ai) { ai->flags = AIF_FALSE;
return mir_strdup("");
}
-
+
ai->flags = AIF_FALSE;
return mir_strdup("");
}
char* Varmyxfirevoice(ARGUMENTSINFO *ai)
{
- if (ai->cbSize < sizeof(ARGUMENTSINFO))
+ if (ai->cbSize < sizeof(ARGUMENTSINFO))
return NULL;
DBVARIANT dbv3;
- if (!db_get(NULL,protocolname, "currentvoicename",&dbv3))
+ if (!db_get(NULL, protocolname, "currentvoicename", &dbv3))
{
- char* ret=mir_strdup(dbv3.pszVal);
+ char* ret = mir_strdup(dbv3.pszVal);
db_free(&dbv3);
return ret;
}
@@ -173,27 +173,30 @@ char* XFireGetFoldersPath(char * pathtype) {// Get XFire folder path
static char path[1024]; path[0] = 0;
if (ServiceExists(MS_FOLDERS_REGISTER_PATH)){
- if (!strcmp(pathtype,"Avatar")){
- FoldersGetCustomPath(XFireAvatarFolder, path, 1024, "" );}
- if (!strcmp(pathtype,"IniFile")){
- FoldersGetCustomPath(XFireWorkingFolder, path, 1024, "" );}
- if (!strcmp(pathtype,"IconsFile")){
- FoldersGetCustomPath(XFireIconFolder, path, 1024, "" );}
- strcat(path,"\\");
+ if (!strcmp(pathtype, "Avatar")){
+ FoldersGetCustomPath(XFireAvatarFolder, path, 1024, "");
+ }
+ if (!strcmp(pathtype, "IniFile")){
+ FoldersGetCustomPath(XFireWorkingFolder, path, 1024, "");
+ }
+ if (!strcmp(pathtype, "IconsFile")){
+ FoldersGetCustomPath(XFireIconFolder, path, 1024, "");
+ }
+ strcat(path, "\\");
return path;
}
else {
-/******BASE********/
- char BaseFolder[MAX_PATH]= "";
+ /******BASE********/
+ char BaseFolder[MAX_PATH] = "";
char CurProfileF[MAX_PATH] = "";
char CurProfile[MAX_PATH] = "";
- CallService(MS_DB_GETPROFILEPATH, (WPARAM) MAX_PATH, (LPARAM)BaseFolder);
+ CallService(MS_DB_GETPROFILEPATH, (WPARAM)MAX_PATH, (LPARAM)BaseFolder);
strcat(BaseFolder, "\\");
- CallService(MS_DB_GETPROFILENAME, (WPARAM) MAX_PATH, (LPARAM)CurProfileF);
+ CallService(MS_DB_GETPROFILENAME, (WPARAM)MAX_PATH, (LPARAM)CurProfileF);
int i;
for (i = MAX_PATH; 5; i--){
- if (CurProfileF[i] == 't' && CurProfileF[i-3] == '.'){
- i = i-3;
+ if (CurProfileF[i] == 't' && CurProfileF[i - 3] == '.'){
+ i = i - 3;
break;
}
}
@@ -202,8 +205,8 @@ char* XFireGetFoldersPath(char * pathtype) strcat(BaseFolder, "\\");
strcat(BaseFolder, "XFire");
strcat(BaseFolder, "\\");
-/*******BASE********/
- if (!strcmp(pathtype,"Avatar")){
+ /*******BASE********/
+ if (!strcmp(pathtype, "Avatar")){
strcat(BaseFolder, "Avatars");
strcat(BaseFolder, "\\");
}
|