Commit graph

1534 commits

Author SHA1 Message Date
Benno Schulenberg
d241d8af7f nls: remove some obsolete Norwegian and Yugoslavian locale names
They have not existed in glibc for more than fifteen years.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-23 16:56:45 +01:00
Benno Schulenberg
32dd7c03e9 nls: put some entries in their alphabetical order, and adjust alignment
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-22 18:07:30 +01:00
Benno Schulenberg
46a066f251 nls: fix a typo (be_BG => bg_BG) and drop an obsolete comment
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>
2022-01-22 18:07:22 +01:00
Benno Schulenberg
84efc0aa59 nls: remove the compose sequences with the deviant KP_Space symbol
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>
2022-01-19 16:30:05 +01:00
Benno Schulenberg
b76e661ca2 nls: move the block of Jamo to its logical place (ascending Unicodes)
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-19 16:05:41 +01:00
Benno Schulenberg
21f82fb9c6 nls: delete some ineffective compose sequences (that were commented out)
They have never worked; there is no point in keeping them in the file.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-19 16:05:41 +01:00
Benno Schulenberg
6cc31eafa8 nls: group some compose sequences better, and add some comments
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>
2022-01-19 16:05:37 +01:00
ArenaL5
d60ede7843 nls: add a compose sequence for the copyleft symbol
Probably not used anywhere yet, let alone seriously, as stated in
https://en.wikipedia.org/wiki/Copyleft#Symbol

Signed-off-by: ArenaL5 <arenal5@protonmail.com>
2022-01-17 19:35:23 +01:00
Benno Schulenberg
df4dcdf912 nls: remove redundant compose sequences with deprecated Hebrew symbols
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>
2022-01-17 17:31:08 +01:00
Benno Schulenberg
4268472bd1 nls: remove redundant compose sequences with the deprecated 'underbar'
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>
2022-01-17 17:15:50 +01:00
ArenaL5
86e9749ef3 nls: add a compose sequence for the middle dot (·) using dead_circumflex
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>
2022-01-16 19:06:10 +01:00
Benno Schulenberg
1adb531cd5 docs: unwrap the comments of structure elements in the man pages
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>
2022-01-14 17:19:37 +00:00
Benno Schulenberg
da330a1644 docs: unwrap some mistakenly wrapped lines, and correct a comment
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>
2022-01-14 17:19:37 +00:00
Benno Schulenberg
b9e0346abe XKBMAlloc: use the correct first-key variable when extending a key range
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>
2022-01-14 16:58:19 +01:00
Benno Schulenberg
f15d2a01f7 lcUTF8: remove two unneeded ifs and two elses that are never reached
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>
2022-01-12 22:54:12 +00:00
Antti Savolainen
033f37d507 nls: add two compose sequences for an upwards arrow using dead_circumflex
Signed-off-by: Antti Savolainen <antti.savo@gmail.com>
2022-01-12 16:10:21 +00:00
Hodong
b7d724df61 specs/XIM: fix a missing "EXT" in the documentation
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>
2022-01-07 10:41:15 +00:00
Alan Coopersmith
4c96f3567a
libX11 1.7.3.1
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-09 19:51:52 -08:00
Alan Coopersmith
c1710589bb specs/XIM: Fix "encording" typos
Fixes: #145

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-07 08:29:43 -08:00
Alan Coopersmith
e30771b4bb
libX11 1.7.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-06 17:04:14 -08:00
Liang Chang
934417b1e8 Make Xutf8DrawString works correctly with ISO10646 fonts.
Signed-off-by: Liang Chang <l-chang@users.sourceforge.net>
2021-12-03 17:46:31 +00:00
Alan Coopersmith
3ad36c5d3d Build xz tarballs instead of bzip2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-12-03 17:08:51 +00:00
Tatu Frisk
93a050c3ad Fix hanging issue in _XReply
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>
2021-12-03 15:08:40 +00:00
Matthieu Herrb
8382253010 Avoid NULL pointer deref. Fixes issue #47.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2021-12-03 02:56:43 +00:00
Peter Hutterer
58d7b540c4 gitlab CI: update to use the ci-fairy image
Let's use the pre-prepared image instead of building our own.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-12-01 14:31:37 +10:00
Hodong
150154c994 Fix a typo 2021-11-14 06:36:42 +00:00
Igor V. Kovalenko
2356e59ff2 libX11: do not crash in GetResReq() macro
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>
2021-09-05 13:57:26 +03:00
Peter Hutterer
e92efc63ac makekeys: handle the new _EVDEVK xorgproto symbols
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>
2021-07-27 11:46:19 +10:00
Alex Richardson
d01d233741 Avoid undefined behaviour after realloc()
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>
2021-06-16 13:38:01 +01:00
Alex Richardson
1c845834a3 Fix cross-compilation from macOS
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>
2021-06-15 08:47:31 +01:00
Lev Korol
401f58f8ba nls: Add en_IL locale
Signed-off-by: Lev Korol <epicatsupercell@gmail.com>
2021-06-12 23:11:36 +00:00
Alan Coopersmith
f906fe8e97
libX11 1.7.2
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-06-05 09:36:54 -07:00
Tobias Stoeckmann
51b73ac0ac Protect against overly long strings
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>
2021-05-31 18:39:15 +02:00
Matthieu Herrb
ab2f59530b Check for NULL strings before getting their lengths
Problem reported by Karsten Trulsen

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2021-05-30 16:33:48 +02:00
Matthieu Herrb
a8216e8653 include <limits.h> always, not if HAVE_CONFIG_H is set.
via Matthew Green from the NetBSD project

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2021-05-22 17:36:37 +02:00
Matthieu Herrb
6953a586df Version 1.7.1
Release notes in README.md, version bump in configure.ac
2021-05-18 15:27:58 +02:00
Matthieu Herrb
8d2e02ae65 Reject string longer than USHRT_MAX before sending them on the wire
The X protocol uses CARD16 values to represent the length so
this would overflow.

