]> git.sesse.net Git - pgn-extract/blobdiff - lex.c
Store start position in the binary output.
[pgn-extract] / lex.c
diff --git a/lex.c b/lex.c
index 3474a15523b27055716617a802e651f593f1bf3f..0c8d26f192148e54c1ea5ac32f54587dc29dbfbc 100644 (file)
--- a/lex.c
+++ b/lex.c
@@ -1268,3 +1268,8 @@ terminate_input(void)
     }
 }
 
+    /* Return the position in the current file. Returns -1 if it is unseekable. */
+long get_position(void)
+{
+    return ftell(yyin);
+}