|
869c6871
|
2012-05-19T02:35:15
|
|
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>
|
|
beccc375
|
2012-05-18T18:09:50
|
|
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>
|
|
b89b8e70
|
2012-05-13T23:31:59
|
|
Change xkb_map_new_from_fd to use FILE*
i.e. xkb_map_new_from_file. The reason is that flex only works with
FILE's, so we must use fdopen on the file descriptor; but to avoid a
memory leak, we must also fclose() it, which, in turn, closes the file
descriptor itself.
Either way is not acceptable, so we can either:
* dup() the fd and use fdopen on that, or
* have the user call fdopen on his own, and accept a FILE* instead of an
fd.
The second one seems better, and is standard C, so why not. We must add
stdio.h to xkbcommon.h though, which is regrettable, but not a big deal.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
661cb840
|
2012-05-18T00:56:36
|
|
Add benchmarking test to rulescomp
Apparently it only takes us 8ms to build keymaps. Nice!
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>
|
|
46441b11
|
2012-05-09T20:49:04
|
|
Move KcCGST API to internal-only
And don't export it. We don't need it for X11 support, let alone
anything else.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
2761b1a3
|
2012-05-09T20:20:12
|
|
Rename serialise to serialize
Yes, British English is correct, but unfortunately we've lost that
battle.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
5a3771d1
|
2012-05-09T20:18:30
|
|
Add common LED names to xkbcommon-names.h
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
6433d72e
|
2012-05-09T20:12:12
|
|
Merge remote-tracking branch 'krh/keysyms'
Conflicts:
src/keysym.c
src/misc.c
src/text.h
src/xkbcomp/expr.c
src/xkbcomp/parser.y
src/xkbcomp/parseutils.c
src/xkbcomp/symbols.c
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ace1e5df
|
2012-05-09T09:05:00
|
|
Use our own keysyms
|
|
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.]
|
|
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>
|
|
e1af48bc
|
2012-05-09T13:22:34
|
|
Rename keysym <-> string API
Change them to refer to the string representation of the keysym's name
as a name rather than a string, since we want to add API to get the
Unicode printable representation as well.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
124e62e4
|
2012-05-09T01:06:10
|
|
Add multiple modifier state matching API
Two new calls allow users to test the exact modifier state, including
verifying that no other modifiers but the ones you wanted are down.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
74a197d2
|
2012-05-08T17:59:35
|
|
Add pre-defined names database
xkbcommon-names.h right now just contains a set of hardcoded modifier
strings that are most commonly used for the usual modifiers. Provide
definitions of these so people don't have to worry about typoing a
string or mixing up Mod1 and Mod4.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
c3584280
|
2012-05-08T17:51:16
|
|
Add flags to context creation
None defined as yet, but why not.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b537b552
|
2012-05-08T17:48:29
|
|
Add flags to keymap compilation entrypoints
No use as yet, but might as well ...
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b610b2b9
|
2012-05-08T14:52:23
|
|
Rename XKBcommonint.h to xkb-priv.h and use it
Make the files in the src/* directory use their own header or a
consilidated private header. This makes the file dependencies clearer.
Also drop the pointless "xkb" file name prefix, add split a few
declarations to their own files (atom.h and text.h).
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
fbfbf0aa
|
2012-05-07T14:08:34
|
|
Remove left over filecomp.sh file
Should have removed it in a previous commit.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
40b56b0f
|
2012-05-07T14:23:08
|
|
Update .gitignore for automake 1.12
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
a1e07fb6
|
2012-05-07T15:07:41
|
|
Uncomment sections of test/rulescomp.c
Fixes an 'unused' warning. There seems to be nothing wrong with these
sections though, all the tests pass.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
12b3495d
|
2012-04-11T01:55:50
|
|
Remove unused 'which' and 'merge' arguments
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Updated for xkb_desc -> xkb_keymap changes.]
|
|
4b49e0a1
|
2012-03-31T02:44:39
|
|
Overhaul test suite
Rewrite all of the current tests in the following ways:
- Instead of the current mix of C and shell, just use single-process
pure C file per test. All of the .sh files are removed, but everything
that was tested is ported.
- Instead of handling the test logs ourselves, use Automake's
"parallel-test" mechanism. This will create a single log file for each
test with it's stdout+stderr, and a top level "test-suite.log" file
for all the failed tests.
- The "parallel-tests" directive also makes the test run in parallel,
so "make check" runs faster.
- Also use the "color-tests" directive to have the "make check" output
colorized. Who doesn't like to see PASS in green?
- All of the test data files are moved into the test/data subdirectory.
That way we can just put the directory in EXTRA_DIST and forget about
it.
- The test/Makefile.am file is consolidated into the main Makefile.am,
for a completely non-recursive build.
Right now the tests are completely independent and just use simple
assert()'s. More sophistication can be added as needed.
It should also be noted that it's still possible to use shell, python,
etc. if a test wants more flexibility than C can provide, just do as
before.
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: Updated for xkb_keymap changes.]
|
|
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>
|
|
9b14e0c3
|
2012-03-29T17:38:44
|
|
Tests: Release context on failure to build keymap
No practical effect since they exit(1) regardless, but it keeps valgrind
happy.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
034ffce6
|
2012-03-27T17:22:35
|
|
Use xkb_contexts in keymap compilation
Primarily for the include path, but also for the logging in future.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3e9dd751
|
2012-03-27T16:59:01
|
|
Add new context API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
21f1bff4
|
2012-03-27T15:51:28
|
|
Fix distcheck with non-recursive Makefiles
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b5efe41f
|
2012-03-24T04:48:31
|
|
Make build non-recursive
Unify all the different Makefile.am into a single short top level one
(the test/Makefile.am file is left intact though).
This makes the build system simpler to look and should encourage
unifying more currently-disparate code.
Some further motivation can be found in this page:
http://www.flameeyes.eu/autotools-mythbuster/automake/nonrecursive.html
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
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>
|
|
d3908b63
|
2012-03-24T12:33:28
|
|
Define our own None atom value
Since we define our own xkb_atom_t type, it makes sense not to use the
X11/X.h None value. This way we can also remove a lot of X11 includes.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
0480f427
|
2012-03-23T23:28:24
|
|
Remove useless stuff from utils
Signed-off-by: Ran Benita <ran234@gmail.com>
[daniels: fixed conflicts from strcasecmp, added includes to make
filecomp build again]
|
|
d22b8dbb
|
2012-03-23T22:25:47
|
|
Move utils.{c,h} to be used by the entire project
This is a first step for making consistent use of utils.h also outside
of xkbcomp/ .
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
f52671a4
|
2012-03-24T12:31:55
|
|
Remove a few remaining uses of the KeySym type
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
8b3e2b9b
|
2012-03-24T04:57:40
|
|
Add xkb test file to EXTRA_DIST
To appease make distcheck.
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
eeb0a214
|
2012-03-23T17:55:08
|
|
Update gitignore for 'state' test
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
ede84734
|
2012-03-27T12:11:45
|
|
Add enum xkb_key_direction instead of bool
Use XKB_KEY_UP instead of 0 and XKB_KEY_DOWN instead of 1.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reported-by: Ran Benita <ran234@gmail.com>
|
|
7f471a70
|
2012-03-27T12:07:57
|
|
Add state serialisation API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
d039622a
|
2012-03-22T17:39:12
|
|
Rename keymap allocation API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
3d672fcf
|
2012-03-22T14:32:53
|
|
Add LED state API
And also convert state.c to use the state API for mods and groups,
rather than testing the state members directly.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
edcaab65
|
2012-03-21T15:25:32
|
|
Round out new state API
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ecea0d71
|
2012-03-21T02:20:07
|
|
Add new state API
Add new API to deal with xkb_state objects, including
xkb_state_update_key, which runs the XKB action machinery internally to
calculate what exactly happens to the state when a given key is pressed
or released.
The canonical way to deal with keys is now:
struct xkb_state *state = xkb_state_new(xkb);
xkb_keysym_t *syms;
int num_syms;
xkb_state_update_key(state, key, is_down);
num_syms = xkb_key_get_syms(state, key, &syms);
More state handling API, including a way to get at or ignore preserved
modifiers, is on its way.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
7e2dd121
|
2012-03-15T09:35:42
|
|
Add geometry test
Add the dump of my full current X11/XKB keymap as a test for filecomp,
being as it also includes geometry.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
b8e950de
|
2012-03-09T16:57:09
|
|
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>
|
|
ed5c6c17
|
2012-03-09T16:26:34
|
|
Remove geometry support, again
It still parses geometry, but happily throws it away.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
0d8874d0
|
2012-02-26T00:03:24
|
|
makekeys: update to match the rest of libX11 makekeys
This integrates two commits from libX11:
ebd6ef0a4db0ddef0ae17ad14571518ccdeea5ba
XStringToKeysym: Special case for XF86 keysyms
Some XFree86 keysyms were in XKeysymDB as XF86_foo, despite really being
XF86foo. So, if we get to the bottom of XStringToKeysym and haven't
found our XF86_foo, try it again as XF86foo.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
00175397480b76d32bf82b0c7c94c91a2a95954e
makekeys: Scan vendor keysyms as well as core
Since we can't really live without vendor keysyms, scan them all in to
generate ks_tables.h, rather than only doing the core ones, and leaving
the vendor syms to be manually synchronised with XKeysymDB.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Notice that the xkey.sh test is changed to match libX11 behavior, i.e.
XKeysymToString(0x1008FE20) -> "XF86Ungrab" as opposed to "XF86_Ungrab".
Signed-off-by: Ran Benita <ran234@gmail.com>
|
|
3077e97e
|
2012-02-15T16:37:31
|
|
tests: Free returned XKB map
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
ead9d0cb
|
2012-02-15T11:49:10
|
|
Move include path from X11/extensions/ to xkbcommon/
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>
|
|
5e43e7b4
|
2010-12-09T19:51:41
|
|
config: distribute the .sh test programs and test data
The test programs and the test data are required in the tarball
and needed for distcheck.
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
f424bd8f
|
2010-12-09T19:45:26
|
|
config: make it easier to add TEST programs
LDADD is a Makefile wide variable.
Automake matches prog name with .c file by default
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
63e2719a
|
2010-12-07T10:33:23
|
|
config: replace deprecated INCLUDES with AM_CPPFLAGS
Fixes automake warning.
Acked-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
ceba14dc
|
2010-12-07T10:23:18
|
|
config: update subdirs .gitignore
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
|
|
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>
|
|
e8798287
|
2010-10-08T15:33:18
|
|
Don't return a static buffer in public API
|
|
97fbc348
|
2010-07-02T12:14:03
|
|
Rename XkbRMLVOSet to struct xkb_rule_names
|
|
5669e1a8
|
2010-07-02T11:43:56
|
|
Compile with -fvisibility=hidden when possible
|
|
3f0034a9
|
2010-07-02T11:50:01
|
|
Rename public entry points to lowercase and underscore
|
|
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.
|
|
d95b2893
|
2010-06-30T17:13:21
|
|
Make XkbcInitAtoms() call optional
|
|
2c4a045a
|
2010-06-21T14:22:26
|
|
Allow external atom databases
Allow people to plug in an external atom database (e.g. the X server's),
so we don't have to migrate our own atoms over later. We are a bit
over-keen on atoms at the moment, so it does pollute the atom database a
bit though.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
51402502
|
2009-04-25T18:15:02
|
|
Add testcase for XkbcCanonicaliseComponents
Should be reasonably thorough; the shell part is, however, quite
unpleasant.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
a8bb86a4
|
2009-04-25T14:51:16
|
|
Test: Keysym: Add tests for new keysym <-> string conversions
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
8e3239a7
|
2009-04-25T14:32:04
|
|
KeySym: Actually handle NoSymbol
Add NoSymbol into the keysym table, so keysym <-> string conversion works for
that, too; also eliminate special-casing of VoidSymbol.
This will require special-casing in libX11 to preserve its API.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
a5ce9754
|
2009-04-25T14:29:23
|
|
test: Fix srcdir != objdir build and test failures
filecomp would fail because it couldn't find the input files, after
compilation failed due to missing includes.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
|
|
c728d91b
|
2009-04-10T12:33:31
|
|
Program and files for testing CompileKeymapFromFile
A few simple test cases for verifying the operation of parsing a keymap
file and compiling a keyboard description from it.
|
|
e98eb805
|
2009-04-09T20:52:26
|
|
test: Remove extraneous includes
These programs don't actually use the internal API.
|
|
babae389
|
2009-04-08T17:54:55
|
|
Change CompileKeymapFromRules to take XkbRMLVOSet
Let's use a nice interface now that it's available from XKBrulescommon.h.
|
|
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.
|
|
713c8f41
|
2009-04-04T12:54:44
|
|
test: Exercise compiling from components
This could probably use a lot more real world test cases, but it does
the job for now.
|
|
4f736db9
|
2009-04-04T11:04:35
|
|
test: Minor refactor to allow $EXEEXT in program names
|
|
8f9a6129
|
2009-04-04T10:52:23
|
|
test: Add logging and some intentionally failing cases
We want to log the output of the tests rather than letting them go to
stderr. This allows tests we expect to fail to be run.
|
|
95dbbb8a
|
2009-04-04T09:37:53
|
|
rulescomp: Remove unneeded API
|
|
5cc55d7c
|
2009-04-04T09:14:20
|
|
Test compiler to simulate xkbcomp usage
Added a test program, rulescomp, which takes a RMLVO set and generates a
XkbcDescPtr. This is essentially what the xserver will do, except that we
still need to access some xkbcomp internal API to make it work.
|
|
1ff77ecd
|
2009-03-05T18:20:15
|
|
Rename headers to XKBcommon* and install in extensions directory
Following the kbproto convention, the headers will be named XKBcommon.h
and XKBcommonint.h. Furthermore, they'll be installed in X11/extensions
directory with the rest of the XKB headers.
|
|
ffa0ccfa
|
2009-01-23T18:09:31
|
|
Use XORG_CWARNFLAGS for more warnings
|
|
176b9cf5
|
2009-01-22T20:18:33
|
|
test: Consistently use upper case hex
|
|
ba0b312a
|
2009-01-22T20:20:02
|
|
test: Add tests for XFree86 special keys
Since the XFree86 special keysyms contain an underscore after the XF86
prefix, check to make sure they're handled correctly.
|
|
49a06f92
|
2009-01-22T20:10:19
|
|
test: Add convenience functions for xkey.sh
|
|
b2737e9b
|
2009-01-20T18:57:22
|
|
Testing harness for keysym functions
A test program and script have been added for checking the XkbCommon
keysym functions. This has already highlighted an error in handling of
keysyms from XF86keysym.h.
|