Daniel Stone
28e66a703a
Fix multiple errors when merging symbol definitions
...
We were getting the size calculation wrong, as well as inconsistently
picking a merge strategy.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-04 12:54:54 +01:00
Daniel Stone
f43f75fb83
dump
2012-06-02 15:29:21 +01:00
Daniel Stone
f531d1e16d
keymap-dump: Print NoAction actions too
...
The failure mode here is a little irritating:
- server loads map with ISO_Lock action
- server dumps keymap to string, including:
interpret ISO_Lock+AnyOfOrAll(None) {
action= NoAction();
};
as we don't (yet) print ISO_Lock actions
- client parses keymap from string
- client dumps keymap to string, including:
interpret ISO_Lock+AnyOfOrAll(None) {
};
- this results in a syntax error
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-02 15:25:36 +01:00
Daniel Stone
c87468e926
stringcomp: NULL-terminate string
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-29 16:19:24 +01:00
Daniel Stone
a3ae0e84e4
Pass merge down through indicator creation
...
To avoid using potentially undefined memory.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-29 16:19:17 +01:00
Daniel Stone
243daf80d0
Add test for xkb_map_new_from_string
...
Using data from xkb_map_get_as_string.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-29 15:08:35 +01:00
Daniel Stone
ebd397e184
Add xkb_map_get_as_string
...
Returns a newly-allocated string representing the specified keymap.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-29 15:07:18 +01:00
Daniel Stone
208d957806
Fix signed vs. unsigned confusion in actions
...
Some actions could also take relative rather than absolute parameters,
so they really needed to be signed instead of explicitly unsigned.
Oops.
Fixes, e.g., action= MovePtr(x=-1,y=+1), which was reported as
(x=+65535,y=+1).
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-25 18:02:19 +01:00
Ran Benita
ccc047c4e0
compat: use darray for acts and key_acts in the server map
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 18:02:40 +03:00
Ran Benita
89c5e88603
keycodes: use darray in KeyNamesInfo
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 15:45:42 +03:00
Ran Benita
07c88b551b
symbols: use darray for xkb_sym_map
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 15:20:47 +03:00
Ran Benita
4daa34b5a3
keytypes: use darray for level names
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:24 +03:00
Ran Benita
ee990d53a5
symbols: use darray for KeyInfo
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:24 +03:00
Ran Benita
dcdbd14925
parser: use darray for keysym list
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:24 +03:00
Ran Benita
c65a3596ae
keytypes: use darray for xkb_kt_map_entry's
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:24 +03:00
Ran Benita
374b0c9814
alloc: use darray in xkb_key_names
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:24 +03:00
Ran Benita
c2ac3a2b20
keytypes: use darray for key types in the client map
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:23 +03:00
Ran Benita
561504162f
compat: use darray for sym_interprets
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:23 +03:00
Ran Benita
d0288bb288
context: use darray for include paths
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:23 +03:00
Ran Benita
ef51b572aa
atom: use darray for the node_table
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:23 +03:00
Ran Benita
0c271e093a
rules: use darray for input line
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:23 +03:00
Ran Benita
28bbb7dc51
rules: use darray for rules and groups
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:23 +03:00
Ran Benita
c815ff96d9
Import darray.h for common dynamic array code
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:23 +03:00
Ran Benita
cb047bb0fc
Constify a static variable
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 14:19:23 +03:00
Ran Benita
9e72a6a7af
Fix incorrect indexing while freeing
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-22 08:50:25 +03:00
Ran Benita
869c687190
rules: add test
...
Add a non-extensive test to check that some basic things (e.g. rule
matching, var substitution, indexes and groups) work as expected.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:49 +03:00
Ran Benita
68edd5f0df
rules: allow wildcard match against "" layout/varaint
...
Currently, if you pass in an rmlvo with an empty string for layout or
variant, it would not match layout and variant rules even with
wildcards. But if the rules file had set an appropriate default, and someone
passes in the empty string, than he should get the default.
NULL in this case signifies not wanting to match against the layout or
variant at all, and so the rule should still fail to match NULLs.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:49 +03:00
Ran Benita
c900c41760
rules: remove struct var_defs
...
We can just use struct xkb_rule_names which we already receive as an
argument.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:49 +03:00
Ran Benita
3d28b6d116
rules: reformat components_from_rules
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:49 +03:00
Ran Benita
7895eeb8ce
rules: reformat LoadRules and XkbRF_Free
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:49 +03:00
Ran Benita
d18cf31595
rules: remove unused struct describe_vars
...
It's not actually used for anything.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:49 +03:00
Ran Benita
56b125fcc7
rules: reformat AddRule and AddGroup
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:49 +03:00
Ran Benita
f790257fa7
rules: reformat GetComponents
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:49 +03:00
Ran Benita
52939d4bea
rules: reformat SubstituteVars
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
a9477b5754
rules: reformat CheckApplyRules and ApplyPartialMatches
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
a47dd25219
rules: reformat CheckGroup and CheckApplyRule
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
18d331b86b
rules: rewrite MatchOneOf
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
c02c9ab2f2
rules: reformat ApplyRule
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
06205717c3
rules: reformat MakeMultiDefs
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
f7de62861f
rules: use asprintf instead of _Concat function
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
5f54764d0d
rules: reformat CheckLine and break into several functions
...
And remove struct file_spec which is really unneeded. Should be
slightly more clear now.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
2df35895b5
rules: reformat SetUpRemap and struct remap_spec
...
Rename to more descriptive names and reformat.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
b8ae68c2a3
rules: rewrite get_index to use sscanf
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
ef76ba97b3
rules: don't typedef the structs and rename them
...
The long prefix is unnecessary now that they are all private.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
478a6a31d5
rules: reformat input line handling
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
72d1f2edef
rules: don't use custom logging functions
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
b73bd67615
rules: only export a single function
...
Really all we need from this file is a way to get xkb_component_names
from an xkb_rule_names, which is now the only thing being exposed. This
should allow for some much needed refactoring of this code.
Since this is only used by xkbcomp.c and uses xkbcomp functions, also
move rules.{c,h} under the xkbcomp dir.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
0c25ebf341
rules: remove unused struct fields and use size_t
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:48 +03:00
Ran Benita
beccc37509
Don't run the benchmark by default
...
For people running 'make check' on every compilation, this can be
a nuisance.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-20 20:31:19 +03:00
Ran Benita
db3e8f2c08
Create path.h for the path.c functions
...
No need to stash them in xkbcomp-priv.h; files which need the functions
should explicitly include them.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-05-19 02:21:26 +03:00