aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-03-30 12:56:58 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-03-30 12:56:58 +0100
commit706510b089ccb2fb18b5b98c928914043f6a7c5a (patch)
tree0e26747638717c12f190a5c0e137ee09cd09f4c1
parent342b37630bbc1a971c7c72a68df341f710c771fb (diff)
Reformatted com_unpause()
-rw-r--r--FICS/gameproc.c53
1 files changed, 31 insertions, 22 deletions
diff --git a/FICS/gameproc.c b/FICS/gameproc.c
index 414f022..603a580 100644
--- a/FICS/gameproc.c
+++ b/FICS/gameproc.c
@@ -861,30 +861,39 @@ PUBLIC int com_pause(int p, param_list param)
return COM_OK;
}
-PUBLIC int com_unpause(int p, param_list param)
+PUBLIC int
+com_unpause(int p, param_list param)
{
- int now;
- int g;
+ int g;
+ int now;
- ASSERT(param[0].type == TYPE_NULL);
- if (!pIsPlaying(p)) {
- return COM_OK;
- }
- g = parray[p].game;
- if (!garray[g].clockStopped) {
- pprintf(p, "Game is not paused.\n");
- return COM_OK;
- }
- garray[g].clockStopped = 0;
- now = tenth_secs();
- if (garray[g].numHalfMoves == 0)
- garray[g].timeOfStart = now;
- garray[g].lastMoveTime = now;
- garray[g].lastDecTime = now;
- send_boards(g);
- pprintf(p, "Game clock resumed.\n");
- pprintf_prompt(parray[p].opponent, "\nGame clock resumed.\n");
- return COM_OK;
+ ASSERT(param[0].type == TYPE_NULL);
+
+ if (!pIsPlaying(p))
+ return COM_OK;
+
+ g = parray[p].game;
+
+ if (!garray[g].clockStopped) {
+ pprintf(p, "Game is not paused.\n");
+ return COM_OK;
+ }
+
+ garray[g].clockStopped = 0;
+ now = tenth_secs();
+
+ if (garray[g].numHalfMoves == 0)
+ garray[g].timeOfStart = now;
+
+ garray[g].lastMoveTime = now;
+ garray[g].lastDecTime = now;
+
+ send_boards(g);
+
+ pprintf(p, "Game clock resumed.\n");
+ pprintf_prompt(parray[p].opponent, "\nGame clock resumed.\n");
+
+ return COM_OK;
}
PUBLIC int