Change the indention-style

This commit is contained in:
Axel Wagner
2010-08-03 21:20:11 +02:00
parent 49eef0db3f
commit 8595d3bb48
9 changed files with 714 additions and 714 deletions

View File

@ -11,9 +11,9 @@ typedef struct i3_output i3_output;
SLIST_HEAD(outputs_head, i3_output);
struct outputs_head *outputs;
void parse_outputs_json(char* json);
void free_outputs();
i3_output* get_output_by_name(char* name);
void parse_outputs_json(char* json);
void free_outputs();
i3_output* get_output_by_name(char* name);
struct i3_output {
char* name;

View File

@ -5,30 +5,30 @@
/* Securely free p */
#define FREE(p) do { \
if (p != NULL) { \
free(p); \
p = NULL; \
} \
if (p != NULL) { \
free(p); \
p = NULL; \
} \
} while (0)
/* Securely fee single-linked list */
#define FREE_SLIST(l, type) do { \
type *walk = SLIST_FIRST(l); \
while (!SLIST_EMPTY(l)) { \
SLIST_REMOVE_HEAD(l, slist); \
FREE(walk); \
walk = SLIST_FIRST(l); \
} \
type *walk = SLIST_FIRST(l); \
while (!SLIST_EMPTY(l)) { \
SLIST_REMOVE_HEAD(l, slist); \
FREE(walk); \
walk = SLIST_FIRST(l); \
} \
} while (0)
#endif
/* Securely fee tail-queues */
#define FREE_TAILQ(l, type) do { \
type *walk = TAILQ_FIRST(l); \
while (!TAILQ_EMPTY(l)) { \
TAILQ_REMOVE(l, TAILQ_FIRST(l), tailq); \
FREE(walk); \
walk = TAILQ_FIRST(l); \
} \
type *walk = TAILQ_FIRST(l); \
while (!TAILQ_EMPTY(l)) { \
TAILQ_REMOVE(l, TAILQ_FIRST(l), tailq); \
FREE(walk); \
walk = TAILQ_FIRST(l); \
} \
} while (0)

View File

@ -12,16 +12,16 @@ void parse_workspaces_json();
void free_workspaces();
struct i3_ws {
int num;
char *name;
int name_width;
bool visible;
bool focused;
bool urgent;
rect rect;
struct i3_output *output;
int num;
char *name;
int name_width;
bool visible;
bool focused;
bool urgent;
rect rect;
struct i3_output *output;
TAILQ_ENTRY(i3_ws) tailq;
TAILQ_ENTRY(i3_ws) tailq;
};
#endif

View File

@ -12,11 +12,11 @@ enum {
xcb_atom_t atoms[NUM_ATOMS];
xcb_connection_t* xcb_connection;
xcb_screen_t* xcb_screens;
xcb_window_t xcb_root;
xcb_font_t xcb_font;
int font_height;
xcb_connection_t *xcb_connection;
xcb_screen_t *xcb_screens;
xcb_window_t xcb_root;
xcb_font_t xcb_font;
int font_height;
void init_xcb();
void clean_xcb();