Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Remove unused headers
Browse files Browse the repository at this point in the history
  • Loading branch information
orestisfl committed Apr 20, 2020
1 parent 3c522d9 commit 0b62129
Show file tree
Hide file tree
Showing 39 changed files with 3 additions and 137 deletions.
8 changes: 2 additions & 6 deletions i3-config-wizard/main.c
Expand Up @@ -10,6 +10,8 @@
*/
#include <config.h>

#include "libi3.h"

#if defined(__FreeBSD__)
#include <sys/param.h>
#endif
Expand All @@ -23,17 +25,12 @@
#define _WITH_GETLINE
#endif

#include <assert.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <glob.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
Expand Down Expand Up @@ -68,7 +65,6 @@

#include "xcb.h"
xcb_visualtype_t *visual_type = NULL;
#include "libi3.h"

#define TEXT_PADDING logical_px(4)
#define WIN_POS_X logical_px(490)
Expand Down
5 changes: 0 additions & 5 deletions i3-dump-log/main.c
Expand Up @@ -13,22 +13,17 @@
#include "shmlog.h"

#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <getopt.h>
#include <i3/ipc.h>
#include <limits.h>
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>

#if !defined(__OpenBSD__)
Expand Down
4 changes: 0 additions & 4 deletions i3-input/main.c
Expand Up @@ -8,10 +8,7 @@
* to i3.
*
*/
#include <err.h>
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
Expand All @@ -22,7 +19,6 @@

#include <xcb/xcb.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_event.h>
#include <xcb/xcb_keysyms.h>

xcb_visualtype_t *visual_type = NULL;
Expand Down
8 changes: 0 additions & 8 deletions i3-msg/main.c
Expand Up @@ -17,24 +17,16 @@
#include "libi3.h"

#include <err.h>
#include <errno.h>
#include <getopt.h>
#include <i3/ipc.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>

#include <xcb/xcb.h>
#include <xcb/xcb_aux.h>
#include <yajl/yajl_parse.h>
#include <yajl/yajl_version.h>

/*
* Having verboselog() and errorlog() is necessary when using libi3.
Expand Down
2 changes: 0 additions & 2 deletions i3bar/include/common.h
Expand Up @@ -9,7 +9,6 @@

#include <config.h>

#include <stdbool.h>
#include <xcb/xcb.h>
#include <xcb/xproto.h>
#include "libi3.h"
Expand Down Expand Up @@ -94,5 +93,4 @@ extern TAILQ_HEAD(statusline_head, status_block)
#include "trayclients.h"
#include "xcb.h"
#include "configuration.h"
#include "libi3.h"
#include "parse_json_header.h"
4 changes: 0 additions & 4 deletions i3bar/src/child.c
Expand Up @@ -20,15 +20,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>

#include <xcb/xcb_keysyms.h>
#include <yajl/yajl_common.h>
#include <yajl/yajl_gen.h>
#include <yajl/yajl_parse.h>
#include <yajl/yajl_version.h>

/* Global variables for child_*() */
i3bar_child child;
Expand Down
3 changes: 0 additions & 3 deletions i3bar/src/config.c
Expand Up @@ -9,15 +9,12 @@
*/
#include "common.h"

#include <errno.h>
#include <i3/ipc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <X11/Xlib.h>
#include <yajl/yajl_parse.h>
#include <yajl/yajl_version.h>

config_t config;
static char *cur_key;
Expand Down
3 changes: 0 additions & 3 deletions i3bar/src/ipc.c
Expand Up @@ -13,11 +13,8 @@
#include <ev.h>
#include <i3/ipc.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#ifdef I3_ASAN_ENABLED
#include <sanitizer/lsan_interface.h>
Expand Down
2 changes: 0 additions & 2 deletions i3bar/src/main.c
Expand Up @@ -7,15 +7,13 @@
*/
#include "common.h"

#include <errno.h>
#include <ev.h>
#include <getopt.h>
#include <glob.h>
#include <i3/ipc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

struct ev_loop *main_loop;

Expand Down
3 changes: 0 additions & 3 deletions i3bar/src/mode.c
Expand Up @@ -9,13 +9,10 @@
*/
#include "common.h"

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <yajl/yajl_parse.h>
#include <yajl/yajl_version.h>

