Commit Graph

1840 Commits (faac4ba7de5ae805a612eb1236a17087e392c7c3)

Author SHA1 Message Date
Gaetan Nadon 8562d97808 config: set Autoconf minimum version required to 2.60
This is the current minimum version required for all X.Org modules.
The module can be configured with any higher version.
Autoconf features from version > 2.60 cannot be used.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-12-07 09:47:31 -05:00
Jan Engelhardt f0456a832f Update .gitignore
Limit exclusion of files to their respective directory
that they can appear in.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
2010-11-11 23:28:29 +01:00
Jan Engelhardt f8301ebc56 xkbscan: resolve build warning/rpmlint error
xkbscan.l: In function 'setScanState':
xkbscan.l:201:1: warning: control reaches end of non-void function
I: Program returns random data in a function
E: libxkbcommon no-return-in-nonvoid-function xkbscan.l:201

Change return type of setScanState to void, since a return value is
never used by its callers.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
2010-11-11 23:27:21 +01:00
Jan Engelhardt d84da95f69 build: run autoupdate
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
2010-11-11 23:21:36 +01:00
Jan Engelhardt b86fc75272 build: use proper quoting in autogen.sh
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
2010-11-11 23:21:36 +01:00
Jan Engelhardt 2b36543ab1 build: use AC_CONFIG_MACRO_DIR as per libtoolize warning
libtoolize: Consider adding "AC_CONFIG_MACRO_DIR([m4])" to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding "-I m4" to ACLOCAL_AMFLAGS in Makefile.am.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
2010-11-11 23:21:34 +01:00
Jon TURNEY f94a64cc08 Link with -no-undefined
Use -no-undefined to assure libtool that the libxkbcommon library has
no unresolved symbols at link time, so that libtool will build a shared
library on platforms require that all symbols are resolved when the
library is linked.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2010-10-26 14:11:38 -04:00
Kristian Høgsberg 8d2c522f31 Don't check for xlib, we don't need it 2010-10-21 21:34:41 -04:00
Kristian Høgsberg c88439dbf0 Update xkb->ctrls->num_groups when copying the keysyms
This used to be set when we read an XKM file.
2010-10-20 22:27:07 -04:00
Kristian Høgsberg 125691573c Restore compatible action structs
This unbreaks the X server code to serialize an xkb_desc, but loses the
32 bit vmod fields.  Needs some work...
2010-10-20 15:57:45 -04:00
Kristian Høgsberg a84c08795e Use flex for generating the scanner, add support for parsing from strings
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
2010-10-20 14:03:53 -04:00
Kristian Høgsberg a2f115581d Add struct xkb_state 2010-10-19 15:16:50 -04:00
Kristian Høgsberg e879828717 Don't return a static buffer in public API 2010-10-08 15:33:18 -04:00
Kristian Høgsberg d202bc4462 Pull in XKB_COMMON_* version of modifier masks
This way we can use libxkbcommon without having to include X.h.
2010-10-08 15:07:53 -04:00
Adam Jackson 73ca959d7b Dead code removal and static markup
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-09-27 16:06:48 -04:00
Kristian Høgsberg fb05ee47bf Remove libxkbfile dependency for real this time 2010-09-03 20:35:28 -04:00
Kristian Høgsberg 20bfe1280d Use const char * in struct xkb_rule_names 2010-08-29 21:30:10 -04:00
Kristian Høgsberg be2bd66181 Pull in a few #defines from libxkbfile and lower kbproto requirement 2010-08-25 14:51:52 -04:00
Kristian Høgsberg 351f8c6587 Drop Bool type
It's a nightmare trying to avoid double definitions.
2010-07-02 15:05:21 -04:00
Kristian Høgsberg b3805a2360 Get rid of a few unused #defines in public header 2010-07-02 14:21:59 -04:00
Kristian Høgsberg 97fbc348b0 Rename XkbRMLVOSet to struct xkb_rule_names 2010-07-02 14:21:52 -04:00
Kristian Høgsberg 15f259993e Move private structs and defines to private headers 2010-07-02 12:20:59 -04:00
Kristian Høgsberg 3f0034a990 Rename public entry points to lowercase and underscore 2010-07-02 12:20:59 -04:00
Kristian Høgsberg 5669e1a82d Compile with -fvisibility=hidden when possible 2010-07-02 12:20:59 -04:00
Kristian Høgsberg 9f6026867a 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.
2010-07-02 12:20:54 -04:00
Kristian Høgsberg 9d55d5bbf6 Drop Xmd.h include now that we're using uint32_t 2010-06-30 17:32:54 -04:00
Kristian Høgsberg 8e653493d0 Fix warning from CARD32 -> uint32_t conversion 2010-06-30 17:31:34 -04:00
Kristian Høgsberg e10e16ad2f Constify XkbcAtomText()
Atoms aren't mutable and this lets us put tbGetBuffer() back in the box.
2010-06-30 17:30:42 -04:00
Kristian Høgsberg d95b289367 Make XkbcInitAtoms() call optional 2010-06-30 17:13:21 -04:00
Kristian Høgsberg 0ece2cdbaf Drop more malloc/free wrappers 2010-06-30 16:56:24 -04:00
Kristian Høgsberg a76df86572 Use the right action structs
We were casting the union members to the wrong action structs (from kbproto).
2010-06-30 16:33:25 -04:00
Kristian Høgsberg 1723ef1bc7 Copy over missing action structs from kbproto 2010-06-30 15:48:39 -04:00
Kristian Høgsberg 9258cc3dca Rename Xkbc*Action to struct xkb_*_action 2010-06-30 13:31:21 -04:00
Kristian Høgsberg 399d4bd678 Drop malloc wrappers 2010-06-28 06:58:01 -04:00
Kristian Høgsberg 47d3b3969b Drop CARD32 and Opaque types 2010-06-28 06:50:12 -04:00
Daniel Stone 2fb329c964 Copy and duplicate XkbModsRec and XkbKTMapEntryRec
Copy these types in so we can extend the vmod size.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-23 16:25:10 +01:00
Daniel Stone b74223eb50 fix mod size confusion
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-23 16:25:02 +01:00
Daniel Stone 8693c2652c Add really rudimentary rules caching support
Keep the parsed form of the last-used rules file around, and reuse that
if we get asked for the same ruleset.  If not, bin it and cache the
other one.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:57:16 +01:00
Daniel Stone 7257d4c89e 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>
2010-06-22 15:57:16 +01:00
Daniel Stone b38525421f Interp: More lazy keysym resolution
Resolve the keysyms when we create an InterpDef, rather than directly
in the parser.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:57:16 +01:00
Daniel Stone 2c4a045aca 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>
2010-06-22 15:57:16 +01:00
Daniel Stone 15b0db5492 Copy in XkbCompatMapRec and XkbSymInterpretRec
These contain actions, so transition them ahead to XkbcAction and move
them into XKBcommon.h.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:57:16 +01:00
Daniel Stone 60e7eeeba1 Use CARD32 instead of Atom, drag in XkbClientMapRec
On 64-bit architectures, XID varies in size between the server (always
32 bits), and non-server (always unsigned long) for some inexplicable
reason.  Use CARD32 instead to avoid this horrible trap.

This involves dragging in XkbClientMapRec so we don't get stuck in the
KeySym trap.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:57:12 +01:00
Daniel Stone d2d787df65 Regroup actions into current vs. deprecated, resize vmod
Use Xkbc* for all our actions that we intend to keep around, and Xkb*
for deprecated ones we can hopefully get rid of, at least internally.

While we're at it, make vmods be a uint32_t.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:56:56 +01:00
Daniel Stone e564235b43 xkbcomp: Don't malloc() and free() most scanned tokens
Use a constant buffer instead.  Sigh.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:56:56 +01:00
Daniel Stone f246db20f4 Fix compilation with DEBUG
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:56:56 +01:00
Daniel Stone acc467de9f xkbcomp: Use fread() instead of getc()
So, it turns out that if you're parsing a fairly large amount of data,
using getc() to get all the input rather than, say, read(), is some kind
of remarkably daft and unperformant idea.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:56:56 +01:00
Daniel Stone 240a0c3409 xkbcomp: Lazy keysym parsing (avoid XStringToKeysym)
Instead of calling XStringToKeysym on every keysym we parse, store it as
a string until we need to store it in an actual keymap.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:56:56 +01:00
Daniel Stone 48baabeb38 Atoms: Avoid allocations in XkbAtomText()
XkbAtomGetString() returns a freshly-allocated string, whereas
XkbAtomText() returns the same in a temporary buffer.  XkbAtomText used
to call XkbAtomGetString() and then free the result, which seems quite
spectacularly pointless when you think about it.  Shuffle the atom code
around so we don't have to allocate for XkbAtomText().

This changes semantics slightly wrt non-printable characters, but I
haven't been able to see any effect so far.  And it may well be ever so
slightly quicker.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:56:56 +01:00
Daniel Stone 080a083fd2 configure.ac: Enable automake silent rules by default
This allows us to spot warnings much more easily.  Also, drop the
now-deprecated AM_MAINTAINER_MODE.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2010-06-22 15:56:56 +01:00