aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/playerdb.c45
1 files changed, 25 insertions, 20 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index cbd6937..4f4af1f 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1770,28 +1770,33 @@ PUBLIC int player_goto_board(int p, int board_num)
return 0;
}
-PUBLIC int player_goto_next_board(int p)
+PUBLIC int
+player_goto_next_board(int p)
{
- int on;
- int start;
- int g;
+ int g;
+ int on;
+ int start;
- on = parray[p].simul_info.onBoard;
- start = on;
- g = -1;
- do {
- on++;
- if (on >= parray[p].simul_info.numBoards)
- on = 0;
- g = parray[p].simul_info.boards[on];
- if (g >= 0)
- break;
- } while (start != on);
- if (g == -1) {
- pprintf(p, "\nMajor Problem! Can't find your next board.\n");
- return -1;
- }
- return player_goto_board(p, on);
+ on = parray[p].simul_info.onBoard;
+ start = on;
+ g = -1;
+
+ do {
+ on++;
+
+ if (on >= parray[p].simul_info.numBoards)
+ on = 0;
+
+ if ((g = parray[p].simul_info.boards[on]) >= 0)
+ break;
+ } while (start != on);
+
+ if (g == -1) {
+ pprintf(p, "\nMajor Problem! Can't find your next board.\n");
+ return -1;
+ }
+
+ return player_goto_board(p, on);
}
PUBLIC int