tmapw: better handling of arguments - wmutils - X windows manipulation utilities
(HTM) git clone git://z3bra.org/wmutils
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit c1f2541ca1940d8ee27ddb6ec4fbc15ede51a428
(DIR) parent 9645cf41239653d177d74bc31fedc51b070b80ce
(HTM) Author: z3bra <willy@mailoo.org>
Date: Thu, 27 Nov 2014 23:51:26 +0100
mapw: better handling of arguments
Diffstat:
M mapw.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/mapw.c b/mapw.c
t@@ -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);
}
t@@ -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 {
t@@ -73,7 +73,7 @@ main(int argc, char **argv)
default : usage();
} ARGEND;
- if (argc < 1)
+ if (argc < 1 || mapflag == 0)
usage();
atexit(cleanup);