CVE-2021-31535

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2021-05-18 13:57:49 +02:00
Gaurav Ujjwal
838ea5a5a0 Fix out-of-bound access in KeySymToUcs4()
Array `keysym_to_unicode_590_5fe` is only valid for range  [0x590, 0x5fe] but current lower-bound is checked against 0x589.

So invalid values from 0x58a to 0x58f are being allowed by current check.

If any of these invalid value is passed as `keysym`,    `keysym - 0x590` would underflow.

Signed-off-by: Gaurav Ujjwal <gujjwal00@gmail.com>
2021-05-09 11:30:09 +05:30
Christopher Chavez
32491b02c7 Xlib.h: spelling fix in comment 2021-05-03 19:08:03 +00:00
Benno Schulenberg
5faa8dc0b3 nls: adjust three comments about the APL compose sequences
Commit 0bbc0d5e60 (from eight years ago) removed the lines that two
of these comments referred to.  Without those lines, the comments don't
make sense any more.  Reword and shorten them.

Also reword a comment about two sequences that don't work.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2021-01-12 00:32:09 +00:00
Benno Schulenberg
b126bfd7fe nls: allow composing all breved letters also with a lowercase "u"
The letters ă and ŭ can already be composed with "u a" and "u u", but
ĕ, ğ, ĭ, and ŏ can be composed only with an uppercase U.  Emancipate
the latter four and understand also a lowercase "u" to mean 'breve'.

(Yesterday I needed ğ and was annoyed that "u g" did not work.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2021-01-12 00:32:09 +00:00
Walter Harms
78027fdb7a fix same roff code
Signed-off-by: Walter Harms <wharms@bfs.de>
2020-11-28 21:05:33 +01:00
Walter Harms
4f15cfc645 Fix some roff code add see also
Signed-off-by: Walter Harms <wharms@bfs.de>
2020-11-28 20:56:35 +01:00
Walter Harms
daa106927f fix broken nroff coding for code comments
the comments /* */ are code as /\(**  */ that does not work.
the coding in other X11 man pages is /\&* */ so we do the same here.
2020-11-28 17:49:25 +01:00
Walter Harms
7bdeae239b FIX: warning: macro `hN' not defined
Signed-off-by: Walter Harms <wharms@bfs.de>
2020-11-27 22:43:21 +01:00
Walter Harms
b7ec67d3ea FIX: warning: macro `IN' not defined
just remove an other dead macro use.
2020-11-27 22:26:15 +01:00
Walter Harms
7ca3ceb917 fix warning: macro `s' not defined
this is caused by bad nroff coding, fix some more issues on the fly
2020-11-27 21:58:04 +01:00
Walter Harms
14fb4e5356 FIX: warning: macro `hN' not defined
this was found by checking man pages with
 groff -t -mandoc -Z  -wmac -Tutf8 $FILE >/dev/null

In most cases .hN could be replaced with .BR

Signed-off-by: Walter Harms <wharms@bfs.de>
2020-11-27 20:04:22 +01:00
Walter Harms
cb03da4447 FIX: warning: macro `Pn' not defined
The missing macro is found via:
roff -t -mandoc -Z  -wmac -Tutf8 XAnyEvent.man >/dev/null

To fix the problem the macro is replaced with .RB.

Signed-off-by: Walter Harms <wharms@bfs.de>
2020-11-27 19:00:00 +01:00
Benno Schulenberg
cc9f8878f2 nls: add 'C.utf8' as an alias for 'en_US.UTF-8'
The normal form is 'C.UTF-8', but 'C.utf8' has been seen in the wild.

Fixes #102.

Reported-by: Tomas Korbar

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2020-11-25 17:06:38 +01:00