diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 22:25:28 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 22:25:28 +0100 |
commit | 7b4f1eecbad97fdef568d595b869057911968cc4 (patch) | |
tree | 8e6ac76055dd0e3197c5015bc37c5a9f987a4462 /FICS/comproc.c | |
parent | 1a493c5db2240c101b0d8ce0213c5c87bcf09348 (diff) |
Reformatted wild_cmp()
Diffstat (limited to 'FICS/comproc.c')
-rw-r--r-- | FICS/comproc.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c index f614892..a5b47ab 100644 --- a/FICS/comproc.c +++ b/FICS/comproc.c @@ -1027,27 +1027,29 @@ PRIVATE int stand_cmp(const void *pp1, const void *pp2) return strcmp(parray[p1].login, parray[p2].login); } -PRIVATE int wild_cmp(const void *pp1, const void *pp2) +PRIVATE int +wild_cmp(const void *pp1, const void *pp2) { - register int p1 = *(int *) pp1; - register int p2 = *(int *) pp2; - if (parray[p1].status != PLAYER_PROMPT) { - if (parray[p2].status != PLAYER_PROMPT) - return 0; - else - return -1; - } - if (parray[p2].status != PLAYER_PROMPT) - return 1; - if (parray[p1].w_stats.rating > parray[p2].w_stats.rating) - return -1; - if (parray[p1].w_stats.rating < parray[p2].w_stats.rating) - return 1; - if (parray[p1].registered > parray[p2].registered) - return -1; - if (parray[p1].registered < parray[p2].registered) - return 1; - return strcmp(parray[p1].login, parray[p2].login); + register int p1 = *(int *) pp1; + register int p2 = *(int *) pp2; + + if (parray[p1].status != PLAYER_PROMPT) { + if (parray[p2].status != PLAYER_PROMPT) + return 0; + else + return -1; + } + if (parray[p2].status != PLAYER_PROMPT) + return 1; + if (parray[p1].w_stats.rating > parray[p2].w_stats.rating) + return -1; + if (parray[p1].w_stats.rating < parray[p2].w_stats.rating) + return 1; + if (parray[p1].registered > parray[p2].registered) + return -1; + if (parray[p1].registered < parray[p2].registered) + return 1; + return strcmp(parray[p1].login, parray[p2].login); } PRIVATE int |