From e31accb4b85ccad468268bf5ed60ecdcc99004ae Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Sun, 30 Sep 2012 18:41:28 +0300 Subject: [PATCH] bool is a real type --- bspwm.c | 1 - events.c | 3 +-- helpers.h | 5 ----- messages.c | 1 - settings.c | 4 +--- settings.h | 2 +- tree.c | 7 +++---- types.h | 1 + window.c | 1 - 9 files changed, 7 insertions(+), 18 deletions(-) diff --git a/bspwm.c b/bspwm.c index b469e21..815796c 100644 --- a/bspwm.c +++ b/bspwm.c @@ -12,7 +12,6 @@ #include #include #include -#include "helpers.h" #include "types.h" #include "settings.h" #include "messages.h" diff --git a/events.c b/events.c index 1226186..f969a4a 100644 --- a/events.c +++ b/events.c @@ -4,7 +4,6 @@ #include #include #include -#include "helpers.h" #include "types.h" #include "bspwm.h" #include "settings.h" @@ -73,7 +72,7 @@ void map_request(xcb_generic_event_t *evt) handle_rules(win, &floating, &transient, &fullscreen, &takes_focus); - xcb_icccm_get_wm_class_reply_t reply; + xcb_icccm_get_wm_class_reply_t reply; if (xcb_icccm_get_wm_class_reply(dpy, xcb_icccm_get_wm_class(dpy, win), &reply, NULL) == 1) { strncpy(c->class_name, reply.class_name, sizeof(c->class_name)); xcb_icccm_get_wm_class_reply_wipe(&reply); diff --git a/helpers.h b/helpers.h index 47cd9f2..f68e96e 100644 --- a/helpers.h +++ b/helpers.h @@ -18,9 +18,4 @@ # define PRINTF(x) ; #endif -typedef enum { - false, - true -} bool; - #endif diff --git a/messages.c b/messages.c index e39ff52..a9b99a5 100644 --- a/messages.c +++ b/messages.c @@ -1,7 +1,6 @@ #include #include #include -#include "helpers.h" #include "settings.h" #include "messages.h" #include "common.h" diff --git a/settings.c b/settings.c index 81562dd..c84d166 100644 --- a/settings.c +++ b/settings.c @@ -4,8 +4,6 @@ #include #include #include -#include "helpers.h" -#include "types.h" #include "bspwm.h" #include "misc.h" #include "common.h" @@ -25,7 +23,7 @@ void run_autostart(void) setsid(); execl(path, path, NULL); - + PUTS("error: could not load autostart file"); exit(EXIT_SUCCESS); } diff --git a/settings.h b/settings.h index f1b7252..8d21ab5 100644 --- a/settings.h +++ b/settings.h @@ -3,7 +3,7 @@ #include #include -#include "helpers.h" +#include "types.h" #define WM_NAME "bspwm" #define CONFIG_FILE "bspwmrc" diff --git a/tree.c b/tree.c index c1e1595..38ce6ae 100644 --- a/tree.c +++ b/tree.c @@ -5,7 +5,6 @@ #include #include #include "settings.h" -#include "helpers.h" #include "misc.h" #include "window.h" #include "types.h" @@ -133,7 +132,7 @@ void move_fence(node_t *n, direction_t dir, fence_move_t mov) if (fence == NULL) return; - if ((mov == MOVE_PUSH && (dir == DIR_RIGHT || dir == DIR_DOWN)) + if ((mov == MOVE_PUSH && (dir == DIR_RIGHT || dir == DIR_DOWN)) || (mov == MOVE_PULL && (dir == DIR_LEFT || dir == DIR_UP))) change_split_ratio(fence, CHANGE_INCREASE); else @@ -169,7 +168,7 @@ void rotate_tree(node_t *n, rotate_t rot) void magnetise_tree(node_t *n, corner_t corner) { - if (n == NULL || is_leaf(n)) + if (n == NULL || is_leaf(n)) return; PUTS("magnetise tree"); @@ -206,7 +205,7 @@ void dump_tree(desktop_t *d, node_t *n, char *rsp, int depth) strcat(rsp, " "); if (is_leaf(n)) - sprintf(line, "%s %X %s%s%s%s%s", n->client->class_name, n->client->window, (n->client->floating ? "f" : "-"), (n->client->transient ? "t" : "-"), (n->client->fullscreen ? "F" : "-"), (n->client->urgent ? "u" : "-"), (n->client->locked ? "l" : "-")); + sprintf(line, "%s %X %s%s%s%s%s", n->client->class_name, n->client->window, (n->client->floating ? "f" : "-"), (n->client->transient ? "t" : "-"), (n->client->fullscreen ? "F" : "-"), (n->client->urgent ? "u" : "-"), (n->client->locked ? "l" : "-")); else sprintf(line, "%s %.2f", (n->split_type == TYPE_HORIZONTAL ? "H" : "V"), n->split_ratio); diff --git a/types.h b/types.h index 7b91657..5698f9c 100644 --- a/types.h +++ b/types.h @@ -1,6 +1,7 @@ #ifndef _TYPES_H #define _TYPES_H +#include #include #include #include "helpers.h" diff --git a/window.c b/window.c index 6f77526..079c9c8 100644 --- a/window.c +++ b/window.c @@ -4,7 +4,6 @@ #include #include #include -#include "helpers.h" #include "types.h" #include "tree.h" #include "bspwm.h"