--- a/src/chess/pgn.c Thu May 28 12:15:26 2026 +0200 +++ b/src/chess/pgn.c Thu May 28 13:58:24 2026 +0200 @@ -60,7 +60,7 @@ return pgn_error_strings[code]; } -int read_pgn(FILE* stream, GameState *gamestate, GameInfo *gameinfo) { +int read_pgn(FILE* stream, GameState *gamestate) { int c, i; char result[8]; @@ -255,8 +255,7 @@ return name[0] != '\0' ? name : "Anonymous"; } -void write_pgn(FILE* stream, GameState *gamestate, GameInfo *gameinfo, - bool export_comments) { +void write_pgn(FILE* stream, GameState *gamestate, bool export_comments) { /* STR tag pairs */ fprintf(stream, "[Event \"%s\"]\n", "terminal-chess game"); fprintf(stream, "[Site \"%s\"]\n", "Somewhere on Earth"); @@ -327,11 +326,11 @@ } /* add clock times when the game was under time control */ - if (gameinfo->timecontrol) { + if (gamestate->info.timecontrol) { memcpy(moveblkptr, " {[%clk ", 8); moveblkptr += 8; unsigned clkmv = i + 2; /* time for the next move! */ - uint16_t clk = remaining_movetime2(gameinfo, gamestate, clkmv); + uint16_t clk = remaining_movetime2(gamestate, clkmv); snpr = print_clk(clk, moveblkptr, true); moveblkptr += snpr; *(moveblkptr++) = ']';