From 69612bdea7ce4935bf16e616320045742af5ca20 Mon Sep 17 00:00:00 2001 From: okan Date: Sun, 4 Feb 2018 22:56:26 +0000 Subject: Slightly expand and expose verbose debugging. --- calmwm.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'calmwm.c') diff --git a/calmwm.c b/calmwm.c index a69bf86..6804030 100644 --- a/calmwm.c +++ b/calmwm.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: calmwm.c,v 1.107 2018/01/02 14:04:58 okan Exp $ + * $OpenBSD: calmwm.c,v 1.108 2018/02/04 22:56:26 okan Exp $ */ #include @@ -67,7 +67,7 @@ main(int argc, char **argv) fallback = u_argv(argv); Conf.wm_argv = u_argv(argv); - while ((ch = getopt(argc, argv, "c:d:")) != -1) { + while ((ch = getopt(argc, argv, "c:d:v")) != -1) { switch (ch) { case 'c': conf_file = optarg; @@ -75,6 +75,9 @@ main(int argc, char **argv) case 'd': display_name = optarg; break; + case 'v': + Conf.debug++; + break; default: usage(); } @@ -241,7 +244,7 @@ usage(void) { extern char *__progname; - (void)fprintf(stderr, "usage: %s [-c file] [-d display]\n", + (void)fprintf(stderr, "usage: %s [-v] [-c file] [-d display]\n", __progname); exit(1); } -- cgit v1.2.3-2-gb3c3