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
This commit is contained in:
@ -8,8 +8,8 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
#include <xkbcommon/xkbcommon-x11.h>
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
|
||||
static struct xkb_context *xkb_context;
|
||||
static struct xkb_keymap *xkb_keymap;
|
||||
|
@ -9,12 +9,11 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <xcb/xcb_icccm.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <X11/XKBlib.h>
|
||||
#include <xcb/xcb_icccm.h>
|
||||
|
||||
typedef enum { CLICK_BORDER = 0,
|
||||
CLICK_DECORATION = 1,
|
||||
|
@ -8,14 +8,13 @@
|
||||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
#include "shmlog.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <fcntl.h>
|
||||
#include <float.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "shmlog.h"
|
||||
|
||||
// Macros to make the YAJL API a bit easier to use.
|
||||
#define y(x, ...) (cmd_output->json_gen != NULL ? yajl_gen_##x(cmd_output->json_gen, ##__VA_ARGS__) : 0)
|
||||
|
@ -25,12 +25,12 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.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)
|
||||
|
@ -10,7 +10,6 @@
|
||||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include "yajl_utils.h"
|
||||
|
||||
static void con_on_remove_child(Con *con);
|
||||
|
@ -25,16 +25,17 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <xcb/xcb_xrm.h>
|
||||
|
||||
// Macros to make the YAJL API a bit easier to use.
|
||||
|
@ -10,12 +10,12 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/wait.h>
|
||||
#include <time.h>
|
||||
|
||||
static bool human_readable_key, loaded_config_file_name_key;
|
||||
|
@ -10,9 +10,10 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <time.h>
|
||||
#include <float.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <xcb/randr.h>
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-monitor.h>
|
||||
|
@ -7,16 +7,17 @@
|
||||
* ipc.c: UNIX domain socket IPC (initialization, client handling, protocol).
|
||||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include "all.h"
|
||||
#include "yajl_utils.h"
|
||||
|
||||
#include <ev.h>
|
||||
#include <fcntl.h>
|
||||
#include <libgen.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <fcntl.h>
|
||||
#include <libgen.h>
|
||||
#include <ev.h>
|
||||
|
||||
#include <yajl/yajl_gen.h>
|
||||
#include <yajl/yajl_parse.h>
|
||||
|
||||
|
28
src/log.c
28
src/log.c
@ -9,27 +9,27 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include "i3.h"
|
||||
#include "libi3.h"
|
||||
#include "log.h"
|
||||
#include "shmlog.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#if !defined(__OpenBSD__)
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
#include "log.h"
|
||||
#include "i3.h"
|
||||
#include "libi3.h"
|
||||
#include "shmlog.h"
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
16
src/main.c
16
src/main.c
@ -8,18 +8,18 @@
|
||||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
#include "shmlog.h"
|
||||
|
||||
#include <ev.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <libgen.h>
|
||||
#include "shmlog.h"
|
||||
#include <sys/mman.h>
|
||||
#include <sys/resource.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#ifdef I3_ASAN_ENABLED
|
||||
#include <sanitizer/lsan_interface.h>
|
||||
|
@ -8,7 +8,6 @@
|
||||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include "yajl_utils.h"
|
||||
|
||||
#include <yajl/yajl_gen.h>
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "all.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <xcb/randr.h>
|
||||
|
||||
/* Pointer to the result of the query for primary output */
|
||||
|
@ -28,22 +28,22 @@
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "sd-daemon.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int sd_listen_fds(int unset_environment) {
|
||||
int r, fd;
|
||||
const char *e;
|
||||
|
@ -12,9 +12,8 @@
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <xcb/xcb_event.h>
|
||||
|
||||
#include <X11/keysym.h>
|
||||
#include <xcb/xcb_event.h>
|
||||
|
||||
typedef struct dialog_t {
|
||||
xcb_window_t id;
|
||||
|
@ -11,12 +11,11 @@
|
||||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include "sd-daemon.h"
|
||||
|
||||
#include <paths.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <paths.h>
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-launcher.h>
|
||||
|
11
src/util.c
11
src/util.c
@ -10,16 +10,17 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
#include <sys/wait.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/wait.h>
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/cdefs.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <pwd.h>
|
||||
#include <yajl/yajl_version.h>
|
||||
#include <libgen.h>
|
||||
#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <libgen.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#include <yajl/yajl_version.h>
|
||||
|
||||
#define SN_API_NOT_YET_FROZEN 1
|
||||
#include <libsn/sn-launcher.h>
|
||||
|
@ -9,13 +9,13 @@
|
||||
*/
|
||||
#include <config.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
#include <xcb/xcb_cursor.h>
|
||||
|
||||
#include "i3.h"
|
||||
#include "xcb.h"
|
||||
#include "xcursor.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <err.h>
|
||||
|
||||
#include <xcb/xcb_cursor.h>
|
||||
|
||||
static xcb_cursor_context_t *ctx;
|
||||
static xcb_cursor_t cursors[XCURSOR_CURSOR_MAX];
|
||||
|
Reference in New Issue
Block a user