common.h: general clean up

Remove unused functions and definitions. Move some macros into the files
they belong.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-05-06 01:24:38 +01:00
parent e330464126
commit 939f2fb602
7 changed files with 24 additions and 167 deletions

View File

@@ -4,9 +4,6 @@
#include "common.h"
#include "utils.h"
/**
* Wrapper of XInternAtom() for convenience.
*/
static inline void *atom_getter(void *ud, const char *atom_name, int *err) {
xcb_connection_t *c = ud;
xcb_intern_atom_reply_t *reply = xcb_intern_atom_reply(
@@ -25,7 +22,7 @@ static inline void *atom_getter(void *ud, const char *atom_name, int *err) {
}
/**
* Fetch all required atoms and save them to a session.
* Create a new atom structure and fetch all predefined atoms
*/
struct atom *init_atoms(xcb_connection_t *c) {
auto atoms = ccalloc(1, struct atom);