nausea

curses audio visualizer
git clone git://git.2f30.org/nausea
Log | Files | Refs | README | LICENSE

commit ebacefffe11d81f5d6ed4bf36058b1faef78b3eb
parent f79ff703fb19fa4e08634361b63393e3fc6f64cc
Author: lostd <lostd@2f30.org>
Date:   Tue, 23 Jun 2015 01:42:55 +0100

Debug printing

Diffstat:
Mnausea.1 | 10++++++----
Mnausea.c | 10++++++++--
2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/nausea.1 b/nausea.1 @@ -1,4 +1,4 @@ -.Dd June 17, 2015 +.Dd June 23, 2015 .Dt NAUSEA 1 .Os .Sh NAME @@ -6,8 +6,8 @@ .Nd curses audio visualizer .Sh SYNOPSIS .Nm nausea -.Op Fl hcpklb -.Op Fl d Ar num +.Op Fl hcpklbsd +.Op Fl i Ar num .Op Ar fifo .Sh DESCRIPTION The @@ -24,7 +24,7 @@ The options are as follows: .Bl -tag -width Ds .It Fl h Show usage line. -.It Fl d Ar num +.It Fl i Ar num Choose a visualization using its number from below. .It Fl c Enable color. @@ -38,6 +38,8 @@ Go left in the fountain visualization. Enable bounce mode in the fountain visualization. .It Fl s Enable stereo mode. +.It Fl d +Enable debug printing. .El .Pp Exposed runtime options: diff --git a/nausea.c b/nausea.c @@ -726,7 +726,7 @@ initcolors(void) static void usage(void) { - fprintf(stderr, "usage: %s [-hcpklbs] [-d num] [fifo]\n", argv0); + fprintf(stderr, "usage: %s [-hcpklbsd] [-i num] [fifo]\n", argv0); fprintf(stderr, "default fifo path is `/tmp/audio.fifo'\n"); exit(1); } @@ -743,7 +743,7 @@ main(int argc, char *argv[]) while (--argc > 0 && (*++argv)[0] == '-') while ((c = *++argv[0])) switch (c) { - case 'd': + case 'i': if (*++argv == NULL) usage(); argc--; @@ -769,6 +769,9 @@ main(int argc, char *argv[]) case 's': stereo = 1; break; + case 'd': + debug = 1; + break; case 'h': /* fall-through */ default: @@ -857,6 +860,9 @@ main(int argc, char *argv[]) case ' ': freeze = !freeze; break; + case 'd': + debug = !debug; + break; } /* detect visualization change */