summaryrefslogtreecommitdiff
path: root/src/xcb_list.c
AgeCommit message (Collapse)Author
2021-09-30Avoid request counter truncation in replies map after 2**32 requestsRan Benita
The c->in request counters are uint64_t, and can realistically go over 2**32 over a lifetime of a client. The c->in->replies map however uses unsigned int keys and the passed request numbers are silently truncated. I haven't analyzed in depth what happens what it wraps around but it's probably nothing good. The only user of the xcb_list.c map code is c->in->replies, so just change it to use uint64_t keys. Reviewed-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Ran Benita <ran@unusedvar.com>
2013-08-06Define _xcb_map_new with explicit void arg list instead of empty oneAlan Coopersmith
Fixes Solaris Studio compiler warning: "xcb_list.c", line 50: warning: old style function definition and gcc warning: xcb_list.c: In function '_xcb_map_new': xcb_list.c:50:11: warning: old-style function definition [-Wold-style-definition] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
2012-08-25Always include "config.h" at the start of all C source files.Alan Coopersmith
Allows configure to set defines such as _POSIX_SOURCE in config.h that affect functions exposed by system headers and get consistent results across all the source files. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2006-09-23The Great XCB RenamingJosh Triplett
Rename API to follow a new naming convention: * XCB_CONSTANTS_UPPERCASE_WITH_UNDERSCORES * xcb_functions_lowercase_with_underscores * xcb_types_lowercase_with_underscores_and_suffix_t * expand all abbreviations like "req", "rep", and "iter" Word boundaries for the names in the protocol descriptions fall: * Wherever the protocol descriptions already have an underscore * Between a lowercase letter and a subsequent uppercase letter * Before the last uppercase letter in a string of uppercase letters followed by a lowercase letter (such as in LSBFirst between LSB and First) * Before and after a string of digits (with exceptions for sized types like xcb_char2b_t and xcb_glx_float32_t to match the stdint.h convention) Also fix up some particular naming issues: * Rename shape_op and shape_kind to drop the "shape_" prefix, since otherwise these types end up as xcb_shape_shape_{op,kind}_t. * Remove leading underscores from enums in the GLX protocol description, previously needed to ensure a word separator, but now redundant. This renaming breaks code written for the previous API naming convention. The scripts in XCB's tools directory will convert code written for the old API to use the new API; they work well enough that we used them to convert the non-program-generated code in XCB, and when run on the old program-generated code, they almost exactly reproduce the new program-generated code (modulo whitespace and bugs in the old code generator). Authors: Vincent Torri, Thomas Hunger, Josh Triplett
2006-02-27_xcb_list is no longer used, so remove it. Simplify _xcb_map.Jamey Sharp
2006-02-26Delete unused xcb_list functions and refactor others.Jamey Sharp
2006-02-26Replace current_reply generic queue with hand-written version. No generic ↵Jamey Sharp
queues remain so delete their implementation.
2006-02-18Remove xcl and CVSROOT.Josh Triplett