Get rid of all global variables
This commit is contained in:
parent
bc84d094cd
commit
10f7d9b8db
13 changed files with 121 additions and 69 deletions
|
|
@ -10,16 +10,19 @@
|
|||
|
||||
typedef struct {
|
||||
#define STATUS_LENGTH \
|
||||
((LEN(blocks) * (MEMBER_LENGTH(block, output) - 1) + CLICKABLE_BLOCKS) + \
|
||||
(LEN(blocks) - 1 + LEADING_DELIMITER + TRAILING_DELIMITER) * \
|
||||
((BLOCK_COUNT * (MEMBER_LENGTH(block, output) - 1) + CLICKABLE_BLOCKS) + \
|
||||
(BLOCK_COUNT - 1 + LEADING_DELIMITER + TRAILING_DELIMITER) * \
|
||||
(LEN(DELIMITER) - 1) + \
|
||||
1)
|
||||
char current[STATUS_LENGTH];
|
||||
char previous[STATUS_LENGTH];
|
||||
#undef STATUS_LENGTH
|
||||
|
||||
const block* const blocks;
|
||||
const unsigned short block_count;
|
||||
} status;
|
||||
|
||||
status status_new(void);
|
||||
status status_new(const block* const blocks, const unsigned short block_count);
|
||||
bool status_update(status* const status);
|
||||
int status_write(const status* const status, const bool is_debug_mode,
|
||||
x11_connection* const connection);
|
||||
|
|
|
|||
Loading…
Reference in a new issue