diff options
author | Ian Osgood <iano@quirkster.com> | 2006-10-07 11:45:07 -0700 |
---|---|---|
committer | Ian Osgood <iano@quirkster.com> | 2006-10-07 11:45:07 -0700 |
commit | f47242aa7ee7a774960bf66fbc6ac70e46ea5962 (patch) | |
tree | 962c5e4e9cdb85308db3b8138aec9cc080e7eb3b | |
parent | 6014e27a6b536b243df122cb9966524e98e6f8a7 (diff) |
Adapt xcb/util libraries for removal of XID structures.
-rw-r--r-- | atom/atoms.gperf.m4 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/atom/atoms.gperf.m4 b/atom/atoms.gperf.m4 index 5c433be..c22f745 100644 --- a/atom/atoms.gperf.m4 +++ b/atom/atoms.gperf.m4 @@ -4,7 +4,7 @@ #include "xcb_atom.h" define(`COUNT', 0)dnl -define(`DO', `const xcb_atom_t $1 = { define(`COUNT', incr(COUNT))COUNT };')dnl +define(`DO', `const xcb_atom_t $1 = define(`COUNT', incr(COUNT))COUNT;')dnl include(atomlist.m4)`'dnl %} @@ -18,7 +18,7 @@ include(atomlist.m4)`'dnl %struct-type struct atom_map { int name; xcb_atom_t value; }; %% -define(`DO', `$1,{ define(`COUNT', incr(COUNT))COUNT }')dnl +define(`DO', `$1,define(`COUNT', incr(COUNT))COUNT')dnl include(atomlist.m4)`'dnl %% static const char *const atom_names[] = { @@ -29,7 +29,7 @@ include(atomlist.m4)`'dnl xcb_atom_t intern_atom_predefined(uint16_t name_len, const char *name) { const struct atom_map *value = in_word_set(name, name_len); - xcb_atom_t ret = { XCB_NONE }; + xcb_atom_t ret = XCB_NONE; if(value) ret = value->value; return ret; @@ -39,7 +39,7 @@ intern_atom_fast_cookie_t intern_atom_fast(xcb_connection_t *c, uint8_t only_if_ { intern_atom_fast_cookie_t cookie; - if((cookie.u.atom = intern_atom_predefined(name_len, name)).xid != XCB_NONE) + if((cookie.u.atom = intern_atom_predefined(name_len, name)) != XCB_NONE) { cookie.tag = TAG_VALUE; return cookie; @@ -67,7 +67,7 @@ xcb_atom_t intern_atom_fast_reply(xcb_connection_t *c, intern_atom_fast_cookie_t free(reply); } else - cookie.u.atom.xid = 0; + cookie.u.atom = XCB_NONE; break; } return cookie.u.atom; @@ -75,9 +75,9 @@ xcb_atom_t intern_atom_fast_reply(xcb_connection_t *c, intern_atom_fast_cookie_t const char *get_atom_name_predefined(xcb_atom_t atom) { - if(atom.xid <= 0 || atom.xid > (sizeof(atom_names) / sizeof(*atom_names))) + if(atom <= 0 || atom > (sizeof(atom_names) / sizeof(*atom_names))) return 0; - return atom_names[atom.xid - 1]; + return atom_names[atom - 1]; } int get_atom_name(xcb_connection_t *c, xcb_atom_t atom, const char **namep, int *lengthp) |