clang-format: bring back ForeachMacros (#3948)

* clang-format: bring back ForeachMacros

ForeachMacros was disabled in 4211274fcd
due to the breakage of include/queue.h. The currently used version,
clang-format-6.0 doesn't break it.

* Add curly braces

Co-authored-by: Orestis Floros <orestisflo@gmail.com>
This commit is contained in:
xzfc
2020-02-19 10:31:09 +00:00
committed by GitHub
parent e3f120c0b6
commit 1f0c628cde
37 changed files with 363 additions and 329 deletions

View File

@ -140,7 +140,7 @@ static void update_placeholder_contents(placeholder_state *state) {
Match *swallows;
int n = 0;
TAILQ_FOREACH(swallows, &(state->con->swallow_head), matches) {
TAILQ_FOREACH (swallows, &(state->con->swallow_head), matches) {
char *serialized = NULL;
#define APPEND_REGEX(re_name) \
@ -234,10 +234,10 @@ static void open_placeholder_window(Con *con) {
}
Con *child;
TAILQ_FOREACH(child, &(con->nodes_head), nodes) {
TAILQ_FOREACH (child, &(con->nodes_head), nodes) {
open_placeholder_window(child);
}
TAILQ_FOREACH(child, &(con->floating_head), floating_windows) {
TAILQ_FOREACH (child, &(con->floating_head), floating_windows) {
open_placeholder_window(child);
}
}
@ -251,10 +251,10 @@ static void open_placeholder_window(Con *con) {
*/
void restore_open_placeholder_windows(Con *parent) {
Con *child;
TAILQ_FOREACH(child, &(parent->nodes_head), nodes) {
TAILQ_FOREACH (child, &(parent->nodes_head), nodes) {
open_placeholder_window(child);
}
TAILQ_FOREACH(child, &(parent->floating_head), floating_windows) {
TAILQ_FOREACH (child, &(parent->floating_head), floating_windows) {
open_placeholder_window(child);
}
@ -270,7 +270,7 @@ void restore_open_placeholder_windows(Con *parent) {
*/
bool restore_kill_placeholder(xcb_window_t placeholder) {
placeholder_state *state;
TAILQ_FOREACH(state, &state_head, state) {
TAILQ_FOREACH (state, &state_head, state) {
if (state->window != placeholder)
continue;
@ -288,7 +288,7 @@ bool restore_kill_placeholder(xcb_window_t placeholder) {
static void expose_event(xcb_expose_event_t *event) {
placeholder_state *state;
TAILQ_FOREACH(state, &state_head, state) {
TAILQ_FOREACH (state, &state_head, state) {
if (state->window != event->window)
continue;
@ -310,7 +310,7 @@ static void expose_event(xcb_expose_event_t *event) {
*/
static void configure_notify(xcb_configure_notify_event_t *event) {
placeholder_state *state;
TAILQ_FOREACH(state, &state_head, state) {
TAILQ_FOREACH (state, &state_head, state) {
if (state->window != event->window)
continue;