diff options
author | Orestis Floros <orestisflo@gmail.com> | 2020-04-19 09:43:48 +0200 |
---|---|---|
committer | Orestis Floros <orestisflo@gmail.com> | 2020-04-19 09:58:25 +0200 |
commit | 3c522d9f2f2b7a58952f219598d5e2df4e0e5334 (patch) | |
tree | ae3b75a4faa8601afd988bf73f5665e78e199425 /libi3 | |
parent | 0bce0d86bf767e90c7937ba9fb027ecaa5e037c7 (diff) | |
download | i3-3c522d9f2f2b7a58952f219598d5e2df4e0e5334.tar.gz i3-3c522d9f2f2b7a58952f219598d5e2df4e0e5334.zip |
Sort includes in *.c files
Not enabling in .clang-format because it breaks headers files.
Used:
IncludeCategories:
- Regex: '^<config'
Priority: 0
- Regex: '^".*"'
Priority: 1
- Regex: '^<(xcb|xkb|yajl|X11)'
Priority: 3
- Regex: '.*'
Priority: 2
Diffstat (limited to 'libi3')
-rw-r--r-- | libi3/dpi.c | 1 | ||||
-rw-r--r-- | libi3/draw_util.c | 5 | ||||
-rw-r--r-- | libi3/fake_configure_notify.c | 2 | ||||
-rw-r--r-- | libi3/font.c | 9 | ||||
-rw-r--r-- | libi3/format_placeholders.c | 2 | ||||
-rw-r--r-- | libi3/g_utf8_make_valid.c | 2 | ||||
-rw-r--r-- | libi3/get_colorpixel.c | 5 | ||||
-rw-r--r-- | libi3/get_exe_path.c | 8 | ||||
-rw-r--r-- | libi3/get_mod_mask.c | 1 | ||||
-rw-r--r-- | libi3/get_process_filename.c | 7 | ||||
-rw-r--r-- | libi3/ipc_connect.c | 10 | ||||
-rw-r--r-- | libi3/ipc_recv_message.c | 13 | ||||
-rw-r--r-- | libi3/ipc_send_message.c | 9 | ||||
-rw-r--r-- | libi3/is_debug_build.c | 2 | ||||
-rw-r--r-- | libi3/root_atom_contents.c | 8 | ||||
-rw-r--r-- | libi3/safewrappers.c | 10 | ||||
-rw-r--r-- | libi3/string.c | 3 | ||||
-rw-r--r-- | libi3/strndup.c | 2 |
18 files changed, 48 insertions, 51 deletions
diff --git a/libi3/dpi.c b/libi3/dpi.c index d15e35be..dec38bc8 100644 --- a/libi3/dpi.c +++ b/libi3/dpi.c @@ -9,6 +9,7 @@ #include <math.h> #include <stdlib.h> + #include <xcb/xcb_xrm.h> static long dpi; diff --git a/libi3/draw_util.c b/libi3/draw_util.c index 092ac967..710c536a 100644 --- a/libi3/draw_util.c +++ b/libi3/draw_util.c @@ -8,12 +8,13 @@ */ #include "libi3.h" -#include <stdlib.h> +#include <cairo/cairo-xcb.h> #include <err.h> +#include <stdlib.h> #include <string.h> + #include <xcb/xcb.h> #include <xcb/xcb_aux.h> -#include <cairo/cairo-xcb.h> /* The default visual_type to use if none is specified when creating the surface. Must be defined globally. */ extern xcb_visualtype_t *visual_type; diff --git a/libi3/fake_configure_notify.c b/libi3/fake_configure_notify.c index 145f4512..e79a748b 100644 --- a/libi3/fake_configure_notify.c +++ b/libi3/fake_configure_notify.c @@ -7,8 +7,8 @@ */ #include "libi3.h" -#include <stdlib.h> #include <stdbool.h> +#include <stdlib.h> #include <xcb/xcb.h> #include <xcb/xproto.h> diff --git a/libi3/font.c b/libi3/font.c index 7b10edf0..e8945524 100644 --- a/libi3/font.c +++ b/libi3/font.c @@ -8,14 +8,13 @@ #include "libi3.h" #include <assert.h> +#include <cairo/cairo-xcb.h> +#include <err.h> +#include <pango/pangocairo.h> +#include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <string.h> -#include <stdbool.h> -#include <err.h> - -#include <cairo/cairo-xcb.h> -#include <pango/pangocairo.h> static const i3Font *savedFont = NULL; diff --git a/libi3/format_placeholders.c b/libi3/format_placeholders.c index 770e383d..99fa3055 100644 --- a/libi3/format_placeholders.c +++ b/libi3/format_placeholders.c @@ -7,8 +7,8 @@ */ #include "libi3.h" -#include <stdlib.h> #include <stdint.h> +#include <stdlib.h> #include <string.h> #ifndef CS_STARTS_WITH diff --git a/libi3/g_utf8_make_valid.c b/libi3/g_utf8_make_valid.c index b15873b3..71beafd3 100644 --- a/libi3/g_utf8_make_valid.c +++ b/libi3/g_utf8_make_valid.c @@ -19,8 +19,8 @@ #include "libi3.h" -#include <string.h> #include <glib.h> +#include <string.h> /* Copied from: * https://gitlab.gnome.org/GNOME/glib/blob/f928dfdf57bf92c883b53b16d7a9d49add504f52/glib/gutf8.c#L1752-1815 */ diff --git a/libi3/get_colorpixel.c b/libi3/get_colorpixel.c index 45931051..b60ffbac 100644 --- a/libi3/get_colorpixel.c +++ b/libi3/get_colorpixel.c @@ -6,12 +6,11 @@ * */ #include "libi3.h" +#include "queue.h" -#include <stdlib.h> #include <stdint.h> +#include <stdlib.h> #include <string.h> - -#include "queue.h" struct Colorpixel { char hex[8]; uint32_t pixel; diff --git a/libi3/get_exe_path.c b/libi3/get_exe_path.c index 430fb2e0..762b4965 100644 --- a/libi3/get_exe_path.c +++ b/libi3/get_exe_path.c @@ -7,12 +7,12 @@ */ #include "libi3.h" -#include <unistd.h> -#include <string.h> -#include <stdio.h> +#include <errno.h> #include <limits.h> +#include <stdio.h> #include <stdlib.h> -#include <errno.h> +#include <string.h> +#include <unistd.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 98031d4c..92af456d 100644 --- a/libi3/get_mod_mask.c +++ b/libi3/get_mod_mask.c @@ -9,6 +9,7 @@ #include <stdint.h> #include <stdlib.h> + #include <xcb/xcb.h> #include <xcb/xcb_keysyms.h> diff --git a/libi3/get_process_filename.c b/libi3/get_process_filename.c index 7e2ecbd2..6e155ea8 100644 --- a/libi3/get_process_filename.c +++ b/libi3/get_process_filename.c @@ -8,16 +8,15 @@ #include "libi3.h" #include <assert.h> +#include <err.h> +#include <pwd.h> +#include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <string.h> -#include <stdbool.h> -#include <err.h> #include <sys/stat.h> #include <sys/types.h> -#include <pwd.h> #include <unistd.h> -#include <err.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 f659a1a4..614ccdf3 100644 --- a/libi3/ipc_connect.c +++ b/libi3/ipc_connect.c @@ -7,14 +7,14 @@ */ #include "libi3.h" -#include <sys/types.h> -#include <sys/socket.h> -#include <sys/un.h> -#include <string.h> #include <err.h> +#include <fcntl.h> #include <stdlib.h> +#include <string.h> +#include <sys/socket.h> +#include <sys/types.h> +#include <sys/un.h> #include <unistd.h> -#include <fcntl.h> /* * Connects to the i3 IPC socket and returns the file descriptor for the diff --git a/libi3/ipc_recv_message.c b/libi3/ipc_recv_message.c index 84da5aa3..6364b16d 100644 --- a/libi3/ipc_recv_message.c +++ b/libi3/ipc_recv_message.c @@ -7,15 +7,14 @@ */ #include "libi3.h" -#include <string.h> -#include <stdlib.h> -#include <stdio.h> -#include <stdint.h> -#include <unistd.h> #include <errno.h> -#include <inttypes.h> - #include <i3/ipc.h> +#include <inttypes.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> /* * Reads a message from the given socket file descriptor and stores its length diff --git a/libi3/ipc_send_message.c b/libi3/ipc_send_message.c index c2cc0127..106db348 100644 --- a/libi3/ipc_send_message.c +++ b/libi3/ipc_send_message.c @@ -7,14 +7,13 @@ */ #include "libi3.h" -#include <string.h> -#include <stdlib.h> -#include <unistd.h> -#include <stdint.h> #include <err.h> #include <errno.h> - #include <i3/ipc.h> +#include <stdint.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> /* * Formats a message (payload) of the given size and type and sends it to i3 via diff --git a/libi3/is_debug_build.c b/libi3/is_debug_build.c index 52187bda..afd06237 100644 --- a/libi3/is_debug_build.c +++ b/libi3/is_debug_build.c @@ -7,8 +7,8 @@ */ #include "libi3.h" -#include <string.h> #include <stdbool.h> +#include <string.h> /* * Returns true if this version of i3 is a debug build (anything which is not a diff --git a/libi3/root_atom_contents.c b/libi3/root_atom_contents.c index d6394d4b..134733a2 100644 --- a/libi3/root_atom_contents.c +++ b/libi3/root_atom_contents.c @@ -7,12 +7,12 @@ */ #include "libi3.h" -#include <stdio.h> -#include <string.h> -#include <stdbool.h> #include <limits.h> -#include <stdlib.h> #include <math.h> +#include <stdbool.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <xcb/xcb.h> #include <xcb/xcb_aux.h> diff --git a/libi3/safewrappers.c b/libi3/safewrappers.c index fdea636e..d4225ffe 100644 --- a/libi3/safewrappers.c +++ b/libi3/safewrappers.c @@ -7,13 +7,13 @@ */ #include "libi3.h" -#include <string.h> -#include <stdlib.h> -#include <stdarg.h> -#include <unistd.h> -#include <stdio.h> #include <err.h> #include <errno.h> +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> /* * The s* functions (safe) are wrappers around malloc, strdup, …, which exits if one of diff --git a/libi3/string.c b/libi3/string.c index 9efa3690..da18c550 100644 --- a/libi3/string.c +++ b/libi3/string.c @@ -11,11 +11,10 @@ */ #include "libi3.h" +#include <glib.h> #include <stdlib.h> #include <string.h> -#include <glib.h> - struct _i3String { char *utf8; xcb_char2b_t *ucs2; diff --git a/libi3/strndup.c b/libi3/strndup.c index e215a76f..533958d2 100644 --- a/libi3/strndup.c +++ b/libi3/strndup.c @@ -7,8 +7,8 @@ */ #include "libi3.h" -#include <sys/types.h> #include <string.h> +#include <sys/types.h> #ifndef HAVE_strndup /* |