src/malloc.c


Log

Author Commit Date CI Message
Daniel Stone ef88c7ef 2012-04-03T15:14:16 Rename xkb_desc to xkb_keymap struct xkb_desc was just a hangover from the old XkbDescRec, which isn't a very descriptive name. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 632d9f03 2012-04-03T14:26:04 Eliminate remaining gcc warnings Various one-liners (mostly removing unused variables) to make the code safe for the full set of warnings used by the xorg macros. On Debian-based systems, flex generates incorrect code resulting in two warnings about yy_getcolumn and yy_setcolumn having no previous declaration despite being non-static. Fedora carries a patch to fix this, and a bug has been filed on Debian's flex to add the patch: http://bugs.debian.org/667027 Aside from this, it's now safe for --enable-strict-compilation. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone cc5588c6 2012-03-29T17:39:11 Fail gracefully on failure to find component include If we can't find the component of the include file we're looking for, make sure we don't return success when we meant failure, segfault, or spectacularly leak everything. Tested with incorrect component includes for keycodes, compat, symbols, and types. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reported-by: David Herrmann <dh.herrmann@googlemail.com>
Daniel Stone 93ce9c7d 2012-03-29T16:31:09 Full support for multiple keysyms per level Which also involved moving the global symbol map to be per-key instead; this should probably be split out into a separate commit. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 602e8780 2012-03-24T13:27:48 Define our own NoSymbol value and use it Since we have our own xkb_keysym_t type, it makes sense to have our own NoSymbol value instead of the one from X11/X.h. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 2165e16e 2012-03-24T02:36:11 Fix all -Wsign-compare warnings i.e comparison of signed and unsigned values. These are mostly harmless but fixing them allows to compile cleanly with -Wextra. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 813ddf25 2012-03-24T00:29:33 Silence -Wcast-qual warnings There are some cases where we must free a string with a const qualifier. Add a macro UNCONSTIFY to trick the compiler into silencing the warning in the cases where we know what we're doing. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 3104a8ef 2012-03-24T00:12:08 Move utility macro from XKBcommonint.h to utils.h And merge all the similar ones into the same name. The u* prefix is chosen over the _Xkb prefix because it has more uses throughout the codebase. But It should now be simple to choose a nice prefix and stay consistent. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: fixed for the case where we have strcasecmp]
Daniel Stone 0bb24c2d 2012-03-09T19:03:59 Introduce xkb_keysym_t type Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 731e5c40 2012-03-09T18:53:47 Stringify public name types Ensure that all names under xkb_desc are strings, rather than atoms. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita a64e9708 2012-03-02T15:56:03 Remove unneeded freeing mechanisms Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 4bc839ab 2012-02-29T20:50:17 Use memset instead of bzero Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 6a34e4e1 2012-02-29T19:56:39 Don't check for NULL before free() Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 4e228511 2012-02-15T14:34:08 Introduce xkb_keycode_t for keycodes And use it consistently everywhere, including with a special long-safe internal keycode type, to ease the transition to large keycodes. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone ead9d0cb 2012-02-15T11:49:10 Move include path from X11/extensions/ to xkbcommon/ Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Adam Jackson 73ca959d 2010-09-27T16:05:52 Dead code removal and static markup Signed-off-by: Adam Jackson <ajax@redhat.com>
Kristian Høgsberg 9f602686 2010-07-01T14:35:24 Pull in enough structs and defines from XKBstr.h to only need XKB.h We want to move away from sharing implementation structs and let libX11 and libxkbcommon use each their own set of structs.
Kristian Høgsberg 0ece2cdb 2010-06-30T16:56:24 Drop more malloc/free wrappers
Kristian Høgsberg 9258cc3d 2010-06-30T13:31:21 Rename Xkbc*Action to struct xkb_*_action
Kristian Høgsberg 47d3b396 2010-06-28T06:50:12 Drop CARD32 and Opaque types
Daniel Stone 2fb329c9 2010-06-23T16:25:10 Copy and duplicate XkbModsRec and XkbKTMapEntryRec Copy these types in so we can extend the vmod size. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 7257d4c8 2010-06-21T14:28:34 Use CARD32 instead of Atom, move geom headers in Use CARD32 instead of Atom/KeySym/et al to avoid type size confusion between server and non-server code; relatedly, move the geometry headers in from kbproto, so every non-simple type (i.e. structs containing nothing more than basic types) is now copied into xkbcommon. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 15b0db54 2010-06-17T05:56:08 Copy in XkbCompatMapRec and XkbSymInterpretRec These contain actions, so transition them ahead to XkbcAction and move them into XKBcommon.h. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 60e7eeeb 2010-06-17T03:16:09 Use CARD32 instead of Atom, drag in XkbClientMapRec On 64-bit architectures, XID varies in size between the server (always 32 bits), and non-server (always unsigned long) for some inexplicable reason. Use CARD32 instead to avoid this horrible trap. This involves dragging in XkbClientMapRec so we don't get stuck in the KeySym trap. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone d2d787df 2010-06-17T00:51:49 Regroup actions into current vs. deprecated, resize vmod Use Xkbc* for all our actions that we intend to keep around, and Xkb* for deprecated ones we can hopefully get rid of, at least internally. While we're at it, make vmods be a uint32_t. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Dan Nicholson 6a84a34d 2009-04-08T07:46:25 Remove all non-public API from XKBcommon.h header The noble intention was to expose all the new API and new generic types in the split out kbproto headers through XKBcommon.h. It turns out that would be a massive amount of work in the server. Someday, but first just wedging in XkbCompileKeymap* would be good. Most of the API is in new internal xkb*.h headers. In order to allow the XKBcommon.h header to be used from the server, we can't pull in other headers from kbproto since the server has its own copies. However, types that are different (XkbDescRec, XkbAction) still have Xkbc equivalents here, and I think they should be used in the server.
Dan Nicholson 8b100fc0 2009-04-05T15:15:20 Add action datatypes as defined in the server Some of the XkbAction types are defined differently in the server, so we add those to XKBcommon.h and use them here like XkbcDescPtr. We'll have to deal with the impedance mismatch on the client side later.
Dan Nicholson e0e77b71 2009-04-05T09:30:15 Coding style cleanup on key allocation functions
Dan Nicholson e86b31ce 2009-03-29T08:11:25 Add XKBlib resizing functions These were originally in XKBMalloc.c.
Dan Nicholson fe94593d 2009-03-28T18:17:34 malloc/misc/xkb: Coding style cleanup
Dan Nicholson 5315e5d1 2009-03-28T17:55:46 Add XKBlib API to support keytypes Added common variants of XkbComputeEffectiveMap, XkbInitCanonicalKeyTypes and all their needed functions. A couple functions that were in alloc.c moved to malloc.c to mirror the libX11 sources better. Original code in libX11/src/xkb/XKBMalloc.c libX11/src/xkb/XKBMisc.c libX11/src/xkb/XKB.c