|
9fbcf6bb
|
2013-02-08T13:56:41
|
|
expr: take xkb_mod_set instead of the entire keymap
The modifier-resolving functions only need the modifier information.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
a1124b59
|
2012-10-06T17:42:21
|
|
expr: unify the real and virtual modifier functions
This again pushes the mod type annotation to the original call site, to
make it easier to grep to see where the real/virtual distinction
matters.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
424de613
|
2012-10-05T22:46:21
|
|
Keep real and virtual mods in the same table in the keymap
We change the keymap->vmods array into keymap->mods, and change it's
member type from struct xkb_vmod to struct xkb_mod. This table now
includes the real modifiers in the first 8 places. To distinguish
between them, we add an enum mod_type to struct xkb_mod.
Besides being a more reasonable approach, this enables us to share
some code later, remove XKB_NUM_CORE_MODS (though the 0xff mask still
appears in a few places), and prepares us to flat out remove the
distinction in the future. This commit just does the conversion.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
6974e1f9
|
2012-10-05T21:40:49
|
|
expr: don't expose LookupModIndex
The Lookup* functions should remain a private implementation detail of
the expr.c file.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
aed3140e
|
2012-10-05T21:06:34
|
|
Remove VModInfo for now
VModInfo currently is only used to track which virtual modifiers were
declared in the file which owns the VModInfo. This, in turn, is only
used in ResolveVirtualModifier, which in turn is only used to resolve
the virtualModifier field in an interpret statement (compat.c). In other
words, it is used to ensure that interprets can only use a vmod which
was declared in the same map.
We remove this now, because it doesn't do much and distracts from other
changes; we will later re-add it properly. Specificly, we will make it
so that virtual modifiers are not the exception in that they modify the
keymap directly, instead of keeping the changes in some *Info struct and
commiting them to the keymap at the end of the compilation. (This is bad
because if a vmod is added to the keymap, and then the compilation of
this specific file fails, the change sticks around nonetheless).
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
fcd20290
|
2012-09-21T14:44:17
|
|
Don't use xkbcommon-compat names in internal code
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
82de180e
|
2012-09-11T15:09:37
|
|
Remove unused ExprResolveKeyName
The only user was removed in 314965b1.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
f5dffd2b
|
2012-08-21T11:21:19
|
|
kbproto untanglement: XkbKeyNameLength
Define it ourselves as XKB_KEY_NAME_LENGTH and use that, instead of the
one from XKB.h.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
af2a8b3a
|
2012-09-02T21:45:42
|
|
Unify some string tables from xkbcomp, text and keymap-dump
We move the LookupEntry struct from expr.h to text.h, along with most of
the lookup tables. This makes them available everywhere.
Looking up a value in the LookupEntry format is slower than direct index
mapping, but it allows multiple names per value (with the canonical one
being first) and "all"- and "none"-type masks. These functions are not
used anywhere efficiency matters.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
1a996883
|
2012-08-31T19:05:49
|
|
expr: make ResolveString return an atom
Almost all callers do xkb_atom_intern on the currently returned string,
while ResolveString converts the atom to the string to begin with...
uselss double work.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
d3ddcf70
|
2012-08-15T21:45:02
|
|
expr: move op_type/value_type_to_string functions to ast
Generally the enum-to-string function should appear where the enum is
defined.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
cdc228ea
|
2012-08-13T11:00:43
|
|
Organize xkbcomp/ header files
Various non-functional changes:
- Re-add keycodes.h and move some stuff there.
- Add parser-priv.h for internal bison/flex stuff.
- Don't include headers from other headers, such that file dependencies
are immediate in each file.
- Rename xkbcomp.h -> ast.h, parseutils.{c,h} -> ast-build.{c,h}
- Rename path.{c,h} -> include.{c,h}
- Rename keytypes.c -> types.c
- Make the naming of XkbFile-related functions more consistent.
- Move xkb_map_{new,ref,unref} to map.c.
- Remove most extern keyword from function declarations, it's just
noise (XKB_EXPORT is what's important here).
- Append XKBCOMP_ to include guards.
- Shuffle some code around to make all of this work.
Splitting this would be a headache..
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
59d947c9
|
2012-08-05T19:24:44
|
|
Add and use xkb_level_index_t
Several types are used over the code for shift levels; better to use
just one.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
6f08a2cf
|
2012-08-03T00:33:40
|
|
expr: constify function arguments
We need this for later.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
41d9afc5
|
2012-07-27T15:31:03
|
|
Remove ExprResult
Convert the IdentLookup typedef away from ExprResult, which drags along
everything else. This should also make all of the conversions explicit.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
bd927abf
|
2012-07-24T19:39:59
|
|
expr: drop ExprResult from ResolveEnum
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
38614c88
|
2012-07-24T17:21:29
|
|
expr: drop ExprResult from ResolveMask
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
025ca579
|
2012-07-23T12:20:05
|
|
expr: drop ExprResult from ResolveLhs
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
e258f9ee
|
2012-07-24T00:10:07
|
|
expr: drop ExprResult from ResolveGroup
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
2e4933cd
|
2012-07-24T10:39:15
|
|
expr: drop ExprResult from ResolveInteger
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
6ec13570
|
2012-07-24T00:51:19
|
|
expr: drop ExprResult from ResolveLevel
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
000528dd
|
2012-07-24T00:23:34
|
|
expr: drop ExprResult from ResolveKeyCode
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
27f94929
|
2012-07-23T15:46:50
|
|
expr: drop ExprResult from ResolveString
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
d5682289
|
2012-07-24T01:22:26
|
|
expr: drop ExprResult from ResolveButton
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
70262292
|
2012-07-23T23:56:28
|
|
expr: drop ExprResult from ResolveKeysym
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
0d262fa1
|
2012-07-23T19:52:17
|
|
expr: drop ExprResult from ResolveBoolean
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
761b675c
|
2012-07-23T11:56:13
|
|
expr: drop ExprResult from ResolveKeyName
Explicit is better than implicit, and this union makes it hard to follow
what's what, particularly the confusion with ival/uval.
The other Resolve functions will follow.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
724f62c8
|
2012-07-25T17:29:08
|
|
Convert defines to enums in xkbcomp.h
For statement / expression types.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
112cccb1
|
2012-07-23T16:03:34
|
|
Some atom related optimizations
We often get a strdup'd string, just to pass it over the atom_intern and
then immediately free it. But atom_intern then strdup's it again (if
it's not interned already); so instead we can have the interning "steal"
the memory instead of allocing a new one and freeing the old one. This
is done by a new xkb_atom_steal function.
It also turns out, that every time we strdup an atom, we don't actually
modify it afterwards. Since we are guaranteed that the atom table will
live as long as the context, we can just use xkb_atom_text instead. This
removes a some more dynamic allocations.
For this change we had to remove the ability to append two strings, e.g.
"foo" + "bar" -> "foobar"
which is only possible with string literals. This is unused and quite
useless for our purposes.
xkb_atom_strdup is left unused, as it may still be useful.
Running rulescomp in valgrind, Before:
==7907== total heap usage: 173,698 allocs, 173,698 frees, 9,775,973 bytes allocated
After:
==6348== total heap usage: 168,403 allocs, 168,403 frees, 9,732,648 bytes allocated
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
2e245a9a
|
2012-07-23T11:42:22
|
|
expr: Remove ExprResolveFloat
Remnant from geometry.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
d659f2b4
|
2012-07-21T15:12:31
|
|
expr: use new log functions
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
7d9f0313
|
2012-07-15T13:00:04
|
|
Get rid of struct xkb_key_name
Just embed it directly.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
9308a460
|
2012-07-17T10:20:15
|
|
Run source tree through uncrustify
.uncrustify.cfg committed for future reference also, but had to manually
fix up a few things: it really likes justifying struct initialisers.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
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>
|
|
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.]
|
|
cdd2906d
|
2012-05-09T13:50:05
|
|
Make the context available for XkbcAtomText
And rename the function to xkb_atom_text.
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Updated for xkb -> keymap.]
|
|
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.]
|
|
38cb6390
|
2012-05-09T15:15:30
|
|
Change all 'xkb' xkb_keymap names to 'keymap'
To make it a bit more clear what it actually is.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
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>
|
|
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.]
|
|
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.]
|
|
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>
|
|
24c61d0f
|
2012-03-10T14:27:06
|
|
Remove half-implemented radio groups
It looks like this could never have worked anyway, what with num_rg
always being 0 everywhere. Remove it.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
a0e756fd
|
2012-03-09T19:09:25
|
|
Introduce xkb_atom_t type
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
d2c3dd0c
|
2012-03-02T22:31:29
|
|
Constify some more text functions
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
eb738b13
|
2012-03-02T17:40:19
|
|
Constify global tables
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
43ed3ff0
|
2012-02-20T17:14:04
|
|
Switch expression resolution priv from char to void
Avoids a lot of really lame casts.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
11ea0791
|
2012-02-20T17:07:48
|
|
Invert LookupModMask/LookupVModMask order
We never want to solely lookup a virtual modifier without also looking
up core modifiers. So, rather than chaining the vmod lookup inside the
core modifier lookup, invert the ordering.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
55e058f8
|
2012-02-20T16:59:51
|
|
Move some definitions from expr.h to expr.c
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
90d86c36
|
2012-02-20T16:54:54
|
|
Remove field reference lookup support
None of the lookup functions anyone ever used supported field
references, so don't pretend we do in the API.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
91b89852
|
2012-02-20T16:24:02
|
|
Turn ExprResolveInteger into a simple wrapper
Move the bulk of ExprResolveInteger into an internal function called
ExprResolveIntegerLookup, and introduce ExprResolveInteger as a simple
wrapper which doesn't take priv/lookup arguments.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
e314931e
|
2012-02-20T15:47:57
|
|
Add ExprResolveGroup helper
Just a dumb wrapper around ExprResolveInteger.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
8b47dbbf
|
2012-02-20T15:47:38
|
|
Add ExprResolveButton helper
Just a dumb wrapper around ExprResolveInteger.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3431a089
|
2012-02-20T15:37:53
|
|
Introduce ExprResolveLevel helper
Which returns an integer representing the level number represented by
the given expression.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
193e9b39
|
2012-02-20T15:33:40
|
|
Introduce ExprResolveRadioGroup helper
Just a tiny special-cased version of ExprResolveInteger.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
26285a7b
|
2012-02-20T14:15:08
|
|
Remove priv arguments from ExprResolveString
They've never been used.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b7b49eb0
|
2012-02-20T14:10:41
|
|
Remove priv arguments from ExprResolveKeySym
They've never been used by its one caller.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
70033b13
|
2012-02-20T14:08:55
|
|
Remove priv arguments from ExprResolveKeyName
They've never been used.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
482d4faa
|
2012-02-20T13:44:27
|
|
Remove priv arguments from ExprResolveBoolean
They've never been used.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
94041575
|
2012-02-20T13:40:34
|
|
Remove priv arguments from ExprResolveFloat
They've never been used.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3151ce36
|
2012-02-20T13:34:36
|
|
Remove priv arguments from ExprResolveModMask
What with them now being unused and all.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
67605d2c
|
2012-02-20T13:32:09
|
|
Introduce ExprResolveVModMask
Which is just a slightly more typesafe wrapper around the chained
ExprResolveModMask everyone was using earlier.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
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>
|
|
73ca959d
|
2010-09-27T16:05:52
|
|
Dead code removal and static markup
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
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.
|
|
47d3b396
|
2010-06-28T06:50:12
|
|
Drop CARD32 and Opaque types
|
|
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>
|
|
5c910623
|
2009-04-04T09:19:51
|
|
Remove trailing spaces in source files
|
|
4fe322aa
|
2009-03-27T20:13:22
|
|
libxkbcomp: s/XPointer/char */
Replace XPointer with its definition since we don't have the privilege
of using Xlib.h. Why this is char * and not void *, I'll never know.
|
|
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.
|