]> git.sesse.net Git - pgn-extract/blobdiff - typedef.h
Store the current file number (with offset) in the binary output.
[pgn-extract] / typedef.h
index cf7be10005b34e242eee55463a6c315d63af1aae..ed7a82d47302524ba8cec3bb375d53be5de20cf3 100644 (file)
--- a/typedef.h
+++ b/typedef.h
@@ -146,6 +146,8 @@ typedef struct {
      * 0 => no error found.
      */
     int error_ply;
+    /* File number this game comes from. */
+    int file_number;
     /* File position of the first byte of the game, or -1
      * if unknown.
      */
@@ -279,6 +281,9 @@ typedef struct {
     const char *current_input_file;
     /* Whether this is a CHECKFILE or a NORMALFILE. */
     SourceFileType current_file_type;
+    /* Current file number. Used to disambiguate PGN file positions. */
+    int current_file_number;
+    int start_file_number;
     /* Byte positions to scan to and from in the PGN file.
      * Starting in the middle of a game will yield unexpected
      * results.