src/chess/pgn.h

changeset 178
724e8acff6f8
parent 150
7d57a252948e
equal deleted inserted replaced
177:18dbb0dc9cd6 178:724e8acff6f8
50 pgn_error_result_mismatch, 50 pgn_error_result_mismatch,
51 pgn_error_unexpected_eof, 51 pgn_error_unexpected_eof,
52 }; 52 };
53 53
54 int read_pgn(FILE *stream, GameState *gamestate); 54 int read_pgn(FILE *stream, GameState *gamestate);
55 int write_pgn(FILE* stream, const GameState *gamestate, bool export_comments);
56
55 int parse_pgn(const char *data, GameState *gamestate); 57 int parse_pgn(const char *data, GameState *gamestate);
56 void write_pgn(FILE* stream, GameState *gamestate, bool export_comments); 58 char *create_pgn(const GameState *gamestate, bool export_comments);
57 void compute_fen(char *str, GameState *gamestate);
58 59
59 const char *pgn_player_name(GameState *gamestate, uint8_t color); 60 const char *pgn_player_name(const GameState *gamestate, uint8_t color);
60 61
61 const char* pgn_error_str(int code); 62 const char* pgn_error_str(int code);
62 size_t pgn_error_position(void); 63 size_t pgn_error_position(void);
63 64
64 #ifdef __cplusplus 65 #ifdef __cplusplus

mercurial