Improve the header includes, cont'd
Also check in the modulemap file, and add a option to build with clang's -fmodules. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
20
src/c2.c
20
src/c2.c
@@ -27,13 +27,19 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "win.h"
|
||||
#include "c2.h"
|
||||
#include "config.h"
|
||||
#include "string_utils.h"
|
||||
#include "utils.h"
|
||||
#include "log.h"
|
||||
#include "x.h"
|
||||
#include "compiler.h"
|
||||
|
||||
#include "c2.h"
|
||||
|
||||
#pragma GCC diagnostic error "-Wunused-parameter"
|
||||
|
||||
@@ -103,7 +109,7 @@ struct _c2_l {
|
||||
} match : 3;
|
||||
bool match_ignorecase : 1;
|
||||
char *tgt;
|
||||
Atom tgtatom;
|
||||
xcb_atom_t tgtatom;
|
||||
bool tgt_onframe;
|
||||
int index;
|
||||
enum {
|
||||
@@ -341,7 +347,7 @@ c2h_dump_str_type(const c2_l_t *pleaf);
|
||||
static void attr_unused
|
||||
c2_dump(c2_ptr_t p);
|
||||
|
||||
static Atom
|
||||
static xcb_atom_t
|
||||
c2_get_atom_type(const c2_l_t *pleaf);
|
||||
|
||||
static bool
|
||||
@@ -1331,7 +1337,7 @@ c2_dump(c2_ptr_t p) {
|
||||
/**
|
||||
* Get the type atom of a condition.
|
||||
*/
|
||||
static Atom
|
||||
static xcb_atom_t
|
||||
c2_get_atom_type(const c2_l_t *pleaf) {
|
||||
switch (pleaf->type) {
|
||||
case C2_L_TCARDINAL:
|
||||
@@ -1348,9 +1354,7 @@ c2_get_atom_type(const c2_l_t *pleaf) {
|
||||
assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
return AnyPropertyType;
|
||||
unreachable;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1454,7 +1458,7 @@ c2_match_once_leaf(session_t *ps, win *w, const c2_l_t *pleaf,
|
||||
else if (C2_L_TATOM == pleaf->type) {
|
||||
winprop_t prop = wid_get_prop_adv(ps, wid, pleaf->tgtatom,
|
||||
idx, 1L, c2_get_atom_type(pleaf), pleaf->format);
|
||||
Atom atom = winprop_get_int(prop);
|
||||
xcb_atom_t atom = winprop_get_int(prop);
|
||||
if (atom) {
|
||||
xcb_get_atom_name_reply_t *reply =
|
||||
xcb_get_atom_name_reply(ps->c, xcb_get_atom_name(ps->c, atom), NULL);
|
||||
|
||||
Reference in New Issue
Block a user