X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=main.c;h=826602c85e996a447ec551e05ca1fe02314f4598;hp=cee557dd12f22ecf24312fd3eaa1b5fc2dcb4f05;hb=bad8211c28d4b229878e0264012009493db48da5;hpb=e83ad1be25aefea3ed21ec08edbaf2d5a72c4a9d diff --git a/main.c b/main.c index cee557d..826602c 100644 --- a/main.c +++ b/main.c @@ -128,6 +128,7 @@ options:\n\ -G\t\tselect a newsgroup (if compiled with NNTP)\n\ -H \tspecify a draft file to read header and body from\n\ -i \tspecify a file which Mutt-ng should include in the body\n\ + -d \t specify debugging level of Mutt-ng\n\ -m \tspecify a default mailbox type\n\ -n\t\tcauses Mutt-ng not to read the system Muttngrc\n\ -p\t\trecall a postponed message\n\ @@ -580,7 +581,13 @@ int main (int argc, char **argv) case 'd': debug_setlevel(atoi(optarg)); #ifdef DEBUG - printf (_("Debugging at level %d.\n"), atoi(optarg)); + if (atoi(optarg) < DEBUG_MIN_LEVEL && atoi(optarg) > DEBUG_MAX_LEVEL) + printf (_("Debugging at level %d.\n"), atoi(optarg)); + else { + printf(_("Please specify a valid debugging level (" + DEBUG_MIN_LEVEL_S "-" DEBUG_MAX_LEVEL_S ").\n")); + return 1; + } #else printf _("DEBUG was not defined during compilation. Ignored.\n"); #endif