Remove unused headers

With help from
https://github.com/include-what-you-use/include-what-you-use/
This commit is contained in:
Orestis Floros 2020-04-19 11:12:39 +02:00
parent 3c522d9f2f
commit 0b62129224
No known key found for this signature in database
GPG Key ID: A09DBD7D3222C1C3
39 changed files with 3 additions and 137 deletions

View File

@ -10,6 +10,8 @@
*/
#include <config.h>
#include "libi3.h"
#if defined(__FreeBSD__)
#include <sys/param.h>
#endif
@ -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>
@ -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)

View File

@ -13,11 +13,9 @@
#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>
@ -25,10 +23,7 @@
#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__)

View File

@ -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>
@ -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;

View File

@ -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.

View File

@ -9,7 +9,6 @@
#include <config.h>
#include <stdbool.h>
#include <xcb/xcb.h>
#include <xcb/xproto.h>
#include "libi3.h"
@ -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"

View File

@ -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;

View File

@ -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;

View File

@ -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>

View File

@ -7,7 +7,6 @@
*/
#include "common.h"
#include <errno.h>
#include <ev.h>
#include <getopt.h>
#include <glob.h>
@ -15,7 +14,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
struct ev_loop *main_loop;

View File

@ -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 {

View File

@ -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 {

View File

@ -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,

View File

@ -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 {

View File

@ -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>

View File

@ -8,8 +8,6 @@
*/
#include "libi3.h"
#include <cairo/cairo-xcb.h>
#include <err.h>
#include <stdlib.h>
#include <string.h>

View File

@ -7,7 +7,6 @@
*/
#include "libi3.h"
#include <stdbool.h>
#include <stdlib.h>
#include <xcb/xcb.h>

View File

@ -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>

View File

@ -7,7 +7,6 @@
*/
#include "libi3.h"
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

View File

@ -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>

View File

@ -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>
/*

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -7,7 +7,6 @@
*/
#include "libi3.h"
#include <stdbool.h>
#include <string.h>
/*

View File

@ -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>

View File

@ -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>

View File

@ -8,7 +8,6 @@
#include "libi3.h"
#include <string.h>
#include <sys/types.h>
#ifndef HAVE_strndup
/*

View File

@ -8,7 +8,6 @@
#include "libi3.h"
#include <err.h>
#include <errno.h>
#include <iconv.h>
#include <stdlib.h>
#include <string.h>

View File

@ -9,12 +9,8 @@
*/
#include "all.h"
#include <math.h>
#include <time.h>
#include <X11/XKBlib.h>
#include <xcb/xcb_icccm.h>
typedef enum { CLICK_BORDER = 0,
CLICK_DECORATION = 1,
CLICK_INSIDE = 2 } click_destination_t;

View File

@ -11,8 +11,6 @@
#include "shmlog.h"
#include <fcntl.h>
#include <float.h>
#include <stdarg.h>
#include <stdint.h>
#include <unistd.h>

View File

@ -25,13 +25,6 @@
*/
#include "all.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.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)

View File

@ -9,9 +9,6 @@
*/
#include "all.h"
#include <float.h>
#include <stdarg.h>
/*******************************************************************************
* Criteria functions.
******************************************************************************/

View File

@ -11,11 +11,6 @@
#include "all.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;

View File

@ -10,7 +10,6 @@
*/
#include "all.h"
#include <float.h>
#include <sys/time.h>
#include <time.h>

View File

@ -10,10 +10,7 @@
*/
#include "all.h"
#include <yajl/yajl_common.h>
#include <yajl/yajl_gen.h>
#include <yajl/yajl_parse.h>
#include <yajl/yajl_version.h>
/* TODO: refactor the whole parsing thing */

View File

@ -13,6 +13,7 @@
#include <ev.h>
#include <fcntl.h>
#include <libgen.h>
#include <signal.h>
#include <sys/mman.h>
#include <sys/resource.h>
#include <sys/socket.h>

View File

@ -8,9 +8,6 @@
*
*/
#include "all.h"
#include "yajl_utils.h"
#include <yajl/yajl_gen.h>
/*
* Match frame and window depth. This is needed because X will refuse to reparent a

View File

@ -7,14 +7,9 @@
*/
#include "all.h"
#include <ev.h>
#include <iconv.h>
#include <signal.h>
#include <sys/wait.h>
#include <X11/keysym.h>
#include <xcb/xcb_event.h>
typedef struct dialog_t {
xcb_window_t id;
xcb_colormap_t colormap;

View File

@ -10,7 +10,6 @@
*/
#include "all.h"
#include <stdarg.h>
#include <sys/wait.h>
#if defined(__OpenBSD__)
#include <sys/cdefs.h>
@ -18,12 +17,6 @@
#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>
int min(int a, int b) {
return (a < b ? a : b);