X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=main.c;h=d4539b19f1dc4f87ad035e5c4ac5ebb4774e8c4c;hb=54927c33e548c58080232f43584bdd8cbcea068d;hp=f83c4e0dccb36ddc8e6d9a5e3b80ad08c33dcdb2;hpb=5f7ce870405316959d22ea4750e87c26f53fb416;p=open-adventure.git diff --git a/main.c b/main.c index f83c4e0..d4539b1 100644 --- a/main.c +++ b/main.c @@ -1261,20 +1261,23 @@ int main(int argc, char *argv[]) /* Options. */ #if defined ADVENT_AUTOSAVE - const char* opts = "l:oa:"; + const char* opts = "dl:oa:"; const char* usage = "Usage: %s [-l logfilename] [-o] [-a filename] [script...]\n"; FILE *rfp = NULL; const char* autosave_filename = NULL; #elif !defined ADVENT_NOSAVE - const char* opts = "l:or:"; + const char* opts = "dl:or:"; const char* usage = "Usage: %s [-l logfilename] [-o] [-r restorefilename] [script...]\n"; FILE *rfp = NULL; #else - const char* opts = "l:o"; + const char* opts = "dl:o"; const char* usage = "Usage: %s [-l logfilename] [-o] [script...]\n"; #endif while ((ch = getopt(argc, argv, opts)) != EOF) { switch (ch) { + case 'd': // LCOV_EXCL_LINE + settings.debug +=1; // LCOV_EXCL_LINE + break; // LCOV_EXCL_LINE case 'l': settings.logfp = fopen(optarg, "w"); if (settings.logfp == NULL)