From f354f534357798eb3ba497b7143132f41ff090f6 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Tue, 11 Oct 2016 09:13:35 +0200 Subject: [PATCH] Ensure all *.[ch] files include config.h Including config.h is necessary to get e.g. the _GNU_SOURCE define and any other definitions that autoconf declares. Hence, config.h needs to be included as the first header in each file. This is done either via: 1. Including "common.h" (i3bar) 2. Including "libi3.h" 3. Including "all.h" (i3) 4. Including directly Also remove now-unused I3__FILE__, add copyright/license statement where missing and switch include/all.h to #pragma once. --- i3-config-wizard/main.c | 2 ++ i3-dump-log/main.c | 2 ++ i3-input/i3-input.h | 2 ++ i3-input/main.c | 4 ++-- i3-msg/main.c | 3 ++- i3-nagbar/i3-nagbar.h | 2 ++ i3-nagbar/main.c | 3 ++- i3bar/include/child.h | 2 ++ i3bar/include/common.h | 2 ++ i3bar/include/configuration.h | 2 ++ i3bar/include/ipc.h | 2 ++ i3bar/include/mode.h | 2 ++ i3bar/include/outputs.h | 2 ++ i3bar/include/parse_json_header.h | 2 ++ i3bar/include/util.h | 2 ++ i3bar/include/workspaces.h | 4 ++-- i3bar/include/xcb.h | 2 ++ i3bar/src/child.c | 4 ++-- i3bar/src/config.c | 4 ++-- i3bar/src/ipc.c | 4 ++-- i3bar/src/main.c | 4 ++-- i3bar/src/mode.c | 4 ++-- i3bar/src/outputs.c | 4 ++-- i3bar/src/parse_json_header.c | 4 ++-- i3bar/src/workspaces.c | 4 ++-- i3bar/src/xcb.c | 3 ++- include/all.h | 7 +++---- include/assignments.h | 2 ++ include/bindings.h | 2 ++ include/click.h | 2 ++ include/cmdparse.h | 2 ++ include/commands.h | 2 ++ include/commands_parser.h | 2 ++ include/con.h | 2 ++ include/config_directives.h | 2 ++ include/config_parser.h | 2 ++ include/configuration.h | 3 ++- include/data.h | 3 ++- include/debug.h | 2 ++ include/display_version.h | 2 ++ include/ewmh.h | 2 ++ include/fake_outputs.h | 2 ++ include/floating.h | 2 ++ include/handlers.h | 2 ++ include/i3.h | 2 ++ include/ipc.h | 2 ++ include/key_press.h | 2 ++ include/libi3.h | 2 ++ include/load_layout.h | 2 ++ include/log.h | 2 ++ include/main.h | 2 ++ include/manage.h | 2 ++ include/match.h | 2 ++ include/move.h | 2 ++ include/output.h | 2 ++ include/randr.h | 2 ++ include/regex.h | 2 ++ include/render.h | 2 ++ include/resize.h | 2 ++ include/restore_layout.h | 2 ++ include/scratchpad.h | 2 ++ include/shmlog.h | 2 ++ include/sighandler.h | 2 ++ include/startup.h | 2 ++ include/tree.h | 2 ++ include/util.h | 2 ++ include/window.h | 2 ++ include/workspace.h | 2 ++ include/x.h | 2 ++ include/xcb.h | 2 ++ include/xcursor.h | 2 ++ include/xinerama.h | 2 ++ include/yajl_utils.h | 2 ++ libi3/dpi.c | 1 + libi3/draw_util.c | 4 ++-- libi3/fake_configure_notify.c | 4 ++-- libi3/font.c | 4 ++-- libi3/format_placeholders.c | 4 ++-- libi3/get_colorpixel.c | 4 ++-- libi3/get_config_path.c | 1 + libi3/get_exe_path.c | 11 +++++++++-- libi3/get_mod_mask.c | 4 ++-- libi3/get_process_filename.c | 4 ++-- libi3/ipc_connect.c | 4 ++-- libi3/ipc_recv_message.c | 4 ++-- libi3/ipc_send_message.c | 4 ++-- libi3/is_debug_build.c | 9 +++++++++ libi3/mkdirp.c | 8 ++++++++ libi3/resolve_tilde.c | 2 +- libi3/root_atom_contents.c | 4 ++-- libi3/safewrappers.c | 4 ++-- libi3/string.c | 3 +-- libi3/strndup.c | 4 ++-- libi3/ucs2_conversion.c | 4 ++-- src/assignments.c | 2 -- src/click.c | 2 -- src/commands.c | 5 ++--- src/commands_parser.c | 6 ++---- src/con.c | 3 +-- src/config.c | 3 +-- src/config_directives.c | 6 ++---- src/config_parser.c | 6 ++---- src/debug.c | 4 ++-- src/display_version.c | 5 ++--- src/ewmh.c | 2 -- src/fake_outputs.c | 2 -- src/floating.c | 2 -- src/handlers.c | 2 -- src/ipc.c | 3 +-- src/key_press.c | 2 -- src/load_layout.c | 2 -- src/log.c | 4 ++-- src/main.c | 5 ++--- src/manage.c | 3 +-- src/match.c | 2 -- src/move.c | 2 -- src/output.c | 2 -- src/randr.c | 2 -- src/regex.c | 2 -- src/render.c | 2 -- src/resize.c | 2 -- src/restore_layout.c | 2 -- src/scratchpad.c | 2 -- src/sighandler.c | 2 -- src/startup.c | 3 +-- src/tree.c | 2 -- src/util.c | 2 -- src/version.c | 2 ++ src/window.c | 2 -- src/workspace.c | 2 -- src/x.c | 2 -- src/xcb.c | 2 -- src/xcursor.c | 4 ++-- src/xinerama.c | 2 -- 134 files changed, 230 insertions(+), 149 deletions(-) diff --git a/i3-config-wizard/main.c b/i3-config-wizard/main.c index 284f15fa..2bb43270 100644 --- a/i3-config-wizard/main.c +++ b/i3-config-wizard/main.c @@ -8,6 +8,8 @@ * keysyms. * */ +#include + #if defined(__FreeBSD__) #include #endif diff --git a/i3-dump-log/main.c b/i3-dump-log/main.c index d9b0613c..ec9e577d 100644 --- a/i3-dump-log/main.c +++ b/i3-dump-log/main.c @@ -7,6 +7,8 @@ * i3-dump-log/main.c: Dumps the i3 SHM log to stdout. * */ +#include + #include #include #include diff --git a/i3-input/i3-input.h b/i3-input/i3-input.h index fcf9edc3..d347506f 100644 --- a/i3-input/i3-input.h +++ b/i3-input/i3-input.h @@ -1,5 +1,7 @@ #pragma once +#include + #include #define die(...) errx(EXIT_FAILURE, __VA_ARGS__); diff --git a/i3-input/main.c b/i3-input/main.c index b467c4c3..97d574a2 100644 --- a/i3-input/main.c +++ b/i3-input/main.c @@ -8,6 +8,8 @@ * to i3. * */ +#include "libi3.h" + #include #include #include @@ -31,8 +33,6 @@ #include "i3-input.h" -#include "libi3.h" - /* IPC format string. %s will be replaced with what the user entered, then * the command will be sent to i3 */ static char *format; diff --git a/i3-msg/main.c b/i3-msg/main.c index 658c33b4..51612459 100644 --- a/i3-msg/main.c +++ b/i3-msg/main.c @@ -14,6 +14,8 @@ * Additionally, it’s even useful sometimes :-). * */ +#include "libi3.h" + #include #include #include @@ -34,7 +36,6 @@ #include #include -#include "libi3.h" #include static char *socket_path; diff --git a/i3-nagbar/i3-nagbar.h b/i3-nagbar/i3-nagbar.h index fc076d72..c5e94cc6 100644 --- a/i3-nagbar/i3-nagbar.h +++ b/i3-nagbar/i3-nagbar.h @@ -1,5 +1,7 @@ #pragma once +#include + #include #define die(...) errx(EXIT_FAILURE, __VA_ARGS__); diff --git a/i3-nagbar/main.c b/i3-nagbar/main.c index 674fcb7d..2e9e77d4 100644 --- a/i3-nagbar/main.c +++ b/i3-nagbar/main.c @@ -8,6 +8,8 @@ * when the user has an error in their configuration file. * */ +#include "libi3.h" + #include #include #include @@ -30,7 +32,6 @@ #include #include -#include "libi3.h" #include "i3-nagbar.h" /** This is the equivalent of XC_left_ptr. I’m not sure why xcb doesn’t have a diff --git a/i3bar/include/child.h b/i3bar/include/child.h index 873a3465..0871c7f4 100644 --- a/i3bar/include/child.h +++ b/i3bar/include/child.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include #define STDIN_CHUNK_SIZE 1024 diff --git a/i3bar/include/common.h b/i3bar/include/common.h index c6bb0dba..0929e408 100644 --- a/i3bar/include/common.h +++ b/i3bar/include/common.h @@ -7,6 +7,8 @@ */ #pragma once +#include + #include #include #include diff --git a/i3bar/include/configuration.h b/i3bar/include/configuration.h index 2a059046..c7c1f5e2 100644 --- a/i3bar/include/configuration.h +++ b/i3bar/include/configuration.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include "common.h" typedef enum { diff --git a/i3bar/include/ipc.h b/i3bar/include/ipc.h index 686c0322..5056e5f3 100644 --- a/i3bar/include/ipc.h +++ b/i3bar/include/ipc.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include /* diff --git a/i3bar/include/mode.h b/i3bar/include/mode.h index 828d4906..5c87d904 100644 --- a/i3bar/include/mode.h +++ b/i3bar/include/mode.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include #include "common.h" diff --git a/i3bar/include/outputs.h b/i3bar/include/outputs.h index 63cfca7f..3067581d 100644 --- a/i3bar/include/outputs.h +++ b/i3bar/include/outputs.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include #include diff --git a/i3bar/include/parse_json_header.h b/i3bar/include/parse_json_header.h index 41e97de2..d834fe05 100644 --- a/i3bar/include/parse_json_header.h +++ b/i3bar/include/parse_json_header.h @@ -10,6 +10,8 @@ */ #pragma once +#include + #include /** diff --git a/i3bar/include/util.h b/i3bar/include/util.h index dfbfd6bf..3af79ed7 100644 --- a/i3bar/include/util.h +++ b/i3bar/include/util.h @@ -7,6 +7,8 @@ */ #pragma once +#include + #include "queue.h" /* Get the maximum/minimum of x and y */ diff --git a/i3bar/include/workspaces.h b/i3bar/include/workspaces.h index 5ed84de8..dde8b6e1 100644 --- a/i3bar/include/workspaces.h +++ b/i3bar/include/workspaces.h @@ -9,10 +9,10 @@ */ #pragma once -#include - #include "common.h" +#include + typedef struct i3_ws i3_ws; TAILQ_HEAD(ws_head, i3_ws); diff --git a/i3bar/include/xcb.h b/i3bar/include/xcb.h index e5af39fa..7783e877 100644 --- a/i3bar/include/xcb.h +++ b/i3bar/include/xcb.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include //#include "outputs.h" diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 295eb76f..1fd901ce 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -7,6 +7,8 @@ * child.c: Getting input for the statusline * */ +#include "common.h" + #include #include #include @@ -25,8 +27,6 @@ #include #include -#include "common.h" - /* Global variables for child_*() */ i3bar_child child; diff --git a/i3bar/src/config.c b/i3bar/src/config.c index 5c23bc78..d065ff4c 100644 --- a/i3bar/src/config.c +++ b/i3bar/src/config.c @@ -7,6 +7,8 @@ * config.c: Parses the configuration (received from i3). * */ +#include "common.h" + #include #include #include @@ -17,8 +19,6 @@ #include -#include "common.h" - static char *cur_key; static bool parsing_bindings; static bool parsing_tray_outputs; diff --git a/i3bar/src/ipc.c b/i3bar/src/ipc.c index 34898663..4a090ad7 100644 --- a/i3bar/src/ipc.c +++ b/i3bar/src/ipc.c @@ -7,6 +7,8 @@ * ipc.c: Communicating with i3 * */ +#include "common.h" + #include #include #include @@ -21,8 +23,6 @@ #include #endif -#include "common.h" - ev_io *i3_connection; const char *sock_path; diff --git a/i3bar/src/main.c b/i3bar/src/main.c index 14e42a2b..be684fc5 100644 --- a/i3bar/src/main.c +++ b/i3bar/src/main.c @@ -5,6 +5,8 @@ * © 2010 Axel Wagner and contributors (see also: LICENSE) * */ +#include "common.h" + #include #include #include @@ -15,8 +17,6 @@ #include #include -#include "common.h" - /* * Having verboselog(), errorlog() and debuglog() is necessary when using libi3. * diff --git a/i3bar/src/mode.c b/i3bar/src/mode.c index 3e52f0b1..17e7b97e 100644 --- a/i3bar/src/mode.c +++ b/i3bar/src/mode.c @@ -7,6 +7,8 @@ * mode.c: Handle mode event and show current binding mode in the bar * */ +#include "common.h" + #include #include #include @@ -14,8 +16,6 @@ #include #include -#include "common.h" - /* A datatype to pass through the callbacks to save the state */ struct mode_json_params { char *json; diff --git a/i3bar/src/outputs.c b/i3bar/src/outputs.c index b53d8cc8..480c00be 100644 --- a/i3bar/src/outputs.c +++ b/i3bar/src/outputs.c @@ -7,6 +7,8 @@ * outputs.c: Maintaining the outputs list * */ +#include "common.h" + #include #include #include @@ -15,8 +17,6 @@ #include #include -#include "common.h" - /* A datatype to pass through the callbacks to save the state */ struct outputs_json_params { struct outputs_head *outputs; diff --git a/i3bar/src/parse_json_header.c b/i3bar/src/parse_json_header.c index 1cd95106..3d4c2a67 100644 --- a/i3bar/src/parse_json_header.c +++ b/i3bar/src/parse_json_header.c @@ -8,6 +8,8 @@ * protocol version and features. * */ +#include "common.h" + #include #include #include @@ -25,8 +27,6 @@ #include #include -#include "common.h" - static enum { KEY_VERSION, KEY_STOP_SIGNAL, diff --git a/i3bar/src/workspaces.c b/i3bar/src/workspaces.c index 1187a946..23324989 100644 --- a/i3bar/src/workspaces.c +++ b/i3bar/src/workspaces.c @@ -7,6 +7,8 @@ * workspaces.c: Maintaining the workspace lists * */ +#include "common.h" + #include #include #include @@ -14,8 +16,6 @@ #include #include -#include "common.h" - /* A datatype to pass through the callbacks to save the state */ struct workspaces_json_params { struct ws_head *workspaces; diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c index 32187445..2715e447 100644 --- a/i3bar/src/xcb.c +++ b/i3bar/src/xcb.c @@ -7,6 +7,8 @@ * xcb.c: Communicating with X * */ +#include "common.h" + #include #include #include @@ -32,7 +34,6 @@ #include #endif -#include "common.h" #include "libi3.h" /** This is the equivalent of XC_left_ptr. I’m not sure why xcb doesn’t have a diff --git a/include/all.h b/include/all.h index b323f863..c26835b9 100644 --- a/include/all.h +++ b/include/all.h @@ -10,8 +10,9 @@ * compile-time. * */ -#ifndef I3_ALL_H -#define I3_ALL_H +#pragma once + +#include #include #include @@ -81,5 +82,3 @@ #include "display_version.h" #include "restore_layout.h" #include "main.h" - -#endif diff --git a/include/assignments.h b/include/assignments.h index 22ebafc3..a4dc766b 100644 --- a/include/assignments.h +++ b/include/assignments.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * Checks the list of assignments for the given window and runs all matching * ones (unless they have already been run for this specific window). diff --git a/include/bindings.h b/include/bindings.h index d15598ea..0fcc4df4 100644 --- a/include/bindings.h +++ b/include/bindings.h @@ -9,6 +9,8 @@ */ #pragma once +#include + extern pid_t command_error_nagbar_pid; /** diff --git a/include/click.h b/include/click.h index 7ce80d97..0d57abf7 100644 --- a/include/click.h +++ b/include/click.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * The button press X callback. This function determines whether the floating * modifier is pressed and where the user clicked (decoration, border, inside diff --git a/include/cmdparse.h b/include/cmdparse.h index 2ffa49b0..a2cbb17e 100644 --- a/include/cmdparse.h +++ b/include/cmdparse.h @@ -9,4 +9,6 @@ */ #pragma once +#include + char *parse_cmd(const char *new); diff --git a/include/commands.h b/include/commands.h index 9f83cb21..a57b2925 100644 --- a/include/commands.h +++ b/include/commands.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include "commands_parser.h" /** The beginning of the prototype for every cmd_ function. */ diff --git a/include/commands_parser.h b/include/commands_parser.h index 1acb7fae..88b3f6d0 100644 --- a/include/commands_parser.h +++ b/include/commands_parser.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include /* diff --git a/include/con.h b/include/con.h index 73ae0f38..0c532207 100644 --- a/include/con.h +++ b/include/con.h @@ -11,6 +11,8 @@ */ #pragma once +#include + /** * Create a new container (and attach it to the given parent, if not NULL). * This function only initializes the data structures. diff --git a/include/config_directives.h b/include/config_directives.h index bcbea111..7f1bfe4a 100644 --- a/include/config_directives.h +++ b/include/config_directives.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include "config_parser.h" /** diff --git a/include/config_parser.h b/include/config_parser.h index 2ba79a68..ace4041d 100644 --- a/include/config_parser.h +++ b/include/config_parser.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include SLIST_HEAD(variables_head, Variable); diff --git a/include/configuration.h b/include/configuration.h index ced104b6..b7cdc804 100644 --- a/include/configuration.h +++ b/include/configuration.h @@ -12,10 +12,11 @@ */ #pragma once +#include "libi3.h" + #include #include "queue.h" #include "i3.h" -#include "libi3.h" typedef struct Config Config; typedef struct Barconfig Barconfig; diff --git a/include/data.h b/include/data.h index 70edd222..a729b21e 100644 --- a/include/data.h +++ b/include/data.h @@ -9,6 +9,8 @@ */ #pragma once +#include "libi3.h" + #define SN_API_NOT_YET_FROZEN 1 #include @@ -17,7 +19,6 @@ #include #include -#include "libi3.h" #include "queue.h" /* diff --git a/include/debug.h b/include/debug.h index 3875ec6b..ab5f3808 100644 --- a/include/debug.h +++ b/include/debug.h @@ -10,4 +10,6 @@ */ #pragma once +#include + int handle_event(void *ignored, xcb_connection_t *c, xcb_generic_event_t *e); diff --git a/include/display_version.h b/include/display_version.h index b1a5a0e0..d8dac30b 100644 --- a/include/display_version.h +++ b/include/display_version.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * Connects to i3 to find out the currently running version. Useful since it * might be different from the version compiled into this binary (maybe the diff --git a/include/ewmh.h b/include/ewmh.h index 2a55ab9f..545e3a6b 100644 --- a/include/ewmh.h +++ b/include/ewmh.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * Updates _NET_CURRENT_DESKTOP with the current desktop number. * diff --git a/include/fake_outputs.h b/include/fake_outputs.h index 32b07fa9..27a0d41a 100644 --- a/include/fake_outputs.h +++ b/include/fake_outputs.h @@ -10,6 +10,8 @@ */ #pragma once +#include + /** * Creates outputs according to the given specification. * The specification must be in the format wxh+x+y, for example 1024x768+0+0, diff --git a/include/floating.h b/include/floating.h index e187b98f..babfafc9 100644 --- a/include/floating.h +++ b/include/floating.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include "tree.h" /** Callback for dragging */ diff --git a/include/handlers.h b/include/handlers.h index d80a24f8..1d5a3865 100644 --- a/include/handlers.h +++ b/include/handlers.h @@ -10,6 +10,8 @@ */ #pragma once +#include + #include extern int randr_base; diff --git a/include/i3.h b/include/i3.h index 254c4d23..4d13d448 100644 --- a/include/i3.h +++ b/include/i3.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include #include diff --git a/include/ipc.h b/include/ipc.h index a9323751..5c528a6d 100644 --- a/include/ipc.h +++ b/include/ipc.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include #include #include diff --git a/include/key_press.h b/include/key_press.h index bbfec83b..8f23854b 100644 --- a/include/key_press.h +++ b/include/key_press.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * There was a key press. We compare this key code with our bindings table and pass * the bound action to parse_command(). diff --git a/include/libi3.h b/include/libi3.h index 0d9189f3..11ca3127 100644 --- a/include/libi3.h +++ b/include/libi3.h @@ -10,6 +10,8 @@ */ #pragma once +#include + #include #include #include diff --git a/include/load_layout.h b/include/load_layout.h index f8b7da20..0dd81318 100644 --- a/include/load_layout.h +++ b/include/load_layout.h @@ -10,6 +10,8 @@ */ #pragma once +#include + typedef enum { // We could not determine the content of the JSON file. This typically // means it’s unreadable or contains garbage. diff --git a/include/log.h b/include/log.h index b683529c..5c530231 100644 --- a/include/log.h +++ b/include/log.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include #include diff --git a/include/main.h b/include/main.h index 1ce53954..1f213cce 100644 --- a/include/main.h +++ b/include/main.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * Enable or disable the main X11 event handling function. * This is used by drag_pointer() which has its own, modal event handler, which diff --git a/include/manage.h b/include/manage.h index 520f0c06..55b0a85b 100644 --- a/include/manage.h +++ b/include/manage.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include "data.h" /** diff --git a/include/match.h b/include/match.h index 64a4f22b..4ff8c485 100644 --- a/include/match.h +++ b/include/match.h @@ -13,6 +13,8 @@ */ #pragma once +#include + /* * Initializes the Match data structure. This function is necessary because the * members representing boolean values (like dock) need to be initialized with diff --git a/include/move.h b/include/move.h index 7debcf28..64b12b80 100644 --- a/include/move.h +++ b/include/move.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * Moves the given container in the given direction (TOK_LEFT, TOK_RIGHT, * TOK_UP, TOK_DOWN from cmdparse.l) diff --git a/include/output.h b/include/output.h index 03a4fbcf..b13c9728 100644 --- a/include/output.h +++ b/include/output.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * Returns the output container below the given output container. * diff --git a/include/randr.h b/include/randr.h index 30dd955d..55068316 100644 --- a/include/randr.h +++ b/include/randr.h @@ -11,6 +11,8 @@ */ #pragma once +#include + #include "data.h" #include diff --git a/include/regex.h b/include/regex.h index 2e2f22fd..abda3cd7 100644 --- a/include/regex.h +++ b/include/regex.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * Creates a new 'regex' struct containing the given pattern and a PCRE * compiled regular expression. Also, calls pcre_study because this regex will diff --git a/include/render.h b/include/render.h index d32f0310..750b7d31 100644 --- a/include/render.h +++ b/include/render.h @@ -10,6 +10,8 @@ */ #pragma once +#include + /* This is used to keep a state to pass around when rendering a con in render_con(). */ typedef struct render_params { /* A copy of the coordinates of the container which is being rendered. */ diff --git a/include/resize.h b/include/resize.h index 945678d9..7b33de90 100644 --- a/include/resize.h +++ b/include/resize.h @@ -9,6 +9,8 @@ */ #pragma once +#include + bool resize_find_tiling_participants(Con **current, Con **other, direction_t direction); int resize_graphical_handler(Con *first, Con *second, orientation_t orientation, const xcb_button_press_event_t *event); diff --git a/include/restore_layout.h b/include/restore_layout.h index f952834c..98b257d9 100644 --- a/include/restore_layout.h +++ b/include/restore_layout.h @@ -10,6 +10,8 @@ */ #pragma once +#include + /** * Opens a separate connection to X11 for placeholder windows when restoring * layouts. This is done as a safety measure (users can xkill a placeholder diff --git a/include/scratchpad.h b/include/scratchpad.h index b385550c..241653c0 100644 --- a/include/scratchpad.h +++ b/include/scratchpad.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * Moves the specified window to the __i3_scratch workspace, making it floating * and setting the appropriate scratchpad_state. diff --git a/include/shmlog.h b/include/shmlog.h index 0216c8d6..b90211ef 100644 --- a/include/shmlog.h +++ b/include/shmlog.h @@ -10,6 +10,8 @@ */ #pragma once +#include + #include #if !defined(__OpenBSD__) #include diff --git a/include/sighandler.h b/include/sighandler.h index 56680bc4..20ede4eb 100644 --- a/include/sighandler.h +++ b/include/sighandler.h @@ -11,6 +11,8 @@ */ #pragma once +#include + /** * Setup signal handlers to safely handle SIGSEGV and SIGFPE * diff --git a/include/startup.h b/include/startup.h index 9729cdc2..5da221e1 100644 --- a/include/startup.h +++ b/include/startup.h @@ -12,6 +12,8 @@ */ #pragma once +#include + #define SN_API_NOT_YET_FROZEN 1 #include diff --git a/include/tree.h b/include/tree.h index c64c173d..62461def 100644 --- a/include/tree.h +++ b/include/tree.h @@ -9,6 +9,8 @@ */ #pragma once +#include + extern Con *croot; /* TODO: i am not sure yet how much access to the focused container should * be permitted to source files */ diff --git a/include/util.h b/include/util.h index 9915c1a8..e5ba3341 100644 --- a/include/util.h +++ b/include/util.h @@ -10,6 +10,8 @@ */ #pragma once +#include + #include #include "data.h" diff --git a/include/window.h b/include/window.h index d0b97f1d..77e3f48f 100644 --- a/include/window.h +++ b/include/window.h @@ -9,6 +9,8 @@ */ #pragma once +#include + /** * Frees an i3Window and all its members. * diff --git a/include/workspace.h b/include/workspace.h index 8e5ff841..8d109e9e 100644 --- a/include/workspace.h +++ b/include/workspace.h @@ -10,6 +10,8 @@ */ #pragma once +#include + #include "data.h" #include "tree.h" #include "randr.h" diff --git a/include/x.h b/include/x.h index 39e0eb2f..3e81bc36 100644 --- a/include/x.h +++ b/include/x.h @@ -10,6 +10,8 @@ */ #pragma once +#include + /** Stores the X11 window ID of the currently focused window */ extern xcb_window_t focused_id; diff --git a/include/xcb.h b/include/xcb.h index b7eed2cb..94f2945d 100644 --- a/include/xcb.h +++ b/include/xcb.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include "data.h" #include "xcursor.h" diff --git a/include/xcursor.h b/include/xcursor.h index e0ee9813..804e1f84 100644 --- a/include/xcursor.h +++ b/include/xcursor.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include enum xcursor_cursor_t { diff --git a/include/xinerama.h b/include/xinerama.h index 936b9653..f01ee568 100644 --- a/include/xinerama.h +++ b/include/xinerama.h @@ -11,6 +11,8 @@ */ #pragma once +#include + #include "data.h" /** diff --git a/include/yajl_utils.h b/include/yajl_utils.h index 93c63d8f..6ab1ff1c 100644 --- a/include/yajl_utils.h +++ b/include/yajl_utils.h @@ -9,6 +9,8 @@ */ #pragma once +#include + #include #include #include diff --git a/libi3/dpi.c b/libi3/dpi.c index f105ef9a..a832a689 100644 --- a/libi3/dpi.c +++ b/libi3/dpi.c @@ -6,6 +6,7 @@ * */ #include "libi3.h" + #include #include #include diff --git a/libi3/draw_util.c b/libi3/draw_util.c index 56b1bce8..e471405b 100644 --- a/libi3/draw_util.c +++ b/libi3/draw_util.c @@ -6,6 +6,8 @@ * draw.c: Utility for drawing. * */ +#include "libi3.h" + #include #include #include @@ -13,8 +15,6 @@ #include #include -#include "libi3.h" - /* The default visual_type to use if none is specified when creating the surface. Must be defined globally. */ xcb_visualtype_t *visual_type; diff --git a/libi3/fake_configure_notify.c b/libi3/fake_configure_notify.c index 2c4d4559..145f4512 100644 --- a/libi3/fake_configure_notify.c +++ b/libi3/fake_configure_notify.c @@ -5,14 +5,14 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include #include -#include "libi3.h" - /* * Generates a configure_notify event and sends it to the given window * Applications need this to think they’ve configured themselves correctly. diff --git a/libi3/font.c b/libi3/font.c index 7c305e25..fa848481 100644 --- a/libi3/font.c +++ b/libi3/font.c @@ -5,6 +5,8 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include @@ -15,8 +17,6 @@ #include #include -#include "libi3.h" - static const i3Font *savedFont = NULL; static xcb_visualtype_t *root_visual_type; diff --git a/libi3/format_placeholders.c b/libi3/format_placeholders.c index c9cbbea4..59e94781 100644 --- a/libi3/format_placeholders.c +++ b/libi3/format_placeholders.c @@ -5,12 +5,12 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include -#include "libi3.h" - #ifndef STARTS_WITH #define STARTS_WITH(string, needle) (strncasecmp((string), (needle), strlen((needle))) == 0) #endif diff --git a/libi3/get_colorpixel.c b/libi3/get_colorpixel.c index dc6d7748..9bdd0a71 100644 --- a/libi3/get_colorpixel.c +++ b/libi3/get_colorpixel.c @@ -5,13 +5,13 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include #include "queue.h" -#include "libi3.h" - struct Colorpixel { char hex[8]; uint32_t pixel; diff --git a/libi3/get_config_path.c b/libi3/get_config_path.c index bad75c4d..c47e6dd8 100644 --- a/libi3/get_config_path.c +++ b/libi3/get_config_path.c @@ -6,6 +6,7 @@ * */ #include "libi3.h" + #include #include #include diff --git a/libi3/get_exe_path.c b/libi3/get_exe_path.c index ef8f23bc..b9d35ea1 100644 --- a/libi3/get_exe_path.c +++ b/libi3/get_exe_path.c @@ -1,3 +1,12 @@ +/* + * vim:ts=4:sw=4:expandtab + * + * i3 - an improved dynamic tiling window manager + * © 2009 Michael Stapelberg and contributors (see also: LICENSE) + * + */ +#include "libi3.h" + #include #include #include @@ -5,8 +14,6 @@ #include #include -#include "libi3.h" - /* * This function returns the absolute path to the executable it is running in. * diff --git a/libi3/get_mod_mask.c b/libi3/get_mod_mask.c index ac71e6b2..98031d4c 100644 --- a/libi3/get_mod_mask.c +++ b/libi3/get_mod_mask.c @@ -5,13 +5,13 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include #include -#include "libi3.h" - /* * All-in-one function which returns the modifier mask (XCB_MOD_MASK_*) for the * given keysymbol, for example for XCB_NUM_LOCK (usually configured to mod2). diff --git a/libi3/get_process_filename.c b/libi3/get_process_filename.c index a3dee9cd..7e2ecbd2 100644 --- a/libi3/get_process_filename.c +++ b/libi3/get_process_filename.c @@ -5,6 +5,8 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include @@ -17,8 +19,6 @@ #include #include -#include "libi3.h" - /* * Returns the name of a temporary file with the specified prefix. * diff --git a/libi3/ipc_connect.c b/libi3/ipc_connect.c index f493b4f1..2e628342 100644 --- a/libi3/ipc_connect.c +++ b/libi3/ipc_connect.c @@ -5,6 +5,8 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include @@ -14,8 +16,6 @@ #include #include -#include "libi3.h" - /* * Connects to the i3 IPC socket and returns the file descriptor for the * socket. die()s if anything goes wrong. diff --git a/libi3/ipc_recv_message.c b/libi3/ipc_recv_message.c index 0ef4fced..16dda90d 100644 --- a/libi3/ipc_recv_message.c +++ b/libi3/ipc_recv_message.c @@ -5,6 +5,8 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include @@ -14,8 +16,6 @@ #include -#include "libi3.h" - /* * Reads a message from the given socket file descriptor and stores its length * (reply_length) as well as a pointer to its contents (reply). diff --git a/libi3/ipc_send_message.c b/libi3/ipc_send_message.c index a9ba3165..c2cc0127 100644 --- a/libi3/ipc_send_message.c +++ b/libi3/ipc_send_message.c @@ -5,6 +5,8 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include @@ -14,8 +16,6 @@ #include -#include "libi3.h" - /* * Formats a message (payload) of the given size and type and sends it to i3 via * the given socket file descriptor. diff --git a/libi3/is_debug_build.c b/libi3/is_debug_build.c index 3173c122..4e583622 100644 --- a/libi3/is_debug_build.c +++ b/libi3/is_debug_build.c @@ -1,3 +1,12 @@ +/* + * vim:ts=4:sw=4:expandtab + * + * i3 - an improved dynamic tiling window manager + * © 2009 Michael Stapelberg and contributors (see also: LICENSE) + * + */ +#include "libi3.h" + #include #include diff --git a/libi3/mkdirp.c b/libi3/mkdirp.c index c64b80a3..1fc8c346 100644 --- a/libi3/mkdirp.c +++ b/libi3/mkdirp.c @@ -1,4 +1,12 @@ +/* + * vim:ts=4:sw=4:expandtab + * + * i3 - an improved dynamic tiling window manager + * © 2009 Michael Stapelberg and contributors (see also: LICENSE) + * + */ #include "libi3.h" + #include #include #include diff --git a/libi3/resolve_tilde.c b/libi3/resolve_tilde.c index 7a4fb79b..51d642db 100644 --- a/libi3/resolve_tilde.c +++ b/libi3/resolve_tilde.c @@ -5,8 +5,8 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ - #include "libi3.h" + #include #include #include diff --git a/libi3/root_atom_contents.c b/libi3/root_atom_contents.c index 8d26c307..d6394d4b 100644 --- a/libi3/root_atom_contents.c +++ b/libi3/root_atom_contents.c @@ -5,6 +5,8 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include @@ -15,8 +17,6 @@ #include #include -#include "libi3.h" - /* * Try to get the contents of the given atom (for example I3_SOCKET_PATH) from * the X11 root window and return NULL if it doesn’t work. diff --git a/libi3/safewrappers.c b/libi3/safewrappers.c index 0a233a12..94ad4ee6 100644 --- a/libi3/safewrappers.c +++ b/libi3/safewrappers.c @@ -5,6 +5,8 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include @@ -13,8 +15,6 @@ #include #include -#include "libi3.h" - /* * The s* functions (safe) are wrappers around malloc, strdup, …, which exits if one of * the called functions returns NULL, meaning that there is no more memory available diff --git a/libi3/string.c b/libi3/string.c index 19039a23..edd588da 100644 --- a/libi3/string.c +++ b/libi3/string.c @@ -9,14 +9,13 @@ * others want UTF-8 (Pango). * */ +#include "libi3.h" #include #include #include -#include "libi3.h" - struct _i3String { char *utf8; xcb_char2b_t *ucs2; diff --git a/libi3/strndup.c b/libi3/strndup.c index c4032dc5..e17f843c 100644 --- a/libi3/strndup.c +++ b/libi3/strndup.c @@ -5,11 +5,11 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include -#include "libi3.h" - #if defined(__APPLE__) /* diff --git a/libi3/ucs2_conversion.c b/libi3/ucs2_conversion.c index b583e32c..75cff78a 100644 --- a/libi3/ucs2_conversion.c +++ b/libi3/ucs2_conversion.c @@ -5,14 +5,14 @@ * © 2009 Michael Stapelberg and contributors (see also: LICENSE) * */ +#include "libi3.h" + #include #include #include #include #include -#include "libi3.h" - static iconv_t utf8_conversion_descriptor = (iconv_t)-1; static iconv_t ucs2_conversion_descriptor = (iconv_t)-1; diff --git a/src/assignments.c b/src/assignments.c index 6c563357..a0f5d5a7 100644 --- a/src/assignments.c +++ b/src/assignments.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "assignments.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/click.c b/src/click.c index 788c10f2..913741b4 100644 --- a/src/click.c +++ b/src/click.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "click.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/commands.c b/src/commands.c index 58641d6a..b91c71a4 100644 --- a/src/commands.c +++ b/src/commands.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "commands.c" /* * vim:ts=4:sw=4:expandtab * @@ -9,6 +7,8 @@ * commands.c: all command functions (see commands_parser.c) * */ +#include "all.h" + #include #include #include @@ -17,7 +17,6 @@ #include #endif -#include "all.h" #include "shmlog.h" // Macros to make the YAJL API a bit easier to use. diff --git a/src/commands_parser.c b/src/commands_parser.c index cdd35e45..98f06659 100644 --- a/src/commands_parser.c +++ b/src/commands_parser.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "commands_parser.c" /* * vim:ts=4:sw=4:expandtab * @@ -25,6 +23,8 @@ * instead of actually calling any function). * */ +#include "all.h" + #include #include #include @@ -32,8 +32,6 @@ #include #include -#include "all.h" - // Macros to make the YAJL API a bit easier to use. #define y(x, ...) (command_output.json_gen != NULL ? yajl_gen_##x(command_output.json_gen, ##__VA_ARGS__) : 0) #define ystr(str) (command_output.json_gen != NULL ? yajl_gen_string(command_output.json_gen, (unsigned char *)str, strlen(str)) : 0) diff --git a/src/con.c b/src/con.c index 124d24ea..3c7c2186 100644 --- a/src/con.c +++ b/src/con.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "con.c" /* * vim:ts=4:sw=4:expandtab * @@ -12,6 +10,7 @@ * */ #include "all.h" + #include "yajl_utils.h" static void con_on_remove_child(Con *con); diff --git a/src/config.c b/src/config.c index c2824ca2..d4441d5d 100644 --- a/src/config.c +++ b/src/config.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "config.c" /* * vim:ts=4:sw=4:expandtab * @@ -11,6 +9,7 @@ * */ #include "all.h" + #include char *current_configpath = NULL; diff --git a/src/config_directives.c b/src/config_directives.c index 05c19c70..6b5464f1 100644 --- a/src/config_directives.c +++ b/src/config_directives.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "config_directives.c" /* * vim:ts=4:sw=4:expandtab * @@ -9,11 +7,11 @@ * config_directives.c: all config storing functions (see config_parser.c) * */ +#include "all.h" + #include #include -#include "all.h" - /******************************************************************************* * Criteria functions. ******************************************************************************/ diff --git a/src/config_parser.c b/src/config_parser.c index 2a884730..a8265869 100644 --- a/src/config_parser.c +++ b/src/config_parser.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "config_parser.c" /* * vim:ts=4:sw=4:expandtab * @@ -25,6 +23,8 @@ * nearest token. * */ +#include "all.h" + #include #include #include @@ -37,8 +37,6 @@ #include #include -#include "all.h" - // Macros to make the YAJL API a bit easier to use. #define y(x, ...) yajl_gen_##x(command_output.json_gen, ##__VA_ARGS__) #define ystr(str) yajl_gen_string(command_output.json_gen, (unsigned char *)str, strlen(str)) diff --git a/src/debug.c b/src/debug.c index bb880b2f..ea4ca997 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "debug.c" /* * vim:ts=4:sw=4:expandtab * @@ -10,6 +8,8 @@ * events. This code is from xcb-util. * */ +#include + #include #include diff --git a/src/display_version.c b/src/display_version.c index c82610ed..0e650e81 100644 --- a/src/display_version.c +++ b/src/display_version.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "key_press.c" /* * vim:ts=4:sw=4:expandtab * @@ -10,6 +8,8 @@ * i3 --moreversion. * */ +#include "all.h" + #include #include #include @@ -17,7 +17,6 @@ #include #include #include -#include "all.h" static bool human_readable_key, loaded_config_file_name_key; static char *human_readable_version, *loaded_config_file_name; diff --git a/src/ewmh.c b/src/ewmh.c index 5459c7e9..f4bb049a 100644 --- a/src/ewmh.c +++ b/src/ewmh.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "ewmh.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/fake_outputs.c b/src/fake_outputs.c index 3df0e246..b898ce98 100644 --- a/src/fake_outputs.c +++ b/src/fake_outputs.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "fake_outputs.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/floating.c b/src/floating.c index e9c7a801..616602c0 100644 --- a/src/floating.c +++ b/src/floating.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "floating.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/handlers.c b/src/handlers.c index bd391176..7dfacef7 100644 --- a/src/handlers.c +++ b/src/handlers.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "handlers.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/ipc.c b/src/ipc.c index bf529b17..73f8d8cb 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "ipc.c" /* * vim:ts=4:sw=4:expandtab * @@ -10,6 +8,7 @@ * */ #include "all.h" + #include "yajl_utils.h" #include diff --git a/src/key_press.c b/src/key_press.c index 6760e35b..d16174f8 100644 --- a/src/key_press.c +++ b/src/key_press.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "key_press.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/load_layout.c b/src/load_layout.c index a3b44756..7004a859 100644 --- a/src/load_layout.c +++ b/src/load_layout.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "load_layout.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/log.c b/src/log.c index e9a1160d..1c33649a 100644 --- a/src/log.c +++ b/src/log.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "log.c" /* * vim:ts=4:sw=4:expandtab * @@ -9,6 +7,8 @@ * log.c: Logging functions. * */ +#include + #include #include #include diff --git a/src/main.c b/src/main.c index f94a8941..4d9fd5a5 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "main.c" /* * vim:ts=4:sw=4:expandtab * @@ -9,6 +7,8 @@ * main.c: Initialization, main loop * */ +#include "all.h" + #include #include #include @@ -19,7 +19,6 @@ #include #include #include -#include "all.h" #include "shmlog.h" #include "sd-daemon.h" diff --git a/src/manage.c b/src/manage.c index fd9226e4..81ee16fd 100644 --- a/src/manage.c +++ b/src/manage.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "manage.c" /* * vim:ts=4:sw=4:expandtab * @@ -10,6 +8,7 @@ * */ #include "all.h" + #include "yajl_utils.h" #include diff --git a/src/match.c b/src/match.c index ac9ddaf9..4d87c560 100644 --- a/src/match.c +++ b/src/match.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "match.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/move.c b/src/move.c index 25c658ce..70c8c788 100644 --- a/src/move.c +++ b/src/move.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "move.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/output.c b/src/output.c index 1a9f6129..0f2bd617 100644 --- a/src/output.c +++ b/src/output.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "output.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/randr.c b/src/randr.c index 512e0d28..51255619 100644 --- a/src/randr.c +++ b/src/randr.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "randr.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/regex.c b/src/regex.c index 12c0b67f..296b91dd 100644 --- a/src/regex.c +++ b/src/regex.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "regex.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/render.c b/src/render.c index 7ee501f0..85548f26 100644 --- a/src/render.c +++ b/src/render.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "render.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/resize.c b/src/resize.c index 5d9eb2eb..f07fcec6 100644 --- a/src/resize.c +++ b/src/resize.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "resize.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/restore_layout.c b/src/restore_layout.c index da018b9e..131196e9 100644 --- a/src/restore_layout.c +++ b/src/restore_layout.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "restore_layout.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/scratchpad.c b/src/scratchpad.c index 6d83a558..9018ad3f 100644 --- a/src/scratchpad.c +++ b/src/scratchpad.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "scratchpad.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/sighandler.c b/src/sighandler.c index 400cd5a5..79f90d9a 100644 --- a/src/sighandler.c +++ b/src/sighandler.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "sighandler.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/startup.c b/src/startup.c index 2a6bc002..166842e0 100644 --- a/src/startup.c +++ b/src/startup.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "startup.c" /* * vim:ts=4:sw=4:expandtab * @@ -13,6 +11,7 @@ * */ #include "all.h" + #include "sd-daemon.h" #include diff --git a/src/tree.c b/src/tree.c index e848a6ac..6e128363 100644 --- a/src/tree.c +++ b/src/tree.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "tree.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/util.c b/src/util.c index 15796d88..cfe4c953 100644 --- a/src/util.c +++ b/src/util.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "util.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/version.c b/src/version.c index 6e385ada..1244711a 100644 --- a/src/version.c +++ b/src/version.c @@ -8,4 +8,6 @@ * and used dynamically without recompiling every object file. * */ +#include + const char *i3_version = I3_VERSION; diff --git a/src/window.c b/src/window.c index d10811f5..db6215d0 100644 --- a/src/window.c +++ b/src/window.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "window.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/workspace.c b/src/workspace.c index 0da0a378..d7f2ce7c 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "workspace.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/x.c b/src/x.c index 9a387749..8d7d3dd8 100644 --- a/src/x.c +++ b/src/x.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "x.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/xcb.c b/src/xcb.c index 630c68f9..900840a2 100644 --- a/src/xcb.c +++ b/src/xcb.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "xcb.c" /* * vim:ts=4:sw=4:expandtab * diff --git a/src/xcursor.c b/src/xcursor.c index 1e1e23b0..cbfe808b 100644 --- a/src/xcursor.c +++ b/src/xcursor.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "xcursor.c" /* * vim:ts=4:sw=4:expandtab * @@ -9,6 +7,8 @@ * xcursor.c: xcursor support for themed cursors. * */ +#include + #include #include diff --git a/src/xinerama.c b/src/xinerama.c index ddf98375..25bfa6b1 100644 --- a/src/xinerama.c +++ b/src/xinerama.c @@ -1,5 +1,3 @@ -#undef I3__FILE__ -#define I3__FILE__ "xinerama.c" /* * vim:ts=4:sw=4:expandtab * -- 2.39.2