/* A datatype to pass through the callbacks to save the state */
struct mode_json_params {
Expand Down
2 changes: 0 additions & 2 deletions i3bar/src/outputs.c
Expand Up @@ -10,13 +10,11 @@
#include "common.h"

#include <errno.h>
#include <i3/ipc.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <yajl/yajl_parse.h>
#include <yajl/yajl_version.h>

/* A datatype to pass through the callbacks to save the state */
struct outputs_json_params {
Expand Down
13 changes: 0 additions & 13 deletions i3bar/src/parse_json_header.c
Expand Up @@ -10,23 +10,10 @@
*/
#include "common.h"

#include <err.h>
#include <errno.h>
#include <ev.h>
#include <fcntl.h>
#include <signal.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>

#include <yajl/yajl_common.h>
#include <yajl/yajl_parse.h>
#include <yajl/yajl_version.h>

static enum {
KEY_VERSION,
Expand Down
3 changes: 0 additions & 3 deletions i3bar/src/workspaces.c
Expand Up @@ -9,13 +9,10 @@
*/
#include "common.h"

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <yajl/yajl_parse.h>
#include <yajl/yajl_version.h>

/* A datatype to pass through the callbacks to save the state */
struct workspaces_json_params {
Expand Down
10 changes: 0 additions & 10 deletions i3bar/src/xcb.c
Expand Up @@ -10,24 +10,14 @@
#include "common.h"

#include <err.h>
#include <errno.h>
#include <ev.h>
#include <fcntl.h>
#include <i3/ipc.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include <X11/XKBlib.h>
#include <X11/Xlib.h>
#include <X11/extensions/XKB.h>
#include <xcb/xcb.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_cursor.h>
#include <xcb/xkb.h>
#include <xcb/xproto.h>

#ifdef I3_ASAN_ENABLED
#include <sanitizer/lsan_interface.h>
Expand Down
2 changes: 0 additions & 2 deletions libi3/draw_util.c
Expand Up @@ -8,8 +8,6 @@
*/
#include "libi3.h"

#include <cairo/cairo-xcb.h>
#include <err.h>
#include <stdlib.h>
#include <string.h>

Expand Down
1 change: 0 additions & 1 deletion libi3/fake_configure_notify.c
Expand Up @@ -7,7 +7,6 @@
*/
#include "libi3.h"

#include <stdbool.h>
#include <stdlib.h>

#include <xcb/xcb.h>
Expand Down
1 change: 0 additions & 1 deletion libi3/font.c
Expand Up @@ -11,7 +11,6 @@
#include <cairo/cairo-xcb.h>
#include <err.h>
#include <pango/pangocairo.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
Expand Down
1 change: 0 additions & 1 deletion libi3/format_placeholders.c
Expand Up @@ -7,7 +7,6 @@
*/
#include "libi3.h"

#include <stdint.h>
#include <stdlib.h>
#include <string.h>

Expand Down
2 changes: 0 additions & 2 deletions libi3/get_exe_path.c
Expand Up @@ -8,8 +8,6 @@
#include "libi3.h"

#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
Expand Down
5 changes: 0 additions & 5 deletions libi3/get_process_filename.c
Expand Up @@ -7,15 +7,10 @@
*/
#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 <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

/*
Expand Down
2 changes: 0 additions & 2 deletions libi3/ipc_connect.c
Expand Up @@ -12,9 +12,7 @@
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>

/*
* Connects to the i3 IPC socket and returns the file descriptor for the
Expand Down
2 changes: 0 additions & 2 deletions libi3/ipc_recv_message.c
Expand Up @@ -11,8 +11,6 @@
#include <i3/ipc.h>
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

Expand Down
5 changes: 0 additions & 5 deletions libi3/ipc_send_message.c
Expand Up @@ -7,13 +7,8 @@
*/
#include "libi3.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
Expand Down
1 change: 0 additions & 1 deletion libi3/is_debug_build.c
Expand Up @@ -7,7 +7,6 @@
*/
#include "libi3.h"

#include <stdbool.h>
#include <string.h>

/*
Expand Down
3 changes: 0 additions & 3 deletions libi3/root_atom_contents.c
Expand Up @@ -7,10 +7,7 @@
*/
#include "libi3.h"

#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Expand Down
2 changes: 0 additions & 2 deletions libi3/safewrappers.c
Expand Up @@ -9,8 +9,6 @@

#include <err.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
Expand Down
1 change: 0 additions & 1 deletion libi3/strndup.c
Expand Up @@ -8,7 +8,6 @@
#include "libi3.h"

#include <string.h>
#include <sys/types.h>

#ifndef HAVE_strndup
/*
Expand Down

0 comments on commit 0b62129

Please sign in to comment.