aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-24 00:07:30 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-24 00:07:30 +0100
commitcf47d8972fcb685c3542dc768c3ee70fe5bcba04 (patch)
tree779cdb24e70cd89bd2abe8a3388359e4792bf537
parentad441e867d0a153fd034abdefc3cb5b73bf2207a (diff)
Reformatted append_holding_machine()
-rw-r--r--FICS/board.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/FICS/board.c b/FICS/board.c
index c65ee19..2a123cb 100644
--- a/FICS/board.c
+++ b/FICS/board.c
@@ -148,20 +148,23 @@ PRIVATE char *holding_str(int *holding)
return tmp;
}
-PRIVATE char *append_holding_machine(char *buf, int g, int c, int p)
+PRIVATE char *
+append_holding_machine(char *buf, int g, int c, int p)
{
- game_state_t *gs = &garray[g].game_state;
- char tmp[50];
-
- sprintf(tmp, "<b1> game %d white [%s] black [", g+1, holding_str(gs->holding[0]));
- strcat(tmp, holding_str(gs->holding[1]));
- strcat(buf, tmp);
- if (p) {
- sprintf(tmp, "] <- %c%s\n", "WB"[c], wpstring[p]);
- strcat(buf, tmp);
- } else
- strcat(buf, "]\n");
- return buf;
+ char tmp[50];
+ game_state_t *gs = &garray[g].game_state;
+
+ sprintf(tmp, "<b1> game %d white [%s] black [", (g + 1),
+ holding_str(gs->holding[0]));
+ strcat(tmp, holding_str(gs->holding[1]));
+ strcat(buf, tmp);
+
+ if (p) {
+ sprintf(tmp, "] <- %c%s\n", "WB"[c], wpstring[p]);
+ strcat(buf, tmp);
+ } else
+ strcat(buf, "]\n");
+ return buf;
}
PRIVATE char *