diff options
author | okan <okan> | 2008-07-11 14:21:28 +0000 |
---|---|---|
committer | okan <okan> | 2008-07-11 14:21:28 +0000 |
commit | b23fad398789ed8d7412813e5b178a38a6667ee7 (patch) | |
tree | 4abba8dd92715e6dc2a272a487b00542b06d40db /calmwm.c | |
parent | 734f45ab4bdaf25835e90a56a1803de23ff49975 (diff) | |
download | cwm-b23fad398789ed8d7412813e5b178a38a6667ee7.tar.gz cwm-b23fad398789ed8d7412813e5b178a38a6667ee7.tar.xz cwm-b23fad398789ed8d7412813e5b178a38a6667ee7.zip |
spacing, declaration lineup to be consistent throughout cwm,
readability, and a bit of knf. ok oga@
Diffstat (limited to 'calmwm.c')
-rw-r--r-- | calmwm.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/calmwm.c b/calmwm.c index 9fb49ec..31d8cef 100644 --- a/calmwm.c +++ b/calmwm.c @@ -44,16 +44,14 @@ struct conf Conf; #define gray_height 2 static char gray_bits[] = {0x02, 0x01}; - static void _sigchld_cb(int); int main(int argc, char **argv) { - int ch; - const char *conf_file = NULL; - - char *display_name = NULL; + const char *conf_file = NULL; + char *display_name = NULL; + int ch; while ((ch = getopt(argc, argv, "c:d:")) != -1) { switch (ch) { @@ -110,8 +108,8 @@ main(int argc, char **argv) void x_setup(char *display_name) { - int i; - struct screen_ctx *sc; + struct screen_ctx *sc; + int i; TAILQ_INIT(&Screenq); @@ -140,13 +138,13 @@ x_setup(char *display_name) void x_setupscreen(struct screen_ctx *sc, u_int which) { - XColor tmp; - XGCValues gv; - Window *wins, w0, w1; - u_int nwins, i = 0; - XWindowAttributes winattr; - XSetWindowAttributes rootattr; - struct keybinding *kb; + XColor tmp; + XGCValues gv; + Window *wins, w0, w1; + XWindowAttributes winattr; + XSetWindowAttributes rootattr; + struct keybinding *kb; + u_int nwins, i; Curscreen = sc; @@ -247,8 +245,8 @@ x_setupscreen(struct screen_ctx *sc, u_int which) char * x_screenname(int which) { - char *cp, *dstr, *sn; - size_t snlen; + char *cp, *dstr, *sn; + size_t snlen; if (which > 9) errx(1, "Can't handle more than 9 screens. If you need it, " @@ -298,9 +296,9 @@ x_errorhandler(Display *dpy, XErrorEvent *e) static void _sigchld_cb(int which) { - pid_t pid; - int save_errno = errno; - int status; + pid_t pid; + int save_errno = errno; + int status; /* Collect dead children. */ while ((pid = waitpid(-1, &status, WNOHANG)) > 0 || @@ -313,7 +311,7 @@ _sigchld_cb(int which) __dead void usage(void) { - extern char *__progname; + extern char *__progname; fprintf(stderr, "usage: %s [-c file] [-d display]\n", __progname); exit(1); |