aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/oscar/oscar_util.c
diff options
context:
space:
mode:
authorIndent <please@skip.me>2015-02-19 02:47:20 -0300
committerdequis <dx@dxzone.com.ar>2015-02-20 19:50:54 -0300
commit5ebff60479fc7a9f7f50ac03b124c91d4e6ebe11 (patch)
tree9fc0d50cb1f4bc9768d9f00de94eafd876bb55b0 /protocols/oscar/oscar_util.c
parentaf359b4316f9d392c6b752495a1b2ed631576ed8 (diff)
Reindent everything to K&R style with tabs
Used uncrustify, with the configuration file in ./doc/uncrustify.cfg Commit author set to "Indent <please@skip.me>" so that it's easier to skip while doing git blame.
Diffstat (limited to 'protocols/oscar/oscar_util.c')
-rw-r--r--protocols/oscar/oscar_util.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/protocols/oscar/oscar_util.c b/protocols/oscar/oscar_util.c
index 806632ff..c2ce8e4d 100644
--- a/protocols/oscar/oscar_util.c
+++ b/protocols/oscar/oscar_util.c
@@ -3,9 +3,9 @@
/*
* int snlen(const char *)
-*
+*
* This takes a screen name and returns its length without
-* spaces. If there are no spaces in the SN, then the
+* spaces. If there are no spaces in the SN, then the
* return is equal to that of strlen().
*
*/
@@ -14,13 +14,15 @@ static int aim_snlen(const char *sn)
int i = 0;
const char *curPtr = NULL;
- if (!sn)
+ if (!sn) {
return 0;
+ }
curPtr = sn;
- while ( (*curPtr) != (char) '\0') {
- if ((*curPtr) != ' ')
- i++;
+ while ((*curPtr) != (char) '\0') {
+ if ((*curPtr) != ' ') {
+ i++;
+ }
curPtr++;
}
@@ -44,28 +46,33 @@ int aim_sncmp(const char *sn1, const char *sn2)
{
const char *curPtr1 = NULL, *curPtr2 = NULL;
- if (aim_snlen(sn1) != aim_snlen(sn2))
+ if (aim_snlen(sn1) != aim_snlen(sn2)) {
return 1;
+ }
curPtr1 = sn1;
curPtr2 = sn2;
- while ( (*curPtr1 != (char) '\0') && (*curPtr2 != (char) '\0') ) {
- if ( (*curPtr1 == ' ') || (*curPtr2 == ' ') ) {
- if (*curPtr1 == ' ')
+ while ((*curPtr1 != (char) '\0') && (*curPtr2 != (char) '\0')) {
+ if ((*curPtr1 == ' ') || (*curPtr2 == ' ')) {
+ if (*curPtr1 == ' ') {
curPtr1++;
- if (*curPtr2 == ' ')
+ }
+ if (*curPtr2 == ' ') {
curPtr2++;
+ }
} else {
- if ( g_ascii_toupper(*curPtr1) != g_ascii_toupper(*curPtr2))
+ if (g_ascii_toupper(*curPtr1) != g_ascii_toupper(*curPtr2)) {
return 1;
+ }
curPtr1++;
curPtr2++;
}
}
/* Should both be NULL */
- if (*curPtr1 != *curPtr2)
+ if (*curPtr1 != *curPtr2) {
return 1;
+ }
return 0;
}