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

Commit

Permalink
i3bar: Make header declarations extern
Browse files Browse the repository at this point in the history
See #3914
  • Loading branch information
orestisfl committed Feb 1, 2020
1 parent e9f0113 commit d14e59b
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions i3bar/include/common.h
Expand Up @@ -17,7 +17,7 @@

typedef struct rect_t rect;

struct ev_loop *main_loop;
extern struct ev_loop *main_loop;

struct rect_t {
int x;
Expand Down Expand Up @@ -82,8 +82,8 @@ struct status_block {
blocks;
};

TAILQ_HEAD(statusline_head, status_block)
statusline_head;
extern TAILQ_HEAD(statusline_head, status_block)
statusline_head;

#include "child.h"
#include "ipc.h"
Expand Down
2 changes: 1 addition & 1 deletion i3bar/include/configuration.h
Expand Up @@ -74,7 +74,7 @@ typedef struct config_t {
S_SHOW = 1 } hidden_state;
} config_t;

config_t config;
extern config_t config;

/**
* Start parsing the received bar configuration JSON string
Expand Down
2 changes: 1 addition & 1 deletion i3bar/include/outputs.h
Expand Up @@ -19,7 +19,7 @@
typedef struct i3_output i3_output;

SLIST_HEAD(outputs_head, i3_output);
struct outputs_head* outputs;
extern struct outputs_head* outputs;

/*
* Start parsing the received JSON string
Expand Down
2 changes: 1 addition & 1 deletion i3bar/include/xcb.h
Expand Up @@ -53,7 +53,7 @@ struct xcb_color_strings_t {
typedef struct xcb_colors_t xcb_colors_t;

/* Cached width of the custom separator if one was set */
int separator_symbol_width;
extern int separator_symbol_width;

/*
* Early initialization of the connection to X11: Everything which does not
Expand Down
1 change: 1 addition & 0 deletions i3bar/src/config.c
Expand Up @@ -19,6 +19,7 @@

#include <X11/Xlib.h>

config_t config;
static char *cur_key;
static bool parsing_bindings;
static bool parsing_tray_outputs;
Expand Down
2 changes: 2 additions & 0 deletions i3bar/src/main.c
Expand Up @@ -17,6 +17,8 @@
#include <getopt.h>
#include <glob.h>

struct ev_loop *main_loop;

/*
* Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
*
Expand Down
1 change: 1 addition & 0 deletions i3bar/src/outputs.c
Expand Up @@ -252,6 +252,7 @@ static yajl_callbacks outputs_callbacks = {
.yajl_end_map = outputs_end_map_cb,
};

struct outputs_head *outputs;
/*
* Initiate the outputs list
*
Expand Down
3 changes: 3 additions & 0 deletions i3bar/src/xcb.c
Expand Up @@ -140,6 +140,9 @@ static const int tray_loff_px = 2;
/* Vertical offset between the bar and a separator */
static const int sep_voff_px = 4;

/* Cached width of the custom separator if one was set */
int separator_symbol_width;

int _xcb_request_failed(xcb_void_cookie_t cookie, char *err_msg, int line) {
xcb_generic_error_t *err;
if ((err = xcb_request_check(xcb_connection, cookie)) != NULL) {
Expand Down

0 comments on commit d14e59b

Please sign in to comment.