Commit graph

1420 commits

Author SHA1 Message Date
Adam Jackson
1f1ca0863f xkb: Provide <X11/extensions/XKBgeom.h> ourselves
This header refers to libX11 types, it doesn't belong in xorgproto and
has been moved to legacy in 2019.2. Supply it ourselves.
2019-09-24 13:02:47 -04:00
Ross Burton
edc7680ed5 src/util/Makefile: explicitly reset LINK to not use libtool
Simply looking at libtool redefines LINK globally to use libtool, which when
you're trying to cross-compile to Windows can cause complications.

As in src/util/ we're simply building a small binary for the build host, reset
LINK to the automake default so that the traditional compile/link steps occur
without libtool.

Also remove -all-static from LDFLAGS as that is a libtool-specific argument
intended to solve this problem.

Closes: #100
Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-08-06 14:55:50 +01:00
Thomas E. Dickey
f111bf3ac0
improve some formatting
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-30 16:53:27 -04:00
Thomas E. Dickey
1d0a6fe912
fix a substitution error from recent commit, e.g, "s/^\.EE/XDe/"
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-30 15:49:09 -04:00
Thomas E. Dickey
8fe8aafe7e
split lines at sentence endings
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-30 05:07:40 -04:00
Thomas E. Dickey
6f2cbcea5d
trim trailing whitespace from manpages
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-30 04:52:25 -04:00
Thomas E. Dickey
4abf482d8e
another fake-quote fix
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-30 04:36:24 -04:00
Thomas E. Dickey
c0f0651f2b
the last commit overlooked some fake-quote pairs
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
2019-07-30 04:34:54 -04:00
Walter Harms
ef31143c9d fix ``fake quotes'' in text
to remove the fake quotes replace them with propper
predefined macros \*(lq and \*(rq. this will allow
nroff to choose the propper characters when using ps etc.

Signed-off-by: Walter Harms <wharms@bfs.de>
2019-07-29 18:50:19 +02:00
Walter Harms
705027ea9b get rid of ``fake quotes''
these fake quotes are inside a comment and can be replaced with
some double quotes

Signed-off-by: Walter Harms <wharms@bfs.de>
2019-07-29 18:27:12 +02:00
Walter Harms
fe46eb2871 remove all private macro defines
after converting everything to st. man page macros there is
no need to maintain X11 private nroff macros, so remove them.

Signed-off-by: Walter Harms <wharms@bfs.de>
2019-07-29 17:57:02 +02:00
Walter Harms
b7f09ae19c Replace home-grown .Ds .De macro with man page .EX/.EE macro
Same pages use the man page .EX/.EE macro. Replace all occurences
of .De/.Ds with the std. macros to make the code better to maintain.

Signed-off-by: Walter Harms <wharms@bfs.de>
2019-07-29 17:47:35 +02:00
Walter Harms
951e772bc8 fix TBL format
Signed-off-by: Walter Harms <wharms@bfs.de>
2019-07-03 18:23:51 +02:00
Walter Harms
4eb167f5ac replace home grown .ZN with std, .B and .BR
Replace the home grown macro .ZN with std. macros
from man macro paket. So we can get rid of the
definition an get a clean header.

Signed-off-by: Walter Harms <wharms@bfs.de>
2019-07-03 18:18:09 +02:00
Walter Harms
08e6b36292 remove in-text macros
remove in-text macros an fix a few typos on the way.
hopefuly that will make maintenance more easy.

Signed-off-by: Walter Harms <wharms@bfs.de>
2019-06-22 18:33:48 +02:00
Walter Harms
cb0e894fe9 note that we can handle kbd==NULL
Signed-off-by: Walter Harms <wharms@bfs.de>
2019-06-21 18:01:16 +02:00
Adam Jackson
0327c427d6 makekeys: Detach ourselves from X headers entirely
Subsequent to a121b7b0c2 we are no longer
building makekeys with enough -I/foo/bar to find the X11 headers, so if
they're not in a system include path, things fail. Since this utility is
only needed at build time, there's no real reason to demand the X
headers be installed for both the build and target machines if cross-
compiling, we can just assume a vaguely ANSI environment instead.

Tested-by: Niclas Zeising <zeising@daemonic.se>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-06-17 14:17:29 -04:00
Matt Turner
57f0d421a1 libX11 1.6.8
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-06-17 10:45:45 -04:00
Matt Turner
5464b302bc Use AC_SYS_LARGEFILE
... and include config.h in makekeys.c to get the definition of
_FILE_OFFSET_BITS. Without it, libX11 can fail to build on a file
system with 64-bit inode numbers.

Bug: https://bugs.gentoo.org/550502
Bug: https://bugs.gentoo.org/616140
Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-06-09 14:55:04 -07:00
Ran Benita
33b9148a83 Compose.man: fix escaped hexadecimal char description
The man page says:
    Strings may be direct text encoded in the locale for which the
    compose file is to be used, or an escaped octal or hexadecimal
    character code.   Octal codes are specified as "\123" and
    hexadecimal codes as "\0x123a".

But the grammar in the parser and the implementation say:
    ESCAPED_CHAR  ::= ('\\' | '\"' | OCTAL | HEX )
    HEX           ::= '\' (x|X) HEX_CHAR [HEX_CHAR]]
    HEX_CHAR      ::= (0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F|a|b|c|d|e|f)

So "\0x123a" -> "\x3a".

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-06-09 10:42:07 -07:00
ojab
d9b2cc35ed Compose sequences for rouble sign
Cyrillic combinations mirror the Qwerty-Jcuken keyboard layout.

Signed-off-by: Slava Kardakov <ojab@ojab.ru>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-06-09 10:32:02 -07:00
Pavel Labath
3f211616f6 Fix a leak in XCreateFontSet
a simple snippet like XFreeFontSet(d, XCreateFontSet(d, ...)) will generate lots of memory leaks,
as evidenced by the following valgrind output:
==983== HEAP SUMMARY:
==983==     in use at exit: 39,409 bytes in 341 blocks
==983==   total heap usage: 4,795 allocs, 4,454 frees, 489,086 bytes allocated
==983==
==983== 1,688 (136 direct, 1,552 indirect) bytes in 1 blocks are definitely lost in loss record
40 of 46
==983==    at 0x4C2B042: realloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==983==    by 0x56D5A93: add_codeset.clone.9 (in /usr/lib64/libX11.so.6.3.0)
==983==    by 0x56D5FE0: load_generic (in /usr/lib64/libX11.so.6.3.0)
==983==    by 0x56D7612: initialize (in /usr/lib64/libX11.so.6.3.0)
==983==    by 0x56D7E75: _XlcCreateLC (in /usr/lib64/libX11.so.6.3.0)
==983==    by 0x56F9A5F: _XlcUtf8Loader (in /usr/lib64/libX11.so.6.3.0)
==983==    by 0x56DF815: _XOpenLC (in /usr/lib64/libX11.so.6.3.0)
==983==    by 0x56B255A: XOpenOM (in /usr/lib64/libX11.so.6.3.0)
==983==    by 0x56A665A: XCreateFontSet (in /usr/lib64/libX11.so.6.3.0)
==983==    by 0x4FCA80: conky::x11_output::create_gc() (x11.cc:746)
==983==    by 0x4FC3B4: conky::x11_output::use_own_window() (x11.cc:602)
==983==    by 0x4FAD42: conky::priv::own_window_setting::set(bool const&, bool) (x11.cc:92)
==983==
==983== LEAK SUMMARY:
==983==    definitely lost: 136 bytes in 1 blocks
==983==    indirectly lost: 1,552 bytes in 34 blocks
==983==      possibly lost: 0 bytes in 0 blocks
==983==    still reachable: 37,721 bytes in 306 blocks
==983==         suppressed: 0 bytes in 0 blocks

This patch makes the leak dissappear (Well, at least the "definitely lost part". The "still
reachable" thingy remains). After some analysis, I've discovered that the XLCd structure is
destroyed improperly. The "constructor" is in lcGeneric.c, but the structure is destroyed using
code from lcPublic.c. I've found that changing the destructor call to _XlcDestroyLC executes the
correct code path, and I'm pretty sure this is correct (the object was constructed using
_XlcCreateLC, it make sense to destroy it using its conterpart).

So far I haven't observed any strange behaviour on my system caused by this change (although, I'm
not sure, how many programs actually use this function).

Signed-off-by: Pavel Labath <pavelo@centrum.sk>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-06-09 09:52:32 -07:00
Jon Turney
4645e21913 Avoid using libtool wrapper for makekeys
For Windows targets, libtool uses a wrapper executable, not a wrapper
script (see [1]), which it compiles with the host compiler.  This
doesn't work when cross-compiling.

Since we don't actually need to link with anything, use the libtool flag
-all-static to tell it to stay completely out of this.

[1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html
2019-06-08 23:58:16 +00:00
Jon Turney
6886d9ba06 Use EXEEXT_FOR_BUILD for makekeys
Use EXEXT_FOR_BUILD, to fix cross-compiling where EXEEXT differs from
EXEEXT_FOR_BUILD, such as when building for Windows from unix.

(Note: As written, this assumes EXEEXT_FOR_BUILD is always empty when
cross-compiling.  There could be some elaborate autodetection for
EXEXT_FOR_BUILD, but for the moment, if you are cross-compiling from
Windows to Unix, you'll need to set EXEEXT_FOR_BUILD explicity...)
2019-06-08 23:58:16 +00:00
Jon Turney
a121b7b0c2 Remove makekeys dependency on X headers
This is the patch from https://bugs.freedesktop.org/show_bug.cgi?id=6669
by Pierre Ossman, reworked for master.

Avoid using LIBS (which are for host, but we don't need) and rewrite
makekeys slightly to avoid needing to include any X headers, which
avoids potentially having -I with host paths in CFLAGS, which can cause
standard headers e.g. stdio.h for the host to also be used, which can
break things...
2019-06-08 23:58:16 +00:00
Samuel Thibault
cbb59d1727 Braille: Fix typing quickly
On finishing releasing Braille keys, we should clear the just-commited
pattern, to reset the state to initial state, and avoid having to wait for
0.3s before typing the next pattern.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Jean-Philippe Mengual <jpmengual@hypra.fr>
2019-06-07 23:39:22 +02:00
Tapani Pälli
99a2cf1aa0 Protect colormap add/removal with display lock
This fixes a bug where concurrent threads call XCreateColormap and
XFreeColormap corrupting a linked list where colormap structures
are stored.

Fixes: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/94

v2: handle XCopyColormapAndFree also (Adam Jackson)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
2019-05-14 07:38:48 +03:00
Jon Turney
fea80d03c3
Add autoconf checks for headers we include for FIONREAD
Add autoconf checks for the extra headers we include to define FIONREAD.
This needs sys/socket.h on Cygwin, and none of the alternatives on
Windows.
2019-04-30 15:37:52 +01:00
Matthias Dieter Wallnöfer
87c77a1e6d locale.alias.pre - add the de_IT locale
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-16 08:49:47 -07:00
Matthias Dieter Wallnöfer
568f77f414 locale.dir.pre - add the de_IT locale
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-16 08:48:59 -07:00
Matthias Dieter Wallnöfer
38c0c92fea compose.dir.pre - add de_IT locale
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-16 08:48:40 -07:00
Matthias Dieter Wallnöfer
49f835611b Update locale.alias.pre - introduce the de_LI aliases (equivalent to de_CH)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-10 16:50:34 -07:00
Matthias Dieter Wallnöfer
ed669234d0 locale.dir.pre - fix the de_LI latin15 locale
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-10 16:50:21 -07:00
Josh Triplett
82b5c1454a compose.dir.pre: Give the C.UTF-8 locale a full set of UTF-8 compose sequences
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2019-03-10 16:44:21 -07:00
Alan Coopersmith
603c3ab25a Add missing close paren to XrmGetStringDatabase synopsis in man page
Fixes: commit 0642e99ac0

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-03-09 21:05:13 -08:00
Alan Coopersmith
6590cc41e3 Include reallocarray.h in tarballs so "make distcheck" passes
Fixes: commit bcf7b5aa06

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-23 11:43:51 -08:00
Alan Coopersmith
a4a7df0635 XlibInt.c: include headers needed for ioctl(...FIONREAD...) on Solaris
Fixes: commit 5538b3e4ae

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-23 11:43:51 -08:00
Alan Coopersmith
38ec04de7e specs/XKB: Fix misprint in documentation of XkbFreeGeomOverlayKeys()
Fixes: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/86
aka: https://bugs.freedesktop.org/show_bug.cgi?id=23550

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-23 11:43:51 -08:00
Alan Coopersmith
74f2f26811 specs/XKB: Fix misprint in documentation of XkbAllocGeomOverlayKeys()
Fixes: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/85
aka: https://bugs.freedesktop.org/show_bug.cgi?id=23549

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-23 11:43:51 -08:00
Alan Coopersmith
66b039a416 specs/XKB: Fix misprint in documentation of XkbAllocGeomOverlayRows()
Fixes: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/84
aka: https://bugs.freedesktop.org/show_bug.cgi?id=23548

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-23 11:43:51 -08:00
Alan Coopersmith
cdea0e8403 specs/XKB: Fix misprint in documentation of XkbGetNamedGeometry()
Fixes: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/82
aka: https://bugs.freedesktop.org/show_bug.cgi?id=23520

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-23 11:43:51 -08:00
Alan Coopersmith
c72d17ada9 XkbAllocGeomOverlayKey man page should be named XkbAllocGeomOverlayKeys
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-23 11:43:35 -08:00
Alan Coopersmith
05002b8aef Fix man page typo: XkbAllBellNotifyMask -> XkbAllBellEventsMask
Reported-by: Daniel Hahler <git@thequod.de>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-02-17 15:14:14 -08:00
Adam Jackson
5538b3e4ae _XDefaultIOError: Do better at detecting explicit shutdown
Currently, when the X server crashes or a client is disconnected with
XKillClient, you get a somewhat confusing error message from libX11
along the lines of:

XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 98 requests (40 known processed) with 0 events remaining.

What's happening here is the previous recvmsg has thrown EAGAIN, since
the socket is non-blocking. In this case, check whether the socket has
any more data to read, and if not treat it like EPIPE.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2019-01-16 11:45:34 -05:00
Adam Jackson
6d2cde9633 _XDefaultIOError: Reformat to be less ugly
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-01-16 11:45:34 -05:00
Alan Coopersmith
003e30a66a Avoid use-after-free in _XimProtoSetIMValues()
Fixes gitlab issue #49

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-01-01 14:34:04 -08:00
Alan Coopersmith
30656fd66a Fix implicit conversion warnings in _XlcCreateDefaultCharSet
lcCharSet.c:187:50: warning: implicit conversion changes signedness:
      'int' to 'unsigned long' [-Wsign-conversion]
    tmp = Xmalloc(name_len + 1 + ct_sequence_len + 1);
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
../../include/X11/Xlibint.h:453:32: note: expanded from macro 'Xmalloc'
                       ~~~~~~  ^~~~
lcCharSet.c:192:31: warning: implicit conversion changes signedness:
      'int' to 'unsigned long' [-Wsign-conversion]
    memcpy(tmp, name, name_len+1);
    ~~~~~~            ~~~~~~~~^~
lcCharSet.c:216:45: warning: implicit conversion changes signedness:
      'int' to 'unsigned long' [-Wsign-conversion]
    memcpy(tmp, ct_sequence, ct_sequence_len+1);
    ~~~~~~                   ~~~~~~~~~~~~~~~^~
lcCharSet.c:183:16: warning: implicit conversion loses integer precision:
      'unsigned long' to 'int' [-Wshorten-64-to-32]
    name_len = strlen(name);
             ~ ^~~~~~~~~~~~
lcCharSet.c:184:23: warning: implicit conversion loses integer precision:
      'unsigned long' to 'int' [-Wshorten-64-to-32]
    ct_sequence_len = strlen(ct_sequence);
                    ~ ^~~~~~~~~~~~~~~~~~~
lcCharSet.c:198:37: warning: implicit conversion loses integer precision:
     'long' to 'unsigned int' [-Wshorten-64-to-32]
        unsigned int length = colon - charset->name;
                     ~~~~~~   ~~~~~~^~~~~~~~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-01-01 12:22:32 -08:00
Alan Coopersmith
2e63009057 Remove no-longer-used name variable in _XGetAtomName
Fixes gcc warning:
GetAtomNm.c: In function ‘_XGetAtomName’:
GetAtomNm.c:39:11: warning: unused variable ‘name’ [-Wunused-variable]
     char *name;
           ^~~~

Introduced by commit 336c1e7a50

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-01-01 11:41:47 -08:00
Alan Coopersmith
f077871c2a Fix out-of-tree builds after commit 8a62e26515
In-tree builds found reallocarray.h in $(top_builddir)/src but the
out-of-tree build didn't find it at all.

Reported-by: Emmanuele Bassi <ebassi@gmail.com> from GNOME continuous integration pipeline
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-12-29 11:40:50 -08:00
Alan Coopersmith
ba7f7cc783 Convert src/xlibi18n to use reallocarray()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-12-08 10:06:42 -08:00