aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-23 20:42:21 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-23 20:42:21 +0100
commit2c6f05d61299138dbffd3696654c1d7851baff46 (patch)
tree2c2ba0ae694c291ed4cbe8266075730c1de549cc /FICS
parent1b85194f2b676f0a86081a06190bad4fc02007d1 (diff)
Reformatted style8()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/board.c94
1 files changed, 55 insertions, 39 deletions
diff --git a/FICS/board.c b/FICS/board.c
index d0a0df1..633e524 100644
--- a/FICS/board.c
+++ b/FICS/board.c
@@ -467,47 +467,63 @@ PUBLIC int style7(game_state_t *b, move_t *ml)
return genstyle(b, ml, wp, bp, wsqr, bsqr, top, mid, start, end, label, blabel);
}
-/* ICS interface maker board-- raw data dump */
-PUBLIC int style8(game_state_t *b, move_t *ml)
+/*
+ * ICS interface maker board -- raw data dump.
+ */
+PUBLIC int
+style8(game_state_t *b, move_t *ml)
{
- char tmp[80];
- int f, r;
- int ws, bs;
+ char tmp[80];
+ int f, r;
+ int ws, bs;
- board_calc_strength(b, &ws, &bs);
- sprintf(tmp, "#@#%03d%-16s%s%-16s%s", b->gameNum + 1,
- garray[b->gameNum].white_name,
- (orient == WHITE) ? "*" : ":",
- garray[b->gameNum].black_name,
- (orient == WHITE) ? ":" : "*");
- strcat(bstring, tmp);
- for (r = 0; r < 8; r++) {
- for (f = 0; f < 8; f++) {
- if (b->board[f][r] == NOPIECE) {
- strcat(bstring, " ");
- } else {
- if (colorval(b->board[f][r]) == WHITE)
- strcat(bstring, wpstring[piecetype(b->board[f][r])]);
- else
- strcat(bstring, bpstring[piecetype(b->board[f][r])]);
- }
- }
- }
- sprintf(tmp, "%03d%s%02d%02d%05d%05d%-7s(%s)@#@\n",
- garray[b->gameNum].numHalfMoves / 2 + 1,
- (b->onMove == WHITE) ? "W" : "B",
- ws,
- bs,
- (wTime + 5) / 10,
- (bTime + 5) / 10,
- garray[b->gameNum].numHalfMoves ?
- ml[garray[b->gameNum].numHalfMoves - 1].algString :
- "none",
- garray[b->gameNum].numHalfMoves ?
- tenth_str(ml[garray[b->gameNum].numHalfMoves - 1].tookTime, 0) :
- "0:00");
- strcat(bstring, tmp);
- return 0;
+ board_calc_strength(b, &ws, &bs);
+
+ sprintf(tmp, "#@#%03d%-16s%s%-16s%s",
+ (b->gameNum + 1),
+
+ garray[b->gameNum].white_name,
+ (orient == WHITE ? "*" : ":"),
+
+ garray[b->gameNum].black_name,
+ (orient == WHITE ? ":" : "*"));
+
+ strcat(bstring, tmp);
+
+ for (r = 0; r < 8; r++) {
+ for (f = 0; f < 8; f++) {
+ if (b->board[f][r] == NOPIECE) {
+ strcat(bstring, " ");
+ } else {
+ if (colorval(b->board[f][r]) == WHITE) {
+ strcat(bstring, wpstring
+ [piecetype(b->board[f][r])]);
+ } else {
+ strcat(bstring, bpstring
+ [piecetype(b->board[f][r])]);
+ }
+ }
+ }
+ }
+
+ sprintf(tmp, "%03d%s%02d%02d%05d%05d%-7s(%s)@#@\n",
+ (garray[b->gameNum].numHalfMoves / 2 + 1),
+ (b->onMove == WHITE ? "W" : "B"),
+ ws,
+ bs,
+ ((wTime + 5) / 10),
+ ((bTime + 5) / 10),
+
+ (garray[b->gameNum].numHalfMoves
+ ? ml[garray[b->gameNum].numHalfMoves - 1].algString
+ : "none"),
+
+ (garray[b->gameNum].numHalfMoves
+ ? tenth_str(ml[garray[b->gameNum].numHalfMoves - 1].tookTime, 0)
+ : "0:00"));
+
+ strcat(bstring, tmp);
+ return 0;
}
/*