From d638e3029afb0f48360f928332f61a8fafa3032c Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Fri, 21 Sep 2012 15:36:25 +0200 Subject: [PATCH] =?utf8?q?don=E2=80=99t=20use=20reversed=20identifiers=20f?= =?utf8?q?or=20include=20guards=20(Thanks=20Markus)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Done with: sed -in 's/\(ifndef\|define\) _\([0-9A-Z_]*\)$/\1 I3_\2/' include/**/*.h fixes #804 --- include/all.h | 4 ++-- include/assignments.h | 4 ++-- include/click.h | 4 ++-- include/cmdparse.h | 4 ++-- include/commands.h | 4 ++-- include/commands_parser.h | 4 ++-- include/con.h | 4 ++-- include/config.h | 4 ++-- include/data.h | 4 ++-- include/debug.h | 4 ++-- include/display_version.h | 4 ++-- include/ewmh.h | 4 ++-- include/fake_outputs.h | 4 ++-- include/floating.h | 4 ++-- include/handlers.h | 4 ++-- include/i3.h | 4 ++-- include/i3/ipc.h | 4 ++-- include/ipc.h | 4 ++-- include/key_press.h | 4 ++-- include/libi3.h | 4 ++-- include/load_layout.h | 4 ++-- include/log.h | 4 ++-- include/manage.h | 4 ++-- include/match.h | 4 ++-- include/move.h | 4 ++-- include/output.h | 4 ++-- include/randr.h | 4 ++-- include/regex.h | 4 ++-- include/render.h | 4 ++-- include/resize.h | 4 ++-- include/scratchpad.h | 4 ++-- include/shmlog.h | 4 ++-- include/sighandler.h | 4 ++-- include/startup.h | 4 ++-- include/tree.h | 4 ++-- include/util.h | 4 ++-- include/window.h | 4 ++-- include/workspace.h | 4 ++-- include/x.h | 4 ++-- include/xcb.h | 4 ++-- include/xcb_compat.h | 4 ++-- include/xcursor.h | 4 ++-- include/xinerama.h | 4 ++-- 43 files changed, 86 insertions(+), 86 deletions(-) diff --git a/include/all.h b/include/all.h index b83b9f4e..48ca6621 100644 --- a/include/all.h +++ b/include/all.h @@ -10,8 +10,8 @@ * compile-time. * */ -#ifndef _ALL_H -#define _ALL_H +#ifndef I3_ALL_H +#define I3_ALL_H #include #include diff --git a/include/assignments.h b/include/assignments.h index f4ef8e88..570375cf 100644 --- a/include/assignments.h +++ b/include/assignments.h @@ -7,8 +7,8 @@ * assignments.c: Assignments for specific windows (for_window). * */ -#ifndef _ASSIGNMENTS_H -#define _ASSIGNMENTS_H +#ifndef I3_ASSIGNMENTS_H +#define I3_ASSIGNMENTS_H /** * Checks the list of assignments for the given window and runs all matching diff --git a/include/click.h b/include/click.h index 6261613b..3c4d5288 100644 --- a/include/click.h +++ b/include/click.h @@ -7,8 +7,8 @@ * click.c: Button press (mouse click) events. * */ -#ifndef _CLICK_H -#define _CLICK_H +#ifndef I3_CLICK_H +#define I3_CLICK_H /** * The button press X callback. This function determines whether the floating diff --git a/include/cmdparse.h b/include/cmdparse.h index d619b97c..4a87c39c 100644 --- a/include/cmdparse.h +++ b/include/cmdparse.h @@ -7,8 +7,8 @@ * cmdparse.y: the parser for commands you send to i3 (or bind on keys) * */ -#ifndef _CMDPARSE_H -#define _CMDPARSE_H +#ifndef I3_CMDPARSE_H +#define I3_CMDPARSE_H char *parse_cmd(const char *new); diff --git a/include/commands.h b/include/commands.h index 37ee98d9..c971bb48 100644 --- a/include/commands.h +++ b/include/commands.h @@ -7,8 +7,8 @@ * commands.c: all command functions (see commands_parser.c) * */ -#ifndef _COMMANDS_H -#define _COMMANDS_H +#ifndef I3_COMMANDS_H +#define I3_COMMANDS_H #include "commands_parser.h" diff --git a/include/commands_parser.h b/include/commands_parser.h index 795cb026..6ff8d54e 100644 --- a/include/commands_parser.h +++ b/include/commands_parser.h @@ -7,8 +7,8 @@ * commands.c: all command functions (see commands_parser.c) * */ -#ifndef _COMMANDS_PARSER_H -#define _COMMANDS_PARSER_H +#ifndef I3_COMMANDS_PARSER_H +#define I3_COMMANDS_PARSER_H #include diff --git a/include/con.h b/include/con.h index 20e83df9..f741dee0 100644 --- a/include/con.h +++ b/include/con.h @@ -9,8 +9,8 @@ * …). * */ -#ifndef _CON_H -#define _CON_H +#ifndef I3_CON_H +#define I3_CON_H /** * Create a new container (and attach it to the given parent, if not NULL). diff --git a/include/config.h b/include/config.h index 1a48016a..669cfe44 100644 --- a/include/config.h +++ b/include/config.h @@ -10,8 +10,8 @@ * mode). * */ -#ifndef _CONFIG_H -#define _CONFIG_H +#ifndef I3_CONFIG_H +#define I3_CONFIG_H #include #include "queue.h" diff --git a/include/data.h b/include/data.h index 02f781c9..a2c6859e 100644 --- a/include/data.h +++ b/include/data.h @@ -7,8 +7,8 @@ * include/data.h: This file defines all data structures used by i3 * */ -#ifndef _DATA_H -#define _DATA_H +#ifndef I3_DATA_H +#define I3_DATA_H #define SN_API_NOT_YET_FROZEN 1 #include diff --git a/include/debug.h b/include/debug.h index abf9c76d..44c95c6d 100644 --- a/include/debug.h +++ b/include/debug.h @@ -8,8 +8,8 @@ * events. This code is from xcb-util. * */ -#ifndef _DEBUG_H -#define _DEBUG_H +#ifndef I3_DEBUG_H +#define I3_DEBUG_H 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 97b3902c..88a1abc1 100644 --- a/include/display_version.h +++ b/include/display_version.h @@ -7,8 +7,8 @@ * display_version.c: displays the running i3 version, runs as part of * i3 --moreversion. */ -#ifndef _DISPLAY_VERSION_H -#define _DISPLAY_VERSION_H +#ifndef I3_DISPLAY_VERSION_H +#define I3_DISPLAY_VERSION_H /** * Connects to i3 to find out the currently running version. Useful since it diff --git a/include/ewmh.h b/include/ewmh.h index a786069a..07ef6614 100644 --- a/include/ewmh.h +++ b/include/ewmh.h @@ -7,8 +7,8 @@ * ewmh.c: Get/set certain EWMH properties easily. * */ -#ifndef _EWMH_C -#define _EWMH_C +#ifndef I3_EWMH_C +#define I3_EWMH_C /** * Updates _NET_CURRENT_DESKTOP with the current desktop number. diff --git a/include/fake_outputs.h b/include/fake_outputs.h index adb10a0d..bfeba292 100644 --- a/include/fake_outputs.h +++ b/include/fake_outputs.h @@ -8,8 +8,8 @@ * which don’t support multi-monitor in a useful way) and for our testsuite. * */ -#ifndef _FAKE_OUTPUTS_H -#define _FAKE_OUTPUTS_H +#ifndef I3_FAKE_OUTPUTS_H +#define I3_FAKE_OUTPUTS_H /** * Creates outputs according to the given specification. diff --git a/include/floating.h b/include/floating.h index 43137c9c..a2f501c5 100644 --- a/include/floating.h +++ b/include/floating.h @@ -7,8 +7,8 @@ * floating.c: Floating windows. * */ -#ifndef _FLOATING_H -#define _FLOATING_H +#ifndef I3_FLOATING_H +#define I3_FLOATING_H #include "tree.h" diff --git a/include/handlers.h b/include/handlers.h index bcebf9ff..b2e7ce2e 100644 --- a/include/handlers.h +++ b/include/handlers.h @@ -8,8 +8,8 @@ * …). * */ -#ifndef _HANDLERS_H -#define _HANDLERS_H +#ifndef I3_HANDLERS_H +#define I3_HANDLERS_H #include diff --git a/include/i3.h b/include/i3.h index bd40f16b..1bc8b55d 100644 --- a/include/i3.h +++ b/include/i3.h @@ -7,8 +7,8 @@ * i3.h: global variables that are used all over i3. * */ -#ifndef _I3_H -#define _I3_H +#ifndef I3_I3_H +#define I3_I3_H #include #include diff --git a/include/i3/ipc.h b/include/i3/ipc.h index 0906b7f9..86fa1b4b 100644 --- a/include/i3/ipc.h +++ b/include/i3/ipc.h @@ -8,8 +8,8 @@ * for the IPC interface to i3 (see docs/ipc for more information). * */ -#ifndef _I3_IPC_H -#define _I3_IPC_H +#ifndef I3_I3_IPC_H +#define I3_I3_IPC_H /* * Messages from clients to i3 diff --git a/include/ipc.h b/include/ipc.h index af80fa4b..ef50ba86 100644 --- a/include/ipc.h +++ b/include/ipc.h @@ -7,8 +7,8 @@ * ipc.c: UNIX domain socket IPC (initialization, client handling, protocol). * */ -#ifndef _IPC_H -#define _IPC_H +#ifndef I3_IPC_H +#define I3_IPC_H #include #include diff --git a/include/key_press.h b/include/key_press.h index 4d469bab..417843a1 100644 --- a/include/key_press.h +++ b/include/key_press.h @@ -7,8 +7,8 @@ * key_press.c: key press handler * */ -#ifndef _KEY_PRESS_H -#define _KEY_PRESS_H +#ifndef I3_KEY_PRESS_H +#define I3_KEY_PRESS_H /** * There was a key press. We compare this key code with our bindings table and pass diff --git a/include/libi3.h b/include/libi3.h index d4df901f..7547845b 100644 --- a/include/libi3.h +++ b/include/libi3.h @@ -8,8 +8,8 @@ * as i3-msg, i3-config-wizard, … * */ -#ifndef _LIBI3_H -#define _LIBI3_H +#ifndef I3_LIBI3_H +#define I3_LIBI3_H #include #include diff --git a/include/load_layout.h b/include/load_layout.h index a2cd6d14..282512b2 100644 --- a/include/load_layout.h +++ b/include/load_layout.h @@ -8,8 +8,8 @@ * restart. * */ -#ifndef _LOAD_LAYOUT_H -#define _LOAD_LAYOUT_H +#ifndef I3_LOAD_LAYOUT_H +#define I3_LOAD_LAYOUT_H void tree_append_json(const char *filename); diff --git a/include/log.h b/include/log.h index 7822fba5..6fabeca3 100644 --- a/include/log.h +++ b/include/log.h @@ -7,8 +7,8 @@ * log.c: Logging functions. * */ -#ifndef _LOG_H -#define _LOG_H +#ifndef I3_LOG_H +#define I3_LOG_H #include #include diff --git a/include/manage.h b/include/manage.h index c16d295f..d50f64d4 100644 --- a/include/manage.h +++ b/include/manage.h @@ -7,8 +7,8 @@ * manage.c: Initially managing new windows (or existing ones on restart). * */ -#ifndef _MANAGE_H -#define _MANAGE_H +#ifndef I3_MANAGE_H +#define I3_MANAGE_H #include "data.h" diff --git a/include/match.h b/include/match.h index 6d9cb915..e1d25904 100644 --- a/include/match.h +++ b/include/match.h @@ -11,8 +11,8 @@ * match_matches_window() to find the windows affected by this command. * */ -#ifndef _MATCH_H -#define _MATCH_H +#ifndef I3_MATCH_H +#define I3_MATCH_H /* * Initializes the Match data structure. This function is necessary because the diff --git a/include/move.h b/include/move.h index 22b6e809..d45e676e 100644 --- a/include/move.h +++ b/include/move.h @@ -7,8 +7,8 @@ * move.c: Moving containers into some direction. * */ -#ifndef _MOVE_H -#define _MOVE_H +#ifndef I3_MOVE_H +#define I3_MOVE_H /** * Moves the current container in the given direction (TOK_LEFT, TOK_RIGHT, diff --git a/include/output.h b/include/output.h index d488ad30..e87da22e 100644 --- a/include/output.h +++ b/include/output.h @@ -7,8 +7,8 @@ * output.c: Output (monitor) related functions. * */ -#ifndef _OUTPUT_H -#define _OUTPUT_H +#ifndef I3_OUTPUT_H +#define I3_OUTPUT_H /** * Returns the output container below the given output container. diff --git a/include/randr.h b/include/randr.h index ac527bcc..019e1f74 100644 --- a/include/randr.h +++ b/include/randr.h @@ -9,8 +9,8 @@ * (take your time to read it completely, it answers all questions). * */ -#ifndef _RANDR_H -#define _RANDR_H +#ifndef I3_RANDR_H +#define I3_RANDR_H #include "data.h" #include diff --git a/include/regex.h b/include/regex.h index fe1e9f95..7403abef 100644 --- a/include/regex.h +++ b/include/regex.h @@ -7,8 +7,8 @@ * regex.c: Interface to libPCRE (perl compatible regular expressions). * */ -#ifndef _REGEX_H -#define _REGEX_H +#ifndef I3_REGEX_H +#define I3_REGEX_H /** * Creates a new 'regex' struct containing the given pattern and a PCRE diff --git a/include/render.h b/include/render.h index 1f31fb0f..0a5949f9 100644 --- a/include/render.h +++ b/include/render.h @@ -8,8 +8,8 @@ * various rects. Needs to be pushed to X11 (see x.c) to be visible. * */ -#ifndef _RENDER_H -#define _RENDER_H +#ifndef I3_RENDER_H +#define I3_RENDER_H /** * "Renders" the given container (and its children), meaning that all rects are diff --git a/include/resize.h b/include/resize.h index 99646ea0..fa0216c8 100644 --- a/include/resize.h +++ b/include/resize.h @@ -7,8 +7,8 @@ * resize.c: Interactive resizing. * */ -#ifndef _RESIZE_H -#define _RESIZE_H +#ifndef I3_RESIZE_H +#define I3_RESIZE_H int resize_graphical_handler(Con *first, Con *second, orientation_t orientation, const xcb_button_press_event_t *event); diff --git a/include/scratchpad.h b/include/scratchpad.h index 4d553327..c6157052 100644 --- a/include/scratchpad.h +++ b/include/scratchpad.h @@ -7,8 +7,8 @@ * scratchpad.c: Scratchpad functions (TODO: more description) * */ -#ifndef _SCRATCHPAD_H -#define _SCRATCHPAD_H +#ifndef I3_SCRATCHPAD_H +#define I3_SCRATCHPAD_H /** * Moves the specified window to the __i3_scratch workspace, making it floating diff --git a/include/shmlog.h b/include/shmlog.h index e755d2f1..fd3f53eb 100644 --- a/include/shmlog.h +++ b/include/shmlog.h @@ -8,8 +8,8 @@ * default (ringbuffer for storing the debug log). * */ -#ifndef _I3_SHMLOG_H -#define _I3_SHMLOG_H +#ifndef I3_I3_SHMLOG_H +#define I3_I3_SHMLOG_H #include #include diff --git a/include/sighandler.h b/include/sighandler.h index 571070b0..25d3385b 100644 --- a/include/sighandler.h +++ b/include/sighandler.h @@ -9,8 +9,8 @@ * to restart inplace). * */ -#ifndef _SIGHANDLER_H -#define _SIGHANDLER_H +#ifndef I3_SIGHANDLER_H +#define I3_SIGHANDLER_H /** * Setup signal handlers to safely handle SIGSEGV and SIGFPE diff --git a/include/startup.h b/include/startup.h index 290c8d21..bcc59a0a 100644 --- a/include/startup.h +++ b/include/startup.h @@ -10,8 +10,8 @@ * the appropriate workspace. * */ -#ifndef _STARTUP_H -#define _STARTUP_H +#ifndef I3_STARTUP_H +#define I3_STARTUP_H #define SN_API_NOT_YET_FROZEN 1 #include diff --git a/include/tree.h b/include/tree.h index 8816b19a..2799afee 100644 --- a/include/tree.h +++ b/include/tree.h @@ -7,8 +7,8 @@ * tree.c: Everything that primarily modifies the layout tree data structure. * */ -#ifndef _TREE_H -#define _TREE_H +#ifndef I3_TREE_H +#define I3_TREE_H extern Con *croot; /* TODO: i am not sure yet how much access to the focused container should diff --git a/include/util.h b/include/util.h index cd88863c..e397a4e8 100644 --- a/include/util.h +++ b/include/util.h @@ -8,8 +8,8 @@ * also libi3). * */ -#ifndef _UTIL_H -#define _UTIL_H +#ifndef I3_UTIL_H +#define I3_UTIL_H #include diff --git a/include/window.h b/include/window.h index 60198b87..59d3b1bb 100644 --- a/include/window.h +++ b/include/window.h @@ -7,8 +7,8 @@ * window.c: Updates window attributes (X11 hints/properties). * */ -#ifndef _WINDOW_H -#define _WINDOW_H +#ifndef I3_WINDOW_H +#define I3_WINDOW_H /** * Updates the WM_CLASS (consisting of the class and instance) for the diff --git a/include/workspace.h b/include/workspace.h index 1b25b425..ad780f1f 100644 --- a/include/workspace.h +++ b/include/workspace.h @@ -8,8 +8,8 @@ * workspaces. * */ -#ifndef _WORKSPACE_H -#define _WORKSPACE_H +#ifndef I3_WORKSPACE_H +#define I3_WORKSPACE_H #include "data.h" #include "tree.h" diff --git a/include/x.h b/include/x.h index cb4a8a96..c3d4ffc7 100644 --- a/include/x.h +++ b/include/x.h @@ -8,8 +8,8 @@ * render.c). Basically a big state machine. * */ -#ifndef _X_H -#define _X_H +#ifndef I3_X_H +#define I3_X_H /** 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 269038da..15d3e28f 100644 --- a/include/xcb.h +++ b/include/xcb.h @@ -7,8 +7,8 @@ * xcb.c: Helper functions for easier usage of XCB * */ -#ifndef _XCB_H -#define _XCB_H +#ifndef I3_XCB_H +#define I3_XCB_H #include "data.h" #include "xcursor.h" diff --git a/include/xcb_compat.h b/include/xcb_compat.h index 9c2660b7..fc09a254 100644 --- a/include/xcb_compat.h +++ b/include/xcb_compat.h @@ -9,8 +9,8 @@ * older versions. * */ -#ifndef _XCB_COMPAT_H -#define _XCB_COMPAT_H +#ifndef I3_XCB_COMPAT_H +#define I3_XCB_COMPAT_H #define xcb_icccm_get_wm_protocols_reply_t xcb_get_wm_protocols_reply_t #define xcb_icccm_get_wm_protocols xcb_get_wm_protocols diff --git a/include/xcursor.h b/include/xcursor.h index c341f90b..fba82ad3 100644 --- a/include/xcursor.h +++ b/include/xcursor.h @@ -7,8 +7,8 @@ * xcursor.c: libXcursor support for themed cursors. * */ -#ifndef _XCURSOR_CURSOR_H -#define _XCURSOR_CURSOR_H +#ifndef I3_XCURSOR_CURSOR_H +#define I3_XCURSOR_CURSOR_H #include diff --git a/include/xinerama.h b/include/xinerama.h index 8c879c07..ca7c2ab5 100644 --- a/include/xinerama.h +++ b/include/xinerama.h @@ -9,8 +9,8 @@ * driver which does not support RandR in 2011 *sigh*. * */ -#ifndef _XINERAMA_H -#define _XINERAMA_H +#ifndef I3_XINERAMA_H +#define I3_XINERAMA_H #include "data.h" -- 2.39.5