These sequences follow the logic of: the arrow shaft (=) first, the
arrow head (< or > or ^ or v) second. This is so because the sequence
<= is already taken for ≤, and there is no obvious ASCII character for
a double vertical line, so we have to make do with a horizontal one.
Since commit 6101b967b6 from eight years ago, there is a compose sequence
for the rightward double arrow, but not for the other three directions.
This fixes issue #138.
Requested-by: Mélanie Chauvel
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
It is possible for _XimICOfXICID() to return NULL, so it is necessary
to check this isn't actually the case before dereferencing the pointer.
All other callers of _XimICOfXICID() do this check too.
(The check itself is ugly, but it follows the style of the code in the
rest of the module.)
Fixes issue #45.
Reported-by: Bhavi Dhingra
Original-patch-by: Bhavi Dhingra
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
This achieves a more consistent vertical alignment (per group) of the
target character and the trailing comments.
(Most blocks were aligned in some fashion, except the "Greek Extended"
block, which has lines of greatly varying lengths.)
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
It was done with this script:
cat nls/en_US.UTF-8/Compose.pre |
sed 's!\(^<.\{6,13\}>\)\s*:!\1\t\t\t\t:!' |
sed 's!\(^<.\{14,21\}>\)\s*:!\1\t\t\t:!' |
sed 's!\(^<.\{22,29\}>\)\s*:!\1\t\t:!' |
sed 's!\(^<.\{30,37\}>\)\s*:!\1\t:!' |
sed 's!\(: ".*"\)\s*!\1\t!' |
sed 's!\(\s*# \)! # !' > trimmed &&
mv trimmed nls/en_US.UTF-8/Compose.pre
This saves 37 kilobytes of whitespace.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
This avoids pointlessly tumbling through several more ifs when the
conversion has aleady been done.
Also remove two redundant conditions (as lower codes have already
been handled) and fold two other conditions together.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
A few symbols, like Heta and Sampi and dotted lunate Sigma, have been
assigned code points since Unicode Data 4.0, and need their entries.
This fixes issue #132.
Reported-by: Ray Vine
Original-patch-by: Ray Vine
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
The 'if' at the beginning of _XkbHandleSpecialSym() allows only symbols
from the numeric keypad and some control symbols to pass -- XK_hyphen
is not among them, so the check for XK_hyphen in the later 'if' will
always be false.
(The corresponding conversion in _XTranslateKeySym() in KeyBind.c was
removed in March 1994.)
(Also, several keyboard layouts nowadays contain the 'hyphen' symbol,
allowing the user to enter soft hyphens into a document. So we really
don't want to remap this symbol.)
Fixes issue #48.
Reported-by: Bhavi Dhingra
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
The typo was only partially fixed in commit 22a5255b80 sixteen years ago,
and the internet shows that there was at least one user frustrated that
bg_BG.utf8 didn't work but bg_BG.UTF-8 did.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
Using this KP_Space symbol as a stand-in for the symbol 2 doesn't make
sense. It looks like a mistake, or as if someone had a broken keyboard
and used KP_Space as a substitute for 2.
Also, no keyboard layout in the last fifteen years has contained the
KP_Space symbol, so I don't see how anyone could type it.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
Also, align a few trailing comments more consistently, and change
some comments so they will be excluded from the installed file --
there is no need for those comments there.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
The compose sequences with the valid Hebrew key symbols are right there.
Also, no keyboard layout in the past seventeen years has contained these
deprecated symbols on any key.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
The key symbol 'underbar' is equivalent to 'underscore' -- the mirror
compose sequences with the latter symbol continue to exist.
Also, no keyboard layout in the past fifteen years has contained the
symbol 'underbar' on any key -- except a Telugu layout since a few
years, but that will be corrected soon.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
This makes the middle dot compose sequences consistent with others that
begin with <dead_circumflex> and <Multi_key> <asciicircum>, e.g.
superscripted 3 (³)
Signed-off-by: ArenaL5 <arenal5@protonmail.com>
It doesn't matter that these lines get wider than 80 columns, as it's
easy enough to make the pager scroll a bit to the right, or to have a
terminal that is a 100 or more columns wide. It looks better to not
hard-wrap these comments.
Also, fix the layout of two table elements.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
The wrapped lines messed up the table. Also, add some blank lines
to make the table more readable.
Elsewhere, add spaces around an operator (for consistency),
and correct a copy-paste error.
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
When extending the range of changed virtual-modifier keys, one should
pass the two variables relevant to that range.
These two mistakes were found by grepping for 'modmap_key' and then
looking for asymmetries between the handling of the plain modmap thing
and the virtual modmap thing. Inspired by issue #76.
(I suspect these mistakes were at the base of some intractable bugs
reported against xkeyboard-config where virtual modifiers refused
to work and had to be worked around by making other changes too.)
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
When there is a break at the end of the while loop, it means that the
loop will finish the first time that _XlcGetCharSetWithSide() returns
a non-NULL result, which means that the first '(last_charset == NULL)'
will always be true and the else part is redundant.
Fixes issue #46.
Reported-by: Bhavi Dhingra
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
There was an "EXT" in the original text, but it seems to be missing.
See: 4e66da0783/specs/XIM/xim.ms (L693)
Signed-off-by: Hodong Kim <hodong@nimfsoft.com>
Assume event queue is empty if another thread is blocking waiting for event.
If one thread was blocking waiting for an event and another thread sent a
reply to the X server, both threads got blocked until an event was
received.
Signed-off-by: Tatu Frisk <tatu.frisk@ge.com>
Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
When _XGetRequest() detects that requested length exceeds remaining display
output buffer capacity it would return NULL. GetResReq() macro obtains "req"
pointer from a call to _XGetRequest() and then proceeds to assign request id
through "req" pointer which leads to NULL pointer dereference in this case.
Fix this by checking if "req" is valid before assigning request id.
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
These keys are all defined through a macro in the form:
#define XF86XK_BrightnessAuto _EVDEVK(0x0F4)
The _EVDEVK macro is simply an offset of 0x10081000.
Let's parse these lines correctly so those keysyms end up in our
hashtables.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Adding the offset between the realloc result and the old allocation to
update pointers into the new allocation is undefined behaviour: the
old pointers are no longer valid after realloc() according to the C
standard. While this works on almost all architectures and compilers,
it causes problems on architectures that track pointer bounds (e.g.
CHERI or Arm's Morello): the value_list pointers will still have the
bounds of the previous allocation and therefore any dereference will
result in a run-time trap.
I found this due to a crash (dereferencing an invalid capability) while
trying to run `xev` over SSH on a CHERI-RISC-V system. With these two
realloc changes, and https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/41
I am able to succesfully run `xev` compiled for CHERI-RISC-V.
Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
We can't use `LC_CTYPE=C sed` there since /usr/bin/sed is not compatible
with the expressions in nls/ (`sed: RE error: illegal byte sequence`).
To fix this use $(SED) instead which autotools will set to a GNU
version of sed (usually /usr/local/bin/gsed) on macOS.
Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Checking against upper limit of USHRT_MAX must happen before truncating
size_t to int. On 64 bit systems with strings larger than 2 GB this
could otherwise lead to negative ints or ints smaller than USHRT_MAX.
In XParseColor this could lead to out of boundary access with strings
starting with a # (color sequence). A modulo 12 operation is performed
to validate the string length, but with an overflown length, the for
loop would eventually read behind terminating '\0' character.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>