Commit graph

1566 commits

Author SHA1 Message Date
Benno Schulenberg
d323704e7c nls: remove eight pointless self-producing compose sequences
Compose sequences are meant to produce certain symbols by combining
certain different symbols, not to produce a symbol with the help of
the symbol itself.

This fixes issue #59.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-18 17:23:05 +02:00
Benno Schulenberg
3b62c0322c nls: remove misplaced sequences from Ethiopian and Greek compose files
The Khmer digraphs and Arabic ligatures have nothing to do with
Amharic or Greek.

(Also rewrap a comment and correct two others.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-15 13:28:01 +00:00
Benno Schulenberg
479af78f2e nls: remove redundant Khmer digraphs, already defined in included file
This fixes issue #160.

Reported-by: Mike Fabian

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-04-15 13:28:01 +00:00
Alan Coopersmith
6d7d08726f XkbUpdateKeyTypeVirtualMods: always initialize mask
XkbVirtualModsToReal should only fail to set mask if the server does
not support XKB, but it still made Oracle Parfait complain:

Error: Uninitialised memory
   Uninitialised memory variable [uninitialised-mem-var] (CWE 457):
      Possible access to uninitialised memory referenced by variable 'mask'
        at line 863 of lib/libX11/src/xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'.
        Path in callee avoiding write at line 862
          mask allocated at line 860

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-04-10 14:51:55 -07:00
Matt Turner
9ac6859c20 libX11 1.7.5
Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-04-03 10:15:30 -07:00
Simon McVittie
76d1cc3c1c Don't try to destroy NULL condition variables
This avoids a segfault during error-unwinding if an invalid display name
is passed to XOpenDisplay().

Fixes: 8a368d80 "Fix two memory leaks in _XFreeX11XCBStructure()"
Resolves: #155
Signed-off-by: Simon McVittie <smcv@debian.org>
2022-04-03 14:24:13 +01:00
Matt Turner
80b30d1251 libX11 1.7.4
Signed-off-by: Matt Turner <mattst88@gmail.com>
2022-03-30 13:54:13 -07:00
Hodong
8a368d808f Fix two memory leaks in _XFreeX11XCBStructure()
Even when XCloseDisplay() was called, some memory was leaked.

XCloseDisplay() calls _XFreeDisplayStructure(), which calls
_XFreeX11XCBStructure().

However, _XFreeX11XCBStructure() did not destroy the condition variables,
resulting in the leaking of some 40 bytes.

Signed-off-by: Hodong <hodong@yozmos.com>
2022-03-24 16:50:11 +00:00
Adam Jackson
da97120f23 xcb: Clarify the XInitThreads error message
XInitThreads has been called if _Xglobal_lock != NULL, we may as well
check that before printing a misleading error message.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2022-03-23 13:31:05 -04:00
Giovanni Mascellani
257927c51b xcb_io: Allow jumps backwards when widening the request number.
Request numbers are not always seen in the numeric order by widen(),
for example due to Mesa directly calling _XError(). When this happens,
widen() adds 2^32 to the reported widened number, triggering failed
assertions and bad behavior.

With this commit, wrapping of the lower dword is detected in a more
robust way, by requiring that a skip of at least 2^31 is seen.

This fixes issue #152.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
2022-03-23 16:22:25 +00:00
Benno Schulenberg
918063298c nls: add a compose sequence for the peace symbol
As the thing in the circle looks a bit like an upside-down Y,
use <O> <Y> as the sequence, similar to <O> <A> for anarchism.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-03-03 12:06:35 +01:00
Benno Schulenberg
4f9eb32709 nls: remove obsolete locale aliases with uppercase in the language code
(These aliases may have been useful on some systems twenty years ago,
but nowadays all should have settled on lowercase language code plus
uppercase country code.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-25 17:53:23 +00:00
Benno Schulenberg
ba0d3b437d nls: map eo.UTF-8 directly to en_US.UTF-8 instead of using a relay alias
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-25 12:53:10 +01:00
Benno Schulenberg
cfddb79981 nls: remove the mistaken eo_EO names -- EO is not a valid country code
(Debian has had several of these lines commented out for years.)

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-25 12:52:45 +01:00
iyzana
eb5885245a nls: add locale alias from eo.UTF-8 to eo_XX.UTF-8
There is no matching locale in the locale.dir and compose.dir files for
the locale eo.UTF-8. Setting it as the locale resulted in compose files
not being loaded.

Signed-off-by: iyzana <iyzana@protonmail.com>
2022-02-25 10:45:07 +00:00
Benno Schulenberg
24df23dff9 nls: group the compose sequences for tilde, degree, and cedilla together
Also, correct the comment for the double quote character ("), and move
the soft hyphen and the interrobangs to a special punctuation group.

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-24 18:24:12 +00:00
Benno Schulenberg
c0191f020f nls: use shape-based compose sequences for hammer-and-sickle instead
Using a misspelled abbreviation (CCCP) of an obsolete country's name
to compose a fairly general communist symbol does not seem right.

    https://en.wikipedia.org/wiki/Hammer_and_sickle

Many compose sequences instead combine characters that together look
similar to the target character.  Do the same here: question mark (?)
plus backslash (\) look a bit like ☭ .

In the bargain, this fixes issue #63.

Reported-by: Marc Mezzarobba

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-24 18:24:12 +00:00
Alan Coopersmith
582dc6f89e gitlab CI: enable Static Application Security Testing (SAST)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-02-20 11:52:22 -08:00
Benno Schulenberg
336e8f7255 nls: add compose sequences for leftward, upward and downward double arrow
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>
2022-02-20 15:20:52 +01:00
Benno Schulenberg
623b77d4f3 imDefLkup: verify that a pointer isn't NULL before using it
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>
2022-02-14 11:47:46 +01:00
Christopher Chavez
b83938f7f9 Xlib.h: fix spelling in comment
Signed-off-by: Christopher Chavez <chrischavez@gmx.us>
2022-02-14 00:23:09 -06:00
Christopher Chavez
4791055682 Xlib.h: spelling fix in comment 2022-02-13 05:26:14 +00:00
Denis Drakhnia
9304e645bd nls: Add ru_UA.utf8 locale alias.
Signed-off-by: Denis Drakhnia <numas13@gmail.com>
2022-02-04 16:24:02 +00:00
Benno Schulenberg
9ef2551f0c nls: do some manual adjustment of whitespace in the compose sequences
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>
2022-02-03 16:19:39 +01:00
Benno Schulenberg
0dad289ead nls: among the compose sequences, replace all runs of spaces with tabs
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>
2022-02-02 14:12:06 +01:00
Benno Schulenberg
fc79e39c23 docs: add missing word, wrap line, fix typo, and trim an excess space
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-02-02 14:11:53 +01:00
Benno Schulenberg
93446455c4 KeyBind: reshuffle two ifs into the general order of ascending codes
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-27 15:02:09 +01:00
Benno Schulenberg
93f15f5f29 KeyBind: slightly speed up some case conversions by adding missing returns
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>
2022-01-27 14:38:33 +01:00
Benno Schulenberg
317c7abbcc KeyBind: update the Greek case-conversion tables to Unicode Data 14.0
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>
2022-01-27 14:04:11 +01:00
Benno Schulenberg
402b843fa7 remove a commented-out code fragment, and remove a stray blank line
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-26 17:21:31 +01:00
Benno Schulenberg
fbbc3cf8b8 XKBCvt: remove an if that never gets triggered
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>
2022-01-26 17:12:26 +01:00
Benno Schulenberg
6786744f63 nls: add the es_CU locale name, for Cuba
It was added to glibc ten years ago.

This fixes issue #57.

Reported-by: Dominique Michel

Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2022-01-23 17:13:02 +01:00
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