main.c
changeset 619 bda4880c462d
parent 616 f617c75a8405
child 641 107719a9ce3b
equal deleted inserted replaced
618:567d70d132fa 619:bda4880c462d
     2  * See LICENSE file for license details.
     2  * See LICENSE file for license details.
     3  */
     3  */
     4 
     4 
     5 #include "dwm.h"
     5 #include "dwm.h"
     6 #include <errno.h>
     6 #include <errno.h>
       
     7 #include <locale.h>
     7 #include <stdio.h>
     8 #include <stdio.h>
     8 #include <stdlib.h>
     9 #include <stdlib.h>
     9 #include <string.h>
    10 #include <string.h>
    10 #include <unistd.h>
    11 #include <unistd.h>
    11 #include <sys/select.h>
    12 #include <sys/select.h>
   238 		fputs("dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout);
   239 		fputs("dwm-"VERSION", (C)opyright MMVI Anselm R. Garbe\n", stdout);
   239 		exit(EXIT_SUCCESS);
   240 		exit(EXIT_SUCCESS);
   240 	}
   241 	}
   241 	else if(argc != 1)
   242 	else if(argc != 1)
   242 		eprint("usage: dwm [-v]\n");
   243 		eprint("usage: dwm [-v]\n");
       
   244 	setlocale(LC_CTYPE, "");
   243 	dpy = XOpenDisplay(0);
   245 	dpy = XOpenDisplay(0);
   244 	if(!dpy)
   246 	if(!dpy)
   245 		eprint("dwm: cannot open display\n");
   247 		eprint("dwm: cannot open display\n");
   246 	xfd = ConnectionNumber(dpy);
   248 	xfd = ConnectionNumber(dpy);
   247 	screen = DefaultScreen(dpy);
   249 	screen = DefaultScreen(dpy);