Daniel Stone
3d38da0c5b
Fix leak in xkbcomp.c
...
Accidentally regressed this one briefly, oops.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 17:04:36 +00:00
Daniel Stone
54aa839c0e
Remove component listing code
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 12:00:54 +00:00
Daniel Stone
3ee370e969
Remove unused control members
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 12:00:54 +00:00
Daniel Stone
5dd817339d
Add a tiny bit of documentation to xkbcommon.h
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-14 11:56:59 +00:00
Daniel Stone
bc07452542
Add xkb_key_get_syms API
...
(And a slight cosmetic header reformatting.)
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-13 19:06:05 +00:00
Daniel Stone
9dde0f3371
Revert "Use XKB_COMMON_* modifier defines in ExprResolveModMask"
...
Because indices and masks are not at all the same thing.
This reverts commit 645275406f
.
2012-03-13 12:46:37 +00:00
Daniel Stone
645275406f
Use XKB_COMMON_* modifier defines in ExprResolveModMask
...
Rather than the ones from XKB.h.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 14:42:30 +00:00
Daniel Stone
f9b3a14e08
Remove overlay support as well
...
Right now we just silently ignore overlay controls, which is probably
bad, but it's not the easiest to fix.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 14:36:30 +00:00
Daniel Stone
24c61d0f78
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>
2012-03-10 14:27:06 +00:00
Daniel Stone
e7c8bac79d
Remove indirect XkbCM* and XkbSM* macros
...
The XkbKey* macros used to work through XkbCM* and XkbSM* variants, for
the xkb_map and xkb_server_map respectively; the latter versions weren't
used by anyone at all, so just bin them and make the macros work
directly.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 14:08:43 +00:00
Daniel Stone
671ab1bf8f
Handle XkbFiles without a name
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 13:54:03 +00:00
Daniel Stone
c8fd3ea4b6
Move allocation of xkb_desc into CompileKeymap
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-10 13:48:13 +00:00
Daniel Stone
971eb485c5
Clean up xkb_keysym_to_string message
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 20:01:33 +00:00
Daniel Stone
17bcc4c163
Remove geometry even harder
...
Not the most elegant fix, but will do for now.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
a0e756fd83
Introduce xkb_atom_t type
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
0bb24c2d23
Introduce xkb_keysym_t type
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
d67a94d374
Remove atom functions from public API
...
They're no longer needed since we don't expose any atoms in the
published API anymore. As a result, we don't need to support external
atom implementations either. Result!
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
731e5c40bc
Stringify public name types
...
Ensure that all names under xkb_desc are strings, rather than atoms.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
57b551a418
Ensure we always have a complete keymap
...
Refuse to compile without keycodes + compat + types + symbols.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
b8e950defd
filecomp: Fix xkbcomp warning
...
Ironically, the test for named.xkb included a call that relied on the
default keymap, without the file naming an explicit default. Go figure.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:31 +00:00
Daniel Stone
4bc451bf08
Convert CompileKeymap to early-return style
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
59e03bf5f2
Use compile_keymap in xkb_compile_keymap_from_components
...
We already had this exact function sitting right next to us, so use it
rather than open-coding.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
73919568b0
Add explicit braces
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
aa41ab2918
xkbcomp: Turn an array into an anonymous struct
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
ed5c6c1796
Remove geometry support, again
...
It still parses geometry, but happily throws it away.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 19:30:30 +00:00
Daniel Stone
b28823cc59
Remove KcCGST names from the map
...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-09 16:04:00 +00:00
Daniel Stone
ed18e65eac
Merge remote-tracking branch 'ran/fixes-cont'
...
Conflicts:
src/xkbcomp/expr.c
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-05 15:07:28 +00:00
Daniel Stone
65e1ff2f0a
Merge remote-tracking branch 'ran/fixes'
2012-03-05 15:00:39 +00:00
Ran Benita
e4b4d6b051
Fix "Could not resolve keysym" errors
...
On many layouts, the following error appears:
Internal error: Could not resolve keysym 10005b0
(Which is like the trademark of libxkbcommon now, and makes
unicode-heavy symbol files pretty useless).
This occurs when a keysym string (in this case, 10005b0) is passed to
xkb_string_to_keysym, but cannot be resolved.
This in turn happens because the parser passes on hexadecimal keysym
strings without the leading "0x", thus leaving the resolving function
without a way to disambiguate it as a number.
Therefore, make sure to pass on the "0x". The file symbols.c in xkbcomp
project does the same; it probably got lost in translation.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
2473444f92
Refactor XkbFindFileInPath
...
Also fixes a bug, where the check (typeLen < 1) should have been
(pathLen < 1).
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
19e99bb27a
Free all atoms along with keymap
...
The code to do this is taken from xserver, dix/atom.c.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
d94d9b4522
Free IncludePath when no longer needed
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
1e6f956e36
Free scanFile when no longer needed
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
e4447f8131
Fix other misc leaks
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
30d88b93e7
Don't leak the scanner's buffer
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
c24d97e45e
Don't leak DoodadInfo's from GeometryInfo
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
c800c60ace
Don't leak ActionInfo's
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
d67e73bdbd
Don't leak KeyNamesInfo
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
5c40bee62a
Don't leak the "minimum"/"maximum" string
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
c50c87bca2
Don't leak the various *Info's names when overriding them
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
889a299e3b
Free XkbFile's when no longer needed
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
c357a11aa6
Add function to free XkbFile's
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:04:04 +02:00
Ran Benita
3216ecc07f
Don't cache loaded rules files
...
This needlessly occupies memory for the lifetime of the library, and
does not make a noticeable difference otherwise.
This rules file won't be loaded more than once in most cases anyway, so
just load it again when it happens.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-04 00:02:14 +02:00
Ran Benita
ca9829ea66
Don't cache parsed files
...
This needlessly occupies memory for the lifetime of the library, and
does not make a noticeable difference otherwise.
Instead, just parse the same file again when it happens.
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 23:59:43 +02:00
Ran Benita
a64e970809
Remove unneeded freeing mechanisms
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00
Ran Benita
c7bf368780
Make the sections array local to the keymap compiling function
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00
Ran Benita
baf6a677dc
Remove unused global type tokens
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00
Ran Benita
f549ce078f
Use global tables for action string handling
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00
Ran Benita
d2c3dd0c21
Constify some more text functions
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00
Ran Benita
eb738b13ce
Constify global tables
...
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-03-03 01:17:57 +02:00