- Jun 11, 2013
-
-
Daniel Stone authored
Replace configure with something that errors out, asking people to please update their checkouts. Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
- Jun 03, 2013
-
-
Daniel Stone authored
Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
- May 09, 2013
-
-
Add three new pieces of API: - xkb_keymap_min_keycode does what it says on the tin - xkb_keymap_max_keycode likewise - xkb_keymap_key_for_each calls the provided function once for every valid key in the keymap Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
Daniel Stone authored
If the keycode range is smaller than 8 → 255, artifically widen it when dumping the keymap as not to displease X. Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
- Apr 01, 2013
-
-
The scanner is very similar in structure to the one in xkbcomp/rules.c. It avoids copying and has nicer error reporting. It uses gperf to generate a hashtable for the keywords, which gives a nice speed boost (compared to the naive strcasecmp method at least). But since there's hardly a reason to regenerate it every time and require people to install gperf, the output (keywords.c) is added here as well. Here are some stats from test/rulescomp: Before: compiled 1000 keymaps in 4.052939625s ==22063== total heap usage: 101,101 allocs, 101,101 frees, 11,840,834 bytes allocated After: compiled 1000 keymaps in 3.519665434s ==26505== total heap usage: 99,945 allocs, 99,945 frees, 7,033,608 bytes allocated Signed-off-by:
Ran Benita <ran234@gmail.com>
-
This wraps the current mmap call and adds a fallback implementation for systems which do not have mmap (e.g. mingw). Signed-off-by:
Ran Benita <ran234@gmail.com>
-
We want to share the same functions for another scanner. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
Daniel Stone authored
Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
The current API doesn't allow the caller to create keymaps from mmap()'ed files. The problem is, xkb_keymap_new_from_string() requires a terminating 0 byte. However, there is no way to guarantee that when using mmap() so a user currently has to copy the whole file just to get the terminating zero byte (assuming they cannot use xkb_keymap_new_from_file()). This adds a new entry xkb_keymap_new_from_buffer() which takes a memory location and the buffer size in bytes. Internally, we depend on yy_scan_{string,byte}() helpers. According to flex documentation these already copy the input string because they are wrappers around yy_scan_buffer(). yy_scan_buffer() on the other hand has some insane requirements. The buffer must be writeable and the last two bytes must be ASCII-NUL. But the buffer may contain other 0 bytes just fine. Because we don't want these constraints in our public API, xkb_keymap_new_from_buffer() needs to create a copy of the input memory. But it then calls yy_scan_buffer() directly. Hence, we have the same number of buffer-copies as with *_from_string() but without the terminating 0 requirement. The explicit yy_scan_buffer() call is preferred over yy_scan_byte() so the buffer-copy operation is not hidden somewhere in flex. Maybe some day we no longer depend on flex and can have a zero-copy API. A user could mmap() a file and it would get parsed right from this buffer. But until then, we shouldn't expose this limitation in the API but instead provide an API that some day can work with zero-copy. Signed-off-by:
David Herrmann <dh.herrmann@gmail.com> [ran: rebased on top of my branch] Conflicts: Makefile.am src/xkbcomp/xkbcomp.c
-
src/xkbcomp/keymap.c:127:12: error: 'found' may be used uninitialized in this function [-Werror=maybe-uninitialized] Not really, but why not. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
Daniel Stone authored
Make sure we're actually getting the keymaps we're hoping to compile. Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
- Mar 19, 2013
-
-
Daniel Stone authored
For use when chaining tests. Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
Daniel Stone authored
Previously we allowed you to pass a names struct with five NULL members, but not just pass NULL for the struct itself. This was pretty dumb. :( Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
Daniel Stone authored
To ensure that overriding RMLVO from the environment works. Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
Daniel Stone authored
But add a flag to allow it for later usage. Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
Daniel Stone authored
You can now set default values in the environment, as well as a context option to ignore the environment, e.g. for tests. Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
Daniel Stone authored
Since the only behavioural change is overriding default includes. Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
Daniel Stone authored
Allowing overriding of environment suppression, at first. Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
Daniel Stone authored
Signed-off-by:
Daniel Stone <daniel@fooishbar.org>
-
- Mar 18, 2013
-
-
This can't happen, but better safe than sorry. The optimizations were noticeable but negligible. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
src/xkbcomp/rules.c:620:36: error: 'idx' may be used uninitialized in this function [-Werror=maybe-uninitialized] Can't happen but no harm done. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
Tests the filter refcounting. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
Signed-off-by:
Ran Benita <ran234@gmail.com>
-
The doxygen page looked a bit dead, the README fills it nicely, and is already written in the markdown format which doxygen uses (I think?). Unfortunately the USE_MDFILE_AS_MAINPAGE doxygen config doesn't seem to do anything.. So we just add a {#mainpage} tag at the top of the README which isn't so bad. BUT we still need some config option (the no_extension=md part) so that doxygen will accept README instead of README.md or somesuch. And that requires an even newer release, 1.8.3.1, released 2013-01. But if an older version is used, it doesn't spew out warnings but just skips the README, which is fine. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
We want to use the USE_MDFILE_AS_MAINPAGE option which was introduced in doxygen 1.8.3 (released 2012-12). Right now the new options are commented, otherwise older doxygen spews these these warnings, which can be ignored: warning: ignoring unsupported tag `USE_MDFILE_AS_MAINPAGE =' at line 794, file doc/Doxyfile warning: ignoring unsupported tag `MATHJAX_FORMAT =' at line 1210, file doc/Doxyfile warning: ignoring unsupported tag `EXTERNAL_SEARCH =' at line 1257, file doc/Doxyfile warning: ignoring unsupported tag `SEARCHENGINE_URL =' at line 1265, file doc/Doxyfile warning: ignoring unsupported tag `SEARCHDATA_FILE =' at line 1271, file doc/Doxyfile warning: ignoring unsupported tag `EXTERNAL_SEARCH_ID =' at line 1278, file doc/Doxyfile warning: ignoring unsupported tag `EXTRA_SEARCH_MAPPINGS =' at line 1287, file doc/Doxyfile Signed-off-by:
Ran Benita <ran234@gmail.com>
-
Signed-off-by:
Ran Benita <ran234@gmail.com>
-
That's a better name and fits more nicely. Also change type->map to type->entries. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
(I really dislike this one for some reason..) Signed-off-by:
Ran Benita <ran234@gmail.com>
-
It is not used anymore. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
See previous commits. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
See previous commit. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
See previous commit. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
Signed-off-by:
Ran Benita <ran234@gmail.com>
-
Not used. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
We don't need the struct any more, it only contains one field now. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
The file_id thing is used to identify the XkbFile some statement originally came from. This is needed to avoid spurious warnings; for example, if you write the same alias twice in a file, that's redundant, and you'd want a warning about it. However if intentionally override it from another file, that's fine, and you shouldn't get a warning. So by comparing the file_id's the needed log verbosity is changed. However, the file_id mechanism is really not needed, because we already have that info! Each KeyNamesInfo corresponds to one XkbFile, so if the conflict occurred while handling that one file -> same_file = true, and if it occurs while merging two Info's -> same_file = false. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
With a little tweak to the copy-to-keymap routine in keycodes.c we can use a normal array. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
If 'into' in empty we can just steal 'from'. Also move the alias-merging into the big function, it's nicer this way. Signed-off-by:
Ran Benita <ran234@gmail.com>
-
Signed-off-by:
Ran Benita <ran234@gmail.com>
-
To get a key by name and resolve an alias - this makes sense for everyone. Signed-off-by:
Ran Benita <ran234@gmail.com>
-