diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 22:24:09 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-01-03 22:24:09 +0100 |
commit | 1a493c5db2240c101b0d8ce0213c5c87bcf09348 (patch) | |
tree | 0d35b43d36121ce109b00c4214378c9e73e4ebd0 /FICS | |
parent | 5e9ff9087b15af2aba996f11200c46fb496f6988 (diff) |
Reformatted alpha_cmp()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/comproc.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c index 321c36d..f614892 100644 --- a/FICS/comproc.c +++ b/FICS/comproc.c @@ -1050,19 +1050,21 @@ PRIVATE int wild_cmp(const void *pp1, const void *pp2) return strcmp(parray[p1].login, parray[p2].login); } -PRIVATE int alpha_cmp(const void *pp1, const void *pp2) +PRIVATE int +alpha_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; - 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; + return strcmp(parray[p1].login, parray[p2].login); } PRIVATE void |