Xinqi Bao's Git
projects
/
dwm.git
/ commitdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
879241c
)
using eprint instead of fputs
author
Anselm R. Garbe <
[email protected]
>
Mon, 19 Feb 2007 20:17:54 +0000
(21:17 +0100)
committer
Anselm R. Garbe <
[email protected]
>
Mon, 19 Feb 2007 20:17:54 +0000
(21:17 +0100)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
8ecf9fa
..
6f8914c
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-381,15
+381,12
@@
main(int argc, char *argv[]) {
fd_set rd;
XEvent ev;
fd_set rd;
XEvent ev;
- if(argc == 2 && !strncmp("-v", argv[1], 3)) {
- fputs("dwm-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n", stdout);
- exit(EXIT_SUCCESS);
- }
+ if(argc == 2 && !strncmp("-v", argv[1], 3))
+ eprint("dwm-"VERSION", (C)opyright MMVI-MMVII Anselm R. Garbe\n");
else if(argc != 1)
eprint("usage: dwm [-v]\n");
setlocale(LC_CTYPE, "");
else if(argc != 1)
eprint("usage: dwm [-v]\n");
setlocale(LC_CTYPE, "");
- dpy = XOpenDisplay(0);
- if(!dpy)
+ if(!(dpy = XOpenDisplay(0)))
eprint("dwm: cannot open display\n");
xfd = ConnectionNumber(dpy);
screen = DefaultScreen(dpy);
eprint("dwm: cannot open display\n");
xfd = ConnectionNumber(dpy);
screen = DefaultScreen(dpy);