diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-04-28 16:50:40 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-04-28 16:50:40 +0200 |
commit | d6e0db231ea99db66f3311183afc15922e42c9b8 (patch) | |
tree | 301ae7b44173bcb37692d73dbaa383633ad27896 /FICS | |
parent | 2bb49c7fefaac86cb5fd13375a036b201e7aa99b (diff) |
Reformatted gamesortfunc() -- still messy
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/obsproc.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/FICS/obsproc.c b/FICS/obsproc.c index 837627c..644a54b 100644 --- a/FICS/obsproc.c +++ b/FICS/obsproc.c @@ -66,18 +66,24 @@ PUBLIC int GameNumFromParam(int p, int *p1, parameter *param) } } -PRIVATE int gamesortfunc(const void *i, const void *j) +PRIVATE int +gamesortfunc(const void *i, const void *j) { -/* examine mode games moved to top of "games" output */ - return (GetRating(&parray[garray[*(int *) i].white], garray[*(int *) i].type) + - GetRating(&parray[garray[*(int *) i].black], garray[*(int *) i].type) - - ((garray[*(int *) i].status == GAME_EXAMINE) ? 10000 : 0) - - GetRating(&parray[garray[*(int *) j].white], garray[*(int *) j].type) - - GetRating(&parray[garray[*(int *) j].black], garray[*(int *) j].type) + - ((garray[*(int *) j].status == GAME_EXAMINE) ? 10000 : 0)); + /* + * examine mode games moved to top of "games" output + */ + return (GetRating(&parray[garray[*(int *)i].white], + garray[*(int *)i].type) + + GetRating(&parray[garray[*(int *)i].black], + garray[*(int *)i].type) - + (garray[*(int *)i].status == GAME_EXAMINE ? 10000 : 0) - + GetRating(&parray[garray[*(int *)j].white], + garray[*(int *)j].type) - + GetRating(&parray[garray[*(int *)j].black], + garray[*(int *)j].type) + + (garray[*(int *)j].status == GAME_EXAMINE ? 10000 : 0)); } - PUBLIC int com_games(int p, param_list param) { |