]> git.sesse.net Git - pgn-extract/blobdiff - argsfile.c
Support scanning only a range of the file.
[pgn-extract] / argsfile.c
index e2caa076645d738b20e8c7158f29d051e7822dd3..7bba9011b6da589af20e3c20285ce8c53646486f 100644 (file)
@@ -1078,6 +1078,14 @@ process_long_form_argument(const char *argument, const char *associated_value)
         GlobalState.output_total_plycount = TRUE;
         return 1;
     }
+    else if(stringcompare(argument, "startpos") == 0) {
+        GlobalState.start_position = atol(associated_value);
+        return 2;
+    }
+    else if(stringcompare(argument, "endpos") == 0) {
+        GlobalState.end_position = atol(associated_value);
+        return 2;
+    }
     else if(stringcompare(argument, "version") == 0) {
         fprintf(GlobalState.logfile, "pgn-extract %s\n", CURRENT_VERSION);
        exit(0);