wmutils

X windows manipulation utilities
git clone git://z3bra.org/wmutils
Log | Files | Refs | LICENSE

commit c1f2541ca1940d8ee27ddb6ec4fbc15ede51a428
parent 9645cf41239653d177d74bc31fedc51b070b80ce
Author: z3bra <willy@mailoo.org>
Date:   Thu Nov 27 23:51:26 2014

mapw: better handling of arguments

Diffstat:
 mapw.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mapw.c b/mapw.c @@ -22,7 +22,7 @@ static int ismapped(xcb_window_t w); static void usage(void) { - fprintf(stderr, "usage: %s [-hmut] <wid> [wid..]\n", argv0); + fprintf(stderr, "usage: %s [-h] [-mut <wid> [wid..]]\n", argv0); exit(1); } @@ -63,7 +63,7 @@ ismapped(xcb_window_t w) int main(int argc, char **argv) { - int i, mapflag = MAP; + int i, mapflag = 0; xcb_window_t w = 0; ARGBEGIN { @@ -73,7 +73,7 @@ main(int argc, char **argv) default : usage(); } ARGEND; - if (argc < 1) + if (argc < 1 || mapflag == 0) usage(); atexit(cleanup);