diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2020-06-21 09:18:27 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2020-06-21 09:18:27 -0400 |
commit | 8a43400ccf2b23f60d1101ea4d348058e7ad3c36 (patch) | |
tree | d7b70419bbf8a50948531979dfb86aaedda2ce08 /src/twm.c | |
parent | fc19a82a10dc797605d6cb5d9028685644c6db3d (diff) |
add/use new function parseWarning, which honors -v/-q options
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'src/twm.c')
-rw-r--r-- | src/twm.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -117,7 +117,7 @@ ScreenInfo **ScreenList; /* structures for each screen */ ScreenInfo *Scr = NULL; /* the cur and prev screens */ int PreviousScreen; /* last screen that we were on */ int FirstScreen; /* TRUE ==> first screen of display */ -static int verbose = 1; /* controls error messages */ +int message_level = 1; /* controls error messages */ static int RedirectError; /* TRUE ==> another window manager running */ static int TwmErrorHandler(Display *dpy, XErrorEvent *event); /* for settting RedirectError */ static int CatchRedirectError(Display *dpy, XErrorEvent *event); /* for everything else */ @@ -306,7 +306,7 @@ main(int argc, char *argv[]) case 'v': /* -verbose */ if (!brief_opt(argv[i], "verbose")) usage(); - verbose++; + message_level++; continue; case 'c': /* -clientId */ if (!brief_opt(argv[i], "clientId")) @@ -325,7 +325,7 @@ main(int argc, char *argv[]) case 'q': /* -quiet */ if (!brief_opt(argv[i], "quiet")) usage(); - --verbose; + --message_level; continue; } } @@ -987,7 +987,7 @@ TwmErrorHandler(Display *dpy2, XErrorEvent *event) LastErrorEvent = *event; ErrorOccurred = True; - if ((verbose > 1) && /* don't be too obnoxious */ + if ((message_level > 1) && /* don't be too obnoxious */ event->error_code != BadWindow && /* watch for dead puppies */ (event->request_code != X_GetGeometry && /* of all styles */ event->error_code != BadDrawable)) @@ -1020,7 +1020,7 @@ twmError(const char *format, ...) void twmWarning(const char *format, ...) { - if (verbose > 0) { + if (message_level > 0) { va_list ap; va_start(ap, format); @@ -1034,7 +1034,7 @@ twmWarning(const char *format, ...) void twmVerbose(const char *format, ...) { - if (verbose > 1) { + if (message_level > 1) { va_list ap; va_start(ap, format); |