X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=typedef.h;h=cf7be10005b34e242eee55463a6c315d63af1aae;hb=be3167c9e0220a4ee3e8b5c5f813fb2627d1ce55;hp=2f79308c7426d62d18d5729d6f80e6c29634f0d9;hpb=2941984be26cee5bbb0757ed20172035ed06d2f4;p=pgn-extract diff --git a/typedef.h b/typedef.h index 2f79308..cf7be10 100644 --- a/typedef.h +++ b/typedef.h @@ -146,6 +146,10 @@ typedef struct { * 0 => no error found. */ int error_ply; + /* File position of the first byte of the game, or -1 + * if unknown. + */ + long start_position; } Game; /* Define a type to distinguish between CHECK files, NORMAL files, @@ -275,6 +279,12 @@ typedef struct { const char *current_input_file; /* Whether this is a CHECKFILE or a NORMALFILE. */ SourceFileType current_file_type; + /* Byte positions to scan to and from in the PGN file. + * Starting in the middle of a game will yield unexpected + * results. + */ + long start_position; + long end_position; /* File of ECO lines. */ const char *eco_file; /* Where to write the extracted games. */