src/xkbcomp/parseutils.h


Log

Author Commit Date CI Message
Daniel Stone 7b00485a 2012-05-11T15:03:43 Rename 'ctx' back to 'context' in external API Still keep things as 'ctx' internally so we don't have to worry about typing it too often, but rename the user-visible API back as it was kinda ugly. This partially reverts e7bb1e5f. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita e7bb1e5f 2012-05-09T15:03:11 Shorten context to ctx (This breaks the API.) "context" is really annoying to type all the time (and we're going to type it a lot more :). "ctx" is clear, concise and common in many other libraries. Use it! Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Fix for xkb -> keymap change.]
Ran Benita 8d680e80 2012-05-09T12:01:03 Make the context available for XkbcAtomGetString In preparation of contextualizing atom handling. Since we touch every function call, we also rename the function to xkb_atom_strdup to match xkb_atom_intern, and be more descriptive. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated for xkb -> keymap.]
Ran Benita 4aef083e 2012-05-09T11:29:04 Contextualize XkbFile IDs Currently the IDs are assigned from a static variable inside CreateXKBFile. This can lead to some unpleasantness with threads, so maintain the counter in the context instead. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 64aa5c95 2012-05-09T11:12:30 Make the context available to the parser We will need the context to remove some global state. Also make the Parse* function just return bool while wer'e at it. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 33273304 2012-05-08T13:57:07 Rename xkbcomp/misc.h to xkbcomp-priv.h and use it The include dependencies were quite convoluted, where you change the order and get a ton of errors. Instead, change one file to act as the internal interface for the xkbcomp files, and make every file use it. Also drop the pointless "xkb" prefix to file names. Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 70dfe166 2012-05-07T14:23:46 Rename YYLTYPE to struct YYLTYPE Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita 5fb494ec 2012-04-11T14:13:24 Remove unused debugging function Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita a641a185 2012-04-06T03:38:55 Use stdbool.h 'Cause defining your own True and False is so 1990's. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Fixed for xkb_desc -> xkb_keymap changes.]
Ran Benita a39ed85f 2012-04-05T11:24:39 Fix formatting in xkbcomp headers Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Fixed for xkb_desc -> xkb_keymap change.]
Ran Benita 913e0740 2012-03-31T01:18:55 Constify a global table and function arguments Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita e9537d50 2012-04-08T20:58:39 Fix possible overflow in scanner Also reduce the size of scanBuf given that it's allocated on the stack, and 1024 is enough. Signed-off-by: Ran Benita <ran234@gmail.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 bb6ca768 2012-03-27T22:41:22 Make parser and scanner reentrant All global state is removed from the parser and scanner. This makes use of the standard facilities in Bison and Flex for reentrant/pure scanner/lexer and location tracking. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated to current sources.]
Daniel Stone 94521658 2012-03-15T09:34:20 Plug leaks in geometry parsing When parsing a geometry file, don't leak the elements we've created. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 17bcc4c1 2012-03-09T19:29:29 Remove geometry even harder Not the most elegant fix, but will do for now. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone a0e756fd 2012-03-09T19:09:25 Introduce xkb_atom_t type Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 0bb24c2d 2012-03-09T19:03:59 Introduce xkb_keysym_t type Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Ran Benita c357a11a 2012-03-01T21:20:45 Add function to free XkbFile's Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita eff72fab 2012-02-25T11:53:01 Fix warnings in scanner and parser Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita f3e4335f 2012-02-24T16:07:17 Fix all constness warnings These are all trivial/obvious fixes which clear a bunch of warnings. Signed-off-by: Ran Benita <ran234@gmail.com>
Ran Benita 9ad0be33 2012-02-24T10:04:16 Remove unused debug #defines Signed-off-by: Ran Benita <ran234@gmail.com>
Daniel Stone 83f18b1c 2012-02-15T19:39:33 Fix xkbparse.y compilation Thanks to autotools happily building stale generated sources, I hadn't actually ever built my xkbparse.y changes. Fix that so it not only compiles, but works. This seems to parse long keycodes correctly, although I very much would not recommend testing this by declaring 0x1fffffff as your highest keycode. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Cyril Brulebois f91afe4f 2011-06-03T17:19:09 Add prototype for CheckDefaultMap(). Those warnings disappear accordingly: | CC parseutils.lo | parseutils.c:742: warning: no previous prototype for ‘CheckDefaultMap’ | CC xkbscan.lo | xkbscan.l: In function ‘XKBParseString’: | xkbscan.l:220: warning: implicit declaration of function ‘CheckDefaultMap’ | xkbscan.l:220: warning: nested extern declaration of ‘CheckDefaultMap’ Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Cyril Brulebois <kibi@debian.org>
Jan Engelhardt f8301ebc 2010-11-11T23:27:21 xkbscan: resolve build warning/rpmlint error xkbscan.l: In function 'setScanState': xkbscan.l:201:1: warning: control reaches end of non-void function I: Program returns random data in a function E: libxkbcommon no-return-in-nonvoid-function xkbscan.l:201 Change return type of setScanState to void, since a return value is never used by its callers. Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Kristian Høgsberg a84c0879 2010-10-19T21:57:59 Use flex for generating the scanner, add support for parsing from strings Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
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 47d3b396 2010-06-28T06:50:12 Drop CARD32 and Opaque types
Daniel Stone b3852542 2010-06-21T14:27:58 Interp: More lazy keysym resolution Resolve the keysyms when we create an InterpDef, rather than directly in the parser. 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 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 e564235b 2010-06-15T19:43:14 xkbcomp: Don't malloc() and free() most scanned tokens Use a constant buffer instead. Sigh. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Daniel Stone 240a0c34 2010-06-15T19:38:16 xkbcomp: Lazy keysym parsing (avoid XStringToKeysym) Instead of calling XStringToKeysym on every keysym we parse, store it as a string until we need to store it in an actual keymap. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Dan Nicholson 5c910623 2009-04-04T09:19:51 Remove trailing spaces in source files
Dan Nicholson 0c1bbb05 2009-03-27T06:55:32 Import xkbcomp sources for CompileKeymap A copy of the xkbcomp sources (except the frontend) have been copied in to provide a means to compile a XkbDescPtr. This definitely doesn't build or do the right thing yet.