| 35 #include <stdio.h> |
35 #include <stdio.h> |
| 36 |
36 |
| 37 #ifdef __cplusplus |
37 #ifdef __cplusplus |
| 38 extern "C" { |
38 extern "C" { |
| 39 #endif |
39 #endif |
| 40 |
40 |
| |
41 enum { |
| |
42 pgn_no_error = 0, |
| |
43 pgn_error_missing_quote, |
| |
44 pgn_error_missing_bracket, |
| |
45 pgn_error_missing_brace, |
| |
46 pgn_error_missing_dot, |
| |
47 pgn_error_move_syntax, |
| |
48 pgn_error_move_semantics, |
| |
49 pgn_error_result_syntax, |
| |
50 pgn_error_result_mismatch, |
| |
51 pgn_error_unexpected_eof, |
| |
52 }; |
| |
53 |
| 41 int read_pgn(FILE *stream, GameState *gamestate); |
54 int read_pgn(FILE *stream, GameState *gamestate); |
| 42 int parse_pgn(const char *data, GameState *gamestate); |
55 int parse_pgn(const char *data, GameState *gamestate); |
| 43 void write_pgn(FILE* stream, GameState *gamestate, bool export_comments); |
56 void write_pgn(FILE* stream, GameState *gamestate, bool export_comments); |
| 44 void compute_fen(char *str, GameState *gamestate); |
57 void compute_fen(char *str, GameState *gamestate); |
| 45 |
58 |