universe@50: /* universe@50: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. universe@50: * universe@55: * Copyright 2016 Mike Becker. All rights reserved. universe@50: * universe@50: * Redistribution and use in source and binary forms, with or without universe@50: * modification, are permitted provided that the following conditions are met: universe@50: * universe@50: * 1. Redistributions of source code must retain the above copyright universe@50: * notice, this list of conditions and the following disclaimer. universe@50: * universe@50: * 2. Redistributions in binary form must reproduce the above copyright universe@50: * notice, this list of conditions and the following disclaimer in the universe@50: * documentation and/or other materials provided with the distribution. universe@50: * universe@50: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" universe@50: * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE universe@50: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE universe@50: * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE universe@50: * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR universe@50: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF universe@50: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS universe@50: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN universe@50: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) universe@50: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE universe@50: * POSSIBILITY OF SUCH DAMAGE. universe@50: * universe@50: */ universe@50: universe@50: universe@50: #ifndef PGN_H universe@50: #define PGN_H universe@50: universe@50: #include "rules.h" universe@50: #include universe@50: universe@50: #ifdef __cplusplus universe@50: extern "C" { universe@50: #endif universe@59: universe@50: int read_pgn(FILE *stream, GameState *gamestate, GameInfo *gameinfo); universe@50: size_t write_pgn(FILE* stream, GameState *gamestate, GameInfo *gameinfo); universe@54: void compute_fen(char *str, GameState *gamestate); universe@50: universe@60: const char* pgn_error_str(int code); universe@60: universe@50: #ifdef __cplusplus universe@50: } universe@50: #endif universe@50: universe@50: #endif /* PGN_H */ universe@50: