]> git.tdb.fi Git - ext/subsurface.git/blobdiff - main.c
Add an '--import' command line option
[ext/subsurface.git] / main.c
diff --git a/main.c b/main.c
index a09bfe03a01099efebe11f7337df2838a775e3f3..642e0727182f75de5fb03047594462ab4f3b0f8e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -155,6 +155,15 @@ static void parse_argument(const char *arg)
                case 'v':
                        verbose++;
                        continue;
+               case '-':
+                       /* long options with -- */
+                       if (strcmp(arg,"--import") == 0) {
+                               /* mark the dives so far as the base,
+                                * everything after is imported */
+                               report_dives();
+                               return;
+                       }
+                       /* fallthrough */
                default:
                        fprintf(stderr, "Bad argument '%s'\n", arg);
                        exit(1);