summaryrefslogtreecommitdiff
path: root/lib/libX11
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libX11')
-rw-r--r--lib/libX11/ChangeLog459
-rw-r--r--lib/libX11/aclocal.m464
-rw-r--r--lib/libX11/configure115
-rw-r--r--lib/libX11/configure.ac4
-rw-r--r--lib/libX11/man/xkb/Makefile.am2
-rw-r--r--lib/libX11/man/xkb/Makefile.in2
-rw-r--r--lib/libX11/man/xkb/XkbChangeControls.man111
-rw-r--r--lib/libX11/man/xkb/XkbGetNamedDeviceIndicator.man1
-rw-r--r--lib/libX11/man/xkb/XkbGetNamedIndicator.man58
-rw-r--r--lib/libX11/man/xkb/XkbKeyNumGroups.man54
-rw-r--r--lib/libX11/man/xkb/XkbOpenDisplay.man2
-rw-r--r--lib/libX11/man/xkb/XkbSetNamedDeviceIndicator.man1
-rw-r--r--lib/libX11/man/xkb/XkbSetNamedIndicator.man88
-rw-r--r--lib/libX11/modules/im/ximcp/imCallbk.c6
-rw-r--r--lib/libX11/modules/im/ximcp/imDefIc.c57
-rw-r--r--lib/libX11/modules/im/ximcp/imInsClbk.c2
-rw-r--r--lib/libX11/modules/im/ximcp/imLcIm.c8
-rw-r--r--lib/libX11/modules/im/ximcp/imLcLkup.c6
-rw-r--r--lib/libX11/modules/om/generic/omGeneric.c32
-rw-r--r--lib/libX11/specs/XKB/ch08.xml302
-rw-r--r--lib/libX11/src/DisName.c2
-rw-r--r--lib/libX11/src/FSWrap.c2
-rw-r--r--lib/libX11/src/FontNames.c16
-rw-r--r--lib/libX11/src/GetFPath.c13
-rw-r--r--lib/libX11/src/GetIFocus.c2
-rw-r--r--lib/libX11/src/GetImage.c16
-rw-r--r--lib/libX11/src/GetKCnt.c2
-rw-r--r--lib/libX11/src/GetPCnt.c2
-rw-r--r--lib/libX11/src/GetPntMap.c2
-rw-r--r--lib/libX11/src/GetSSaver.c2
-rw-r--r--lib/libX11/src/GrServer.c2
-rw-r--r--lib/libX11/src/LiHosts.c21
-rw-r--r--lib/libX11/src/ListExt.c21
-rw-r--r--lib/libX11/src/Macros.c2
-rw-r--r--lib/libX11/src/ModMap.c4
-rw-r--r--lib/libX11/src/QuKeybd.c2
-rw-r--r--lib/libX11/src/ReconfWM.c2
-rw-r--r--lib/libX11/src/SetHints.c4
-rw-r--r--lib/libX11/src/StColor.c1
-rw-r--r--lib/libX11/src/StColors.c1
-rw-r--r--lib/libX11/src/StrKeysym.c10
-rw-r--r--lib/libX11/src/Sync.c2
-rw-r--r--lib/libX11/src/UngrabSvr.c2
-rw-r--r--lib/libX11/src/XlibInt.c14
-rw-r--r--lib/libX11/src/xcb_io.c3
-rw-r--r--lib/libX11/src/xcms/cmsCmap.c2
-rw-r--r--lib/libX11/src/xcms/cmsProp.c1
-rw-r--r--lib/libX11/src/xkb/XKBAlloc.c8
-rw-r--r--lib/libX11/src/xkb/XKBExtDev.c2
-rw-r--r--lib/libX11/src/xlibi18n/lcCT.c10
-rw-r--r--lib/libX11/src/xlibi18n/lcDB.c2
-rw-r--r--lib/libX11/src/xlibi18n/lcGeneric.c75
-rw-r--r--lib/libX11/src/xlibi18n/lcPublic.c1
53 files changed, 1259 insertions, 366 deletions
diff --git a/lib/libX11/ChangeLog b/lib/libX11/ChangeLog
index b4f7df6e3..90c1ed50f 100644
--- a/lib/libX11/ChangeLog
+++ b/lib/libX11/ChangeLog
@@ -1,3 +1,462 @@
+commit 733f64bfeb311c1d040b2f751bfdef9c9d0f89ef
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date: Tue Aug 21 16:54:50 2018 +0200
+
+ libX11 1.6.6
+
+ Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 173704243fbcbea0b6de2068b4fb403c7408fb54
+Author: Matthieu Herrb <matthieu@herrb.eu>
+Date: Tue Aug 21 16:53:40 2018 +0200
+
+ Remove statement with no effect.
+
+ Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit e83722768fd5c467ef61fa159e8c6278770b45c2
+Author: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Fri Jul 27 16:38:00 2018 +0200
+
+ Fixed crash on invalid reply (CVE-2018-14598).
+
+ If the server sends a reply in which even the first string would
+ overflow the transmitted bytes, list[0] (or flist[0]) will be set to
+ NULL and a count of 0 is returned.
+
+ If the resulting list is freed with XFreeExtensionList or
+ XFreeFontPath later on, the first Xfree call:
+
+ Xfree (list[0]-1)
+ turns into
+ Xfree (NULL-1)
+
+ which will most likely trigger a segmentation fault.
+
+ I have modified the code to return NULL if the first string would
+ overflow, thus protecting the freeing functions later on.
+
+ Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
+
+commit dbf72805fd9d7b1846fe9a11b46f3994bfc27fea
+Author: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Fri Jul 27 16:37:17 2018 +0200
+
+ Fixed out of boundary write (CVE-2018-14600).
+
+ The length value is interpreted as signed char on many systems
+ (depending on default signedness of char), which can lead to an out of
+ boundary write up to 128 bytes in front of the allocated storage, but
+ limited to NUL byte(s).
+
+ Casting the length value to unsigned char fixes the problem and allows
+ string values with up to 255 characters.
+
+ Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
+
+commit b469da1430cdcee06e31c6251b83aede072a1ff0
+Author: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Fri Jul 27 16:36:34 2018 +0200
+
+ Fixed off-by-one writes (CVE-2018-14599).
+
+ The functions XGetFontPath, XListExtensions, and XListFonts are
+ vulnerable to an off-by-one override on malicious server responses.
+
+ The server replies consist of chunks consisting of a length byte
+ followed by actual string, which is not NUL-terminated.
+
+ While parsing the response, the length byte is overridden with '\0',
+ thus the memory area can be used as storage of C strings later on. To
+ be able to NUL-terminate the last string, the buffer is reserved with
+ an additional byte of space.
+
+ For a boundary check, the variable chend (end of ch) was introduced,
+ pointing at the end of the buffer which ch initially points to.
+ Unfortunately there is a difference in handling "the end of ch".
+
+ While chend points at the first byte that must not be written to,
+ the for-loop uses chend as the last byte that can be written to.
+
+ Therefore, an off-by-one can occur.
+
+ I have refactored the code so chend actually points to the last byte
+ that can be written to without an out of boundary access. As it is not
+ possible to achieve "ch + length < chend" and "ch + length + 1 > chend"
+ with the corrected chend meaning, I removed the inner if-check.
+
+ Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
+
+commit d81da209fd4d0c2c9ad0596a8078e58864479d0d
+Author: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Tue Jul 3 22:31:37 2018 +0200
+
+ Validation of server response in XListHosts.
+
+ If a server sends an incorrect length in its response, a client is prone
+ to perform an out of boundary read while processing the data.
+
+ The length field of xHostEntry is used to specify the amount of bytes
+ used to represent the address. It is 16 bit, which means that it is not
+ possible to perform an arbitrary memory access, but it might be enough
+ to read sensitive information, e.g. malloc-related pointers and offsets.
+
+ Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
+ Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit b676e62377483df77bcb6472d26b24f901323fa9
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Wed Jun 13 15:46:58 2018 +0200
+
+ XkbOpenDisplay.3: fix typo
+
+ XkbOpenDisplay returns a pointer to Display, not a Display.
+
+ Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+commit 9c5845ff0dc080ff10bd68af4fc40fcd805728ca
+Author: Martin Natano <natano@natano.net>
+Date: Sat Oct 8 19:57:50 2016 +0200
+
+ Don't rebuild ks_tables.h if nothing changed.
+
+ ks_tables.h is always considered out of date due to the forced rebuild
+ of the makekeys util. This means the file is also rebuilt during 'make
+ install', which is usually performed as root, which can to lead
+ permission problems later on.
+
+ Signed-off-by: Martin Natano <natano@natano.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 796f754cba6d75b676a0fc39b97802198fceda4f
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat May 5 14:43:30 2018 -0700
+
+ Change fall through comment in lcDB.c to match gcc's requirements
+
+ Needs to match one of the regexps shown under
+ https://gcc.gnu.org/onlinedocs/gcc-7.3.0/gcc/Warning-Options.html#index-Wimplicit-fallthrough
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 82ca6308757126fa7ffc6588f1e5d8e3be04251b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Mar 24 19:45:14 2018 -0700
+
+ Use size_t for buffer sizes in SetHints.c
+
+ These variables store values returned from strlen() as a size_t
+ and are passed to Xmalloc, which expects a size_t, so lets stop
+ converting back and forth to int along the way.
+
+ Reported by: Konstantin SKliarov
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+
+commit 50a5a98984097d614227d22a49265e12b172cac7
+Author: Bhavi Dhingra <b.dhingra@samsung.com>
+Date: Tue Jul 5 11:37:50 2016 +0530
+
+ Fix possible memory leak in cmsProp.c:140
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=96814
+
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a9dafdd57c71473fa3a2ec4887e973e4e9876d83
+Author: Michal Srb <msrb@suse.com>
+Date: Thu Mar 15 09:50:58 2018 +0100
+
+ Use flexible array member instead of fake size.
+
+ The _XimCacheStruct structure is followed in memory by two strings containing
+ fname and encoding. The memory was accessed using the last member of the
+ structure `char fname[1]`. That is a lie, prohibits us from using sizeof and
+ confuses checkers. Lets declare it properly as a flexible array, so compilers
+ don't complain about writing past that array. As bonus we can replace the
+ XOffsetOf with regular sizeof.
+
+ Fixes GCC8 error:
+ In function 'strcpy',
+ inlined from '_XimWriteCachedDefaultTree' at imLcIm.c:479:5,
+ inlined from '_XimCreateDefaultTree' at imLcIm.c:616:2,
+ inlined from '_XimLocalOpenIM' at imLcIm.c:700:5:
+ /usr/include/bits/string_fortified.h:90:10: error: '__builtin_strcpy'
+ forming offset 2 is out of the bounds [0, 1] [-Werror=array-bounds]
+ return __builtin___strcpy_chk (__dest, __src, __bos (__dest));
+
+ Caused by this line seemingly writing past the fname[1] array:
+ imLcIm.c:479: strcpy (m->fname+strlen(name)+1, encoding);
+
+ Reviewed-by: Keith Packard <keithp@keithp.com>
+ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 34f4464f69a4d6ff0d1042500a62f9a5ed7f3647
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Mar 6 11:42:27 2018 -0800
+
+ If XGetImage fails to create image, don't dereference it to bounds check
+
+ Reported by gcc 7.3:
+
+ GetImage.c:110:25: warning: potential null pointer dereference [-Wnull-dereference]
+ if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 ||
+ ~~~~~^~~~~~~~
+
+ Introduced by 8ea762f94f4c942d898fdeb590a1630c83235c17 in Xlib 1.6.4
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
+
+commit e835a9dcc3362b5e92893be756dd7ae361e64ced
+Author: wharms <wharms@bfs.de>
+Date: Sun Sep 3 14:17:45 2017 +0200
+
+ silence gcc warning assignment discards 'const' qualifier from pointer target type
+
+commit 36a1ac0253fea82ff79cc52ba56c5691cfd07a3b
+Author: wharms <wharms@bfs.de>
+Date: Sun Aug 20 21:51:57 2017 +0200
+
+ remove empty line
+
+commit e02dfe54f32b4165351d2712a9d2e0584906a3ce
+Author: wharms <wharms@bfs.de>
+Date: Sun Aug 20 21:50:33 2017 +0200
+
+ add _X_UNUSED to avoid unused variable warnings
+
+commit 2911c39cecd63ed3747072a5eeeb9eedffc881e9
+Author: walter harms <wharms@bfs.de>
+Date: Sat Jun 4 17:19:59 2016 +0200
+
+ Fixes: warning: variable 'req' set but not,used
+
+ Fixes: warning: variable 'req' set but not used [-Wunused-but-set-variable]
+ by marking req _X_UNUSED
+ Solution was discussed on xorg-devel ML
+ Peter Hutter, Alan Coopersmith
+ Re: [PATCH libX11 3/5] fix: warning: pointer targets in passing argument 2 of '_XSend' differ in signedness [-Wpointer-sign]
+
+ Signed-off-by: harms wharms@bfs.de
+
+commit bf82ec0402479fd8399d69e7d62fc17d7956699a
+Author: walter harms <wharms@bfs.de>
+Date: Sat Jun 4 17:22:07 2016 +0200
+
+ mark _XDefaultIOError as no_return
+
+ mark _XDefaultIOError as no_return. No one comes back from exit() ...
+
+ Signed-off-by: harms wharms@bfs.de
+
+commit 9abe8380074edea3ac4e72466ec47e921ca05e47
+Author: walter harms <wharms@bfs.de>
+Date: Sat Jun 4 17:21:52 2016 +0200
+
+ no need to check XFree arguments
+
+ You can save a bit of code. The is no need to check XFree arguments bring free_fontdataOM in line with other free function and check for NULL arg
+
+ Signed-off-by: harms wharms@bfs.de
+
+commit 433477fcb7e07d0c26a22ba78aae88827ed1f440
+Author: walter harms <wharms@bfs.de>
+Date: Tue Apr 26 16:32:20 2016 +0200
+
+ fix memleak in error path
+
+ free all mem on error
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit ed9f0d34abc645eee56e21863f23acb4d0bb8e9a
+Author: walter harms <wharms@bfs.de>
+Date: Tue Apr 26 17:58:16 2016 +0200
+
+ fix memleak in error path
+
+ V2: remove unneeded NULL (reported by eric.engestrom@imgtec.com)
+
+ fix mem leak in error path
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit 7c78fc57693afa94cf26170f0f6276e3b7374ed0
+Author: walter harms <wharms@bfs.de>
+Date: Tue Apr 26 16:34:11 2016 +0200
+
+ no need to check args for Xfree()
+
+ simplify code
+
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit c1c14af441ae73d1a8e67a971fafcf967e45ac48
+Author: walter harms <wharms@bfs.de>
+Date: Tue Apr 26 16:23:46 2016 +0200
+
+ remove stray extern
+
+ remove stray extern
+
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit 714921f041a245dc5f37a689268b584226a2ccb9
+Author: walter harms <wharms@bfs.de>
+Date: Mon Apr 11 18:26:52 2016 +0200
+
+ no need to check argument for _XkbFree()
+
+ simplify code by removing unneeded checks
+
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit d02c2466f65063a03c97dbcee05071c12a3676e6
+Author: walter harms <wharms@bfs.de>
+Date: Mon Apr 11 18:22:38 2016 +0200
+
+ fix more shadow warning
+
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit 0355c3926d5372f9762f235071dbd94a89bbbdad
+Author: walter harms <wharms@bfs.de>
+Date: Thu Mar 31 19:16:33 2016 +0200
+
+ fix shadow char_size
+
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit 916dffadf052135df3398651be873c353da629e1
+Author: walter harms <wharms@bfs.de>
+Date: Thu Mar 31 19:14:32 2016 +0200
+
+ remove argument check for free() adjust one inden
+
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit 6ec901ebca3fea6a762e22090dc35b1b90911133
+Author: walter harms <wharms@bfs.de>
+Date: Thu Mar 31 19:12:17 2016 +0200
+
+ _XIOError(dpy); will never return so remore dead
+
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit 83107a677b2ed458e4d62ea4a601e8181d3683d8
+Author: walter harms <wharms@bfs.de>
+Date: Thu Mar 31 19:10:49 2016 +0200
+
+ fix shadow warning
+
+ Signed-off-by: walter harms <wharms@bfs.de>
+
+commit 4fe66b1c5112b07bd09e28bbc021911d08a9621f
+Author: Ryan C. Gordon <icculus@icculus.org>
+Date: Wed Aug 2 02:41:03 2017 -0400
+
+ Valgrind fix for XStoreColor and XStoreColors.
+
+ If the "pad" field isn't set, Valgrind will report it as uninitialized
+ memory accesses when the struct is copied into the Display's send buffer.
+
+ In practice, this is (probably) harmless, but Valgrind is correct in
+ believing it's a bug.
+
+ https://bugs.freedesktop.org/attachment.cgi?id=133189
+
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7d2010fec25c2f52b873ad0572479eb43128b038
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Apr 7 00:13:03 2017 -0700
+
+ Improve table formatting in XkbChangeControls & XkbKeyNumGroups man pages
+
+ Includes fix for Solaris Bug 24564279: "XkbKeyNumGroups.3x11 man page
+ contains some malformed text" caused by extra whitespace after .TE macros
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b856d5d929047d1ea169814d56e43784ea404c83
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Mar 16 00:05:49 2017 -0700
+
+ Clarify state parameter to XkbSetNamedDeviceIndicator
+
+ Checking a Bool to see if it's NULL does not work well in C.
+ Also reported in https://bugs.freedesktop.org/show_bug.cgi?id=251
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit c6dadd4cebd994aafb37a58b3adbaa82507c2d18
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Wed Mar 15 23:50:26 2017 -0700
+
+ Make Xkb{Get,Set}NamedIndicator spec & manpages match code
+
+ The XKB Library spec and the man pages for XkbGetNamedIndicator &
+ XkbSetNamedIndicator included a device_spec argument neither function
+ takes, and do not include the XkbGetNamedDeviceIndicator &
+ XkbSetNamedDeviceIndicator variants that do take it (along with two
+ other arguments).
+
+ This updates them to match the interfaces the code has provided for
+ decades.
+
+ This has been reported multiple times, so this fixes:
+ https://bugs.freedesktop.org/show_bug.cgi?id=251
+ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729812
+ Sun Bug 4528016 XkbSetNamedIndicator & XkbGetNamedIndicator man pages are wrong
+ (filed: alan.coopersmith@sun.com 2001-11-15 - now aka Oracle bug 15087506)
+ X.Org Group Defect Id #9418
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Adam Jackson <ajax@redhat.com>
+
+commit 2d20890e7ffd3ee88a9ceb25cdd2ac1fe7aaceb6
+Author: Arthur Huillet <ahuillet@nvidia.com>
+Date: Wed Feb 1 15:02:41 2017 +0100
+
+ _XDefaultError: set XlibDisplayIOError flag before calling exit
+
+ _XReply isn't reentrant, and it can lead to deadlocks when the default error
+ handler is called: _XDefaultError calls exit(1). It is called indirectly by
+ _XReply when a X protocol error comes in that isn't filtered/handled by an
+ extension or the application. This means that if the application (or one of its
+ loaded shared libraries such as the NVIDIA OpenGL driver) has registered any
+ _fini destructor, _fini will get called while still on the call stack of
+ _XReply. If the destructor interacts with the X server and calls _XReply, it
+ will hit a deadlock, looping on the following in _XReply:
+
+ ConditionWait(dpy, dpy->xcb->reply_notify);
+
+ It is legal for an application to make Xlib calls during _fini, and that is
+ useful for an OpenGL driver to avoid resource leaks on the X server side, for
+ example in the dlopen/dlclose case. However, the driver can not readily tell
+ whether its _fini is being called because Xlib called exit, or for another
+ reason (dlclose), so it is hard to cleanly work around this issue in the driver.
+
+ This change makes it so _XReply effectively becomes a no-op when called after
+ _XDefaultError was called, as though an XIOError had happened. The dpy
+ connection isn't broken at that point, but any call to _XReply is going to hang.
+ This is a bit of a kludge, because the more correct solution would be to make
+ _XReply reentrant, maybe by broadcasting the reply_notify condition before
+ calling the default error handler. However, such a change would carry a grater
+ risk of introducing regressions in Xlib.
+
+ This change will drop some valid requests on the floor, but this should not
+ matter, as it will only do so in the case where the application is dying: X will
+ clean up after it once exit() is done running. There is the case of
+ XSetCloseDownMode(RETAIN_PERMANENT), but an application using that and wishing
+ to clean up resources in _fini would currently be hitting a deadlock, which is
+ hardly a better situation.
+
+ Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
+ Reviewed-by: Jamey Sharp <jamey@minilop.net>
+
commit 42f4d7af9cf6d1dbfa575552e057328b054a20c9
Author: Matt Turner <mattst88@gmail.com>
Date: Sat Feb 25 21:54:22 2017 -0800
diff --git a/lib/libX11/aclocal.m4 b/lib/libX11/aclocal.m4
index 044fc927b..a2168f154 100644
--- a/lib/libX11/aclocal.m4
+++ b/lib/libX11/aclocal.m4
@@ -1248,7 +1248,7 @@ m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
-dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+dnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
@@ -1285,7 +1285,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.19.0])
+m4_define([vers_have], [1.19.2])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1363,6 +1363,17 @@ AC_DEFUN([XORG_MANPAGE_SECTIONS],[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_SED])
+case $host_os in
+ solaris*)
+ # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
+ # check for a man page file found in later versions that use
+ # traditional section numbers instead
+ AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
+ [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
+ ;;
+ *) SYSV_MAN_SECTIONS=false ;;
+esac
+
if test x$APP_MAN_SUFFIX = x ; then
APP_MAN_SUFFIX=1
fi
@@ -1378,9 +1389,9 @@ if test x$LIB_MAN_DIR = x ; then
fi
if test x$FILE_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) FILE_MAN_SUFFIX=4 ;;
- *) FILE_MAN_SUFFIX=5 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) FILE_MAN_SUFFIX=4 ;;
+ *) FILE_MAN_SUFFIX=5 ;;
esac
fi
if test x$FILE_MAN_DIR = x ; then
@@ -1388,9 +1399,9 @@ if test x$FILE_MAN_DIR = x ; then
fi
if test x$MISC_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) MISC_MAN_SUFFIX=5 ;;
- *) MISC_MAN_SUFFIX=7 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) MISC_MAN_SUFFIX=5 ;;
+ *) MISC_MAN_SUFFIX=7 ;;
esac
fi
if test x$MISC_MAN_DIR = x ; then
@@ -1398,9 +1409,9 @@ if test x$MISC_MAN_DIR = x ; then
fi
if test x$DRIVER_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) DRIVER_MAN_SUFFIX=7 ;;
- *) DRIVER_MAN_SUFFIX=4 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) DRIVER_MAN_SUFFIX=7 ;;
+ *) DRIVER_MAN_SUFFIX=4 ;;
esac
fi
if test x$DRIVER_MAN_DIR = x ; then
@@ -1408,9 +1419,9 @@ if test x$DRIVER_MAN_DIR = x ; then
fi
if test x$ADMIN_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) ADMIN_MAN_SUFFIX=1m ;;
- *) ADMIN_MAN_SUFFIX=8 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) ADMIN_MAN_SUFFIX=1m ;;
+ *) ADMIN_MAN_SUFFIX=8 ;;
esac
fi
if test x$ADMIN_MAN_DIR = x ; then
@@ -1671,13 +1682,24 @@ m4_ifval([$1],
fi])
# Test for the ability of xmlto to generate a text target
+#
+# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
+# following test for empty XML docbook files.
+# For compatibility reasons use the following empty XML docbook file and if
+# it fails try it again with a non-empty XML file.
have_xmlto_text=no
cat > conftest.xml << "EOF"
EOF
AS_IF([test "$have_xmlto" = yes],
[AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
[have_xmlto_text=yes],
- [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+ [# Try it again with a non-empty XML file.
+ cat > conftest.xml << "EOF"
+<x></x>
+EOF
+ AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+ [have_xmlto_text=yes],
+ [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
rm -f conftest.xml
AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
@@ -3073,8 +3095,9 @@ AC_REQUIRE([PKG_PROG_PKG_CONFIG])
macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
+touch \$(top_srcdir)/INSTALL; \
+echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
AC_SUBST([INSTALL_CMD])
]) # XORG_INSTALL
dnl Copyright 2005 Red Hat, Inc
@@ -3135,10 +3158,11 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
#
#
AC_DEFUN([XORG_CHANGELOG], [
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
+|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
+touch \$(top_srcdir)/ChangeLog; \
+echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
AC_SUBST([CHANGELOG_CMD])
]) # XORG_CHANGELOG
diff --git a/lib/libX11/configure b/lib/libX11/configure
index 1f2b41d58..bb9ec330d 100644
--- a/lib/libX11/configure
+++ b/lib/libX11/configure
@@ -1,8 +1,8 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libX11 1.6.5.
+# Generated by GNU Autoconf 2.69 for libX11 1.6.6.
#
-# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+# Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libx11/issues>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -275,7 +275,7 @@ fi
$as_echo "$0: be upgraded to zsh 4.3.4 or later."
else
$as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+$0: https://gitlab.freedesktop.org/xorg/lib/libx11/issues
$0: about your system, including any error possibly output
$0: before this message. Then install a modern shell, or
$0: manually run the script under such a shell if you do
@@ -651,9 +651,9 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libX11'
PACKAGE_TARNAME='libX11'
-PACKAGE_VERSION='1.6.5'
-PACKAGE_STRING='libX11 1.6.5'
-PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
+PACKAGE_VERSION='1.6.6'
+PACKAGE_STRING='libX11 1.6.6'
+PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libx11/issues'
PACKAGE_URL=''
ac_unique_file="Makefile.am"
@@ -1510,7 +1510,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libX11 1.6.5 to adapt to many kinds of systems.
+\`configure' configures libX11 1.6.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1580,7 +1580,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libX11 1.6.5:";;
+ short | recursive ) echo "Configuration of libX11 1.6.6:";;
esac
cat <<\_ACEOF
@@ -1683,7 +1683,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
+Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libx11/issues>.
_ACEOF
ac_status=$?
fi
@@ -1746,7 +1746,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libX11 configure 1.6.5
+libX11 configure 1.6.6
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1905,9 +1905,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ---------------------------------------------------------------------- ##
-## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
-## ---------------------------------------------------------------------- ##"
+( $as_echo "## -------------------------------------------------------------------- ##
+## Report this to https://gitlab.freedesktop.org/xorg/lib/libx11/issues ##
+## -------------------------------------------------------------------- ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
@@ -2272,7 +2272,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libX11 $as_me 1.6.5, which was
+It was created by libX11 $as_me 1.6.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4490,7 +4490,7 @@ fi
# Define the identity of the package.
PACKAGE='libX11'
- VERSION='1.6.5'
+ VERSION='1.6.6'
cat >>confdefs.h <<_ACEOF
@@ -17859,10 +17859,11 @@ _ACEOF
-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
+CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
-|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
-echo 'git directory not found: installing possibly empty changelog.' >&2)"
+|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
+touch \$(top_srcdir)/ChangeLog; \
+echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
@@ -17870,14 +17871,45 @@ echo 'git directory not found: installing possibly empty changelog.' >&2)"
macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
-|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
-echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
+|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
+touch \$(top_srcdir)/INSTALL; \
+echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
+case $host_os in
+ solaris*)
+ # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
+ # check for a man page file found in later versions that use
+ # traditional section numbers instead
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5
+$as_echo_n "checking for /usr/share/man/man7/attributes.7... " >&6; }
+if ${ac_cv_file__usr_share_man_man7_attributes_7+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ test "$cross_compiling" = yes &&
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
+if test -r "/usr/share/man/man7/attributes.7"; then
+ ac_cv_file__usr_share_man_man7_attributes_7=yes
+else
+ ac_cv_file__usr_share_man_man7_attributes_7=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5
+$as_echo "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; }
+if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes; then :
+ SYSV_MAN_SECTIONS=false
+else
+ SYSV_MAN_SECTIONS=true
+fi
+
+ ;;
+ *) SYSV_MAN_SECTIONS=false ;;
+esac
+
if test x$APP_MAN_SUFFIX = x ; then
APP_MAN_SUFFIX=1
fi
@@ -17893,9 +17925,9 @@ if test x$LIB_MAN_DIR = x ; then
fi
if test x$FILE_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) FILE_MAN_SUFFIX=4 ;;
- *) FILE_MAN_SUFFIX=5 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) FILE_MAN_SUFFIX=4 ;;
+ *) FILE_MAN_SUFFIX=5 ;;
esac
fi
if test x$FILE_MAN_DIR = x ; then
@@ -17903,9 +17935,9 @@ if test x$FILE_MAN_DIR = x ; then
fi
if test x$MISC_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) MISC_MAN_SUFFIX=5 ;;
- *) MISC_MAN_SUFFIX=7 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) MISC_MAN_SUFFIX=5 ;;
+ *) MISC_MAN_SUFFIX=7 ;;
esac
fi
if test x$MISC_MAN_DIR = x ; then
@@ -17913,9 +17945,9 @@ if test x$MISC_MAN_DIR = x ; then
fi
if test x$DRIVER_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) DRIVER_MAN_SUFFIX=7 ;;
- *) DRIVER_MAN_SUFFIX=4 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) DRIVER_MAN_SUFFIX=7 ;;
+ *) DRIVER_MAN_SUFFIX=4 ;;
esac
fi
if test x$DRIVER_MAN_DIR = x ; then
@@ -17923,9 +17955,9 @@ if test x$DRIVER_MAN_DIR = x ; then
fi
if test x$ADMIN_MAN_SUFFIX = x ; then
- case $host_os in
- solaris*) ADMIN_MAN_SUFFIX=1m ;;
- *) ADMIN_MAN_SUFFIX=8 ;;
+ case $SYSV_MAN_SECTIONS in
+ true) ADMIN_MAN_SUFFIX=1m ;;
+ *) ADMIN_MAN_SUFFIX=8 ;;
esac
fi
if test x$ADMIN_MAN_DIR = x ; then
@@ -18173,6 +18205,11 @@ esac
fi
# Test for the ability of xmlto to generate a text target
+#
+# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
+# following test for empty XML docbook files.
+# For compatibility reasons use the following empty XML docbook file and if
+# it fails try it again with a non-empty XML file.
have_xmlto_text=no
cat > conftest.xml << "EOF"
EOF
@@ -18180,10 +18217,18 @@ if test "$have_xmlto" = yes; then :
if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then :
have_xmlto_text=yes
else
+ # Try it again with a non-empty XML file.
+ cat > conftest.xml << "EOF"
+<x></x>
+EOF
+ if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then :
+ have_xmlto_text=yes
+else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: xmlto cannot generate text format, this format skipped" >&5
$as_echo "$as_me: WARNING: xmlto cannot generate text format, this format skipped" >&2;}
fi
fi
+fi
rm -f conftest.xml
if test $have_xmlto_text = yes; then
HAVE_XMLTO_TEXT_TRUE=
@@ -21361,7 +21406,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libX11 $as_me 1.6.5, which was
+This file was extended by libX11 $as_me 1.6.6, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -21421,13 +21466,13 @@ $config_headers
Configuration commands:
$config_commands
-Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>."
+Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libx11/issues>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libX11 config.status 1.6.5
+libX11 config.status 1.6.6
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/lib/libX11/configure.ac b/lib/libX11/configure.ac
index 9f1953ee9..56fd2cb38 100644
--- a/lib/libX11/configure.ac
+++ b/lib/libX11/configure.ac
@@ -1,8 +1,8 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libX11], [1.6.5],
- [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libX11])
+AC_INIT([libX11], [1.6.6],
+ [https://gitlab.freedesktop.org/xorg/lib/libx11/issues], [libX11])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([src/config.h include/X11/XlibConf.h])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/lib/libX11/man/xkb/Makefile.am b/lib/libX11/man/xkb/Makefile.am
index 484a85a99..7632faa38 100644
--- a/lib/libX11/man/xkb/Makefile.am
+++ b/lib/libX11/man/xkb/Makefile.am
@@ -111,6 +111,7 @@ libman_PRE = \
XkbGetKeyboardByName.man \
XkbGetMap.man \
XkbGetNameChanges.man \
+ XkbGetNamedDeviceIndicator.man \
XkbGetNamedGeometry.man \
XkbGetNamedIndicator.man \
XkbGetNames.man \
@@ -191,6 +192,7 @@ libman_PRE = \
XkbSetIndicatorMap.man \
XkbSetMap.man \
XkbSetModActionVMods.man \
+ XkbSetNamedDeviceIndicator.man \
XkbSetNamedIndicator.man \
XkbSetNames.man \
XkbSetPtrActionX.man \
diff --git a/lib/libX11/man/xkb/Makefile.in b/lib/libX11/man/xkb/Makefile.in
index c6f6e375f..88f6f25c4 100644
--- a/lib/libX11/man/xkb/Makefile.in
+++ b/lib/libX11/man/xkb/Makefile.in
@@ -405,6 +405,7 @@ libman_PRE = \
XkbGetKeyboardByName.man \
XkbGetMap.man \
XkbGetNameChanges.man \
+ XkbGetNamedDeviceIndicator.man \
XkbGetNamedGeometry.man \
XkbGetNamedIndicator.man \
XkbGetNames.man \
@@ -485,6 +486,7 @@ libman_PRE = \
XkbSetIndicatorMap.man \
XkbSetMap.man \
XkbSetModActionVMods.man \
+ XkbSetNamedDeviceIndicator.man \
XkbSetNamedIndicator.man \
XkbSetNames.man \
XkbSetPtrActionX.man \
diff --git a/lib/libX11/man/xkb/XkbChangeControls.man b/lib/libX11/man/xkb/XkbChangeControls.man
index 751e0c9e7..8f2b8f272 100644
--- a/lib/libX11/man/xkb/XkbChangeControls.man
+++ b/lib/libX11/man/xkb/XkbChangeControls.man
@@ -97,39 +97,43 @@ l l l l l
lw(1.5i) lw(1.5i) l lw(1.5i) l.
Table 1 Xkb Controls
_
-Control Control
- Selection Relevant
- Mask XkbControlsRec Boolean Control
- (which parameter) DataFields enabled_ctrls bit Section
-_
+Control Control
+ Selection Relevant
+ Mask (which XkbControlsRec Boolean Control
+ parameter) DataFields enabled_ctrls bit Section
+_
T{
AccessXFeedback
T} T{
-XkbAccessXFeedbackMask
-T} ax_options: T{
-XkbAccessXFeedbackMask
+XkbAccessX\%FeedbackMask
+T} T{
+ax_options:
+ XkbAX_*FBMask
+T} T{
+XkbAccessX\%FeedbackMask
T} 10.6.3
- XkbAX_*FBMask
T{
AccessXKeys
T} T{
-XkbAccessXKeysMask
+XkbAccessX\%Keys\%Mask
T} 10.6.1
T{
-AccessXTimeout
+AccessX\%Timeout
+T} T{
+XkbAccessX\%Timeout\%Mask
+T} T{
+ax_timeout
+axt_opts_mask
+axt_opts_values
+axt_ctrls_mask
+axt_ctrls_values
T} T{
-XkbAccessXTimeoutMask
-T} ax_timeout T{
-XkbAccessXTimeoutMask
+XkbAccessX\%Timeout\%Mask
T} 10.6.2
- axt_opts_mask
- axt_opts_values
- axt_ctrls_mask
- axt_ctrls_values
T{
AudibleBell
T} T{
-XkbAudibleBellMask
+XkbAudible\%Bell\%Mask
T} 9.2
T{
AutoReset
@@ -137,9 +141,9 @@ T} 10.1.2
T{
BounceKeys
T} T{
-XkbBounceKeysMask
+XkbBounce\%KeysMask
T} debounce_delay T{
-XkbBounceKeysMask
+XkbBounce\%KeysMask
T} 10.6.7
T{
Detectable-
@@ -150,35 +154,35 @@ T}
T{
EnabledControls
T} T{
-XkbControlsEnabledMask
+XkbControls\%EnabledMask
T} enabled_ctrls T{
-Non-Boolean Control
+Non-Boolean \%Control
T} 10.1.1
T{
GroupsWrap
T} T{
-XkbGroupsWrapMask
+XkbGroups\%Wrap\%Mask
T} groups_wrap T{
-Non-Boolean Control
+Non-Boolean \%Control
T} 10.7.1
T{
IgnoreGroupLock
T} T{
-XkbIgnoreGroupLockMask
+XkbIgnore\%GroupLock\%Mask
T} 10.7.3
T{
IgnoreLockMods
T} T{
-XkbIgnoreLockModsMask
+XkbIgnore\%LockMods\%Mask
T} ignore_lock T{
-Non-Boolean Control
+Non-Boolean \%Control
T} 5.1
T{
InternalMods
T} T{
-XkbInternalModsMask
+XkbInternal\%Mods\%Mask
T} internal T{
-Non-Boolean Control
+Non-Boolean \%Control
T} 5.1
T{
MouseKeys
@@ -190,14 +194,16 @@ T} 10.5.1
T{
MouseKeysAccel
T} T{
-XkbMouseKeysAccelMask
-T} mk_delay T{
-XkbMouseKeysAccelMask
+XkbMouseKeys\%Accel\%Mask
+T} T{
+mk_delay
+mk_interval
+mk_time_to_max
+mk_max_speed
+mk_curve
+T} T{
+XkbMouseKeys\%Accel\%Mask
T} 10.5.2
- mk_interval
- mk_time_to_max
- mk_max_speed
- mk_curve
T{
Overlay1
T} T{
@@ -211,35 +217,37 @@ T} 10.4
T{
PerKeyRepeat
T} T{
-XkbPerKeyRepeatMask
+XkbPerKey\%Repeat\%Mask
T} per_key_repeat T{
-Non-Boolean Control
+Non-Boolean \%Control
T} 10.3.1
T{
RepeatKeys
T} T{
-XkbRepeatKeysMask
+Xkb\%Repeat\%Keys\%Mask
T} repeat_delay T{
-XkbRepeatKeysMask
+Xkb\%Repeat\%Keys\%Mask
T} 10.3
repeat_interval
T{
SlowKeys
T} T{
-XkbSlowKeysMask
+Xkb\%Slow\%Keys\%Mask
T} slow_keys_delay T{
-XkbSlowKeysMask
+Xkb\%Slow\%Keys\%Mask
T} 10.6.6
T{
StickyKeys
T} T{
-XkbStickyKeysMask
-T} ax_options: T{
-XkbStickyKeysMask
+Xkb\%Sticky\%Keys\%Mask
+T} T{
+ax_options:
+ XkbAX_TwoKeysMask
+ XkbAX_LatchToLockMask
+T} T{
+Xkb\%Sticky\%Keys\%Mask
T} 10.6.8
- XkbAX_TwoKeysMask
- XkbAX_LatchToLockMask
-.TE
+.TE
Table 2 shows the actual values for the individual mask bits used to select
controls for
@@ -260,8 +268,9 @@ l l l l
l l l l.
Table 2 Controls Mask Bits
_
-Mask Bit which or enabled Value
- changed_ctrls _ctrls
+Mask Bit which or Value
+ changed enabled
+ _ctrls _ctrls
_
XkbRepeatKeysMask ok ok (1L<<0)
XkbSlowKeysMask ok ok (1L<<1)
diff --git a/lib/libX11/man/xkb/XkbGetNamedDeviceIndicator.man b/lib/libX11/man/xkb/XkbGetNamedDeviceIndicator.man
new file mode 100644
index 000000000..ebe427e18
--- /dev/null
+++ b/lib/libX11/man/xkb/XkbGetNamedDeviceIndicator.man
@@ -0,0 +1 @@
+.so man__libmansuffix__/XkbGetNamedIndicator.__libmansuffix__
diff --git a/lib/libX11/man/xkb/XkbGetNamedIndicator.man b/lib/libX11/man/xkb/XkbGetNamedIndicator.man
index 803d656a2..be65056b8 100644
--- a/lib/libX11/man/xkb/XkbGetNamedIndicator.man
+++ b/lib/libX11/man/xkb/XkbGetNamedIndicator.man
@@ -1,4 +1,4 @@
-.\" Copyright 1999 Oracle and/or its affiliates. All rights reserved.
+.\" Copyright 1999, 2017, Oracle and/or its affiliates. All rights reserved.
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a
.\" copy of this software and associated documentation files (the "Software"),
@@ -25,9 +25,19 @@ XkbGetNamedIndicator \- Look up the indicator map and other information for an
indicator by name
.SH SYNOPSIS
.HP
-.B Bool XkbGetNamedIndicator
+.B Bool XkbGetNamedDeviceIndicator
.BI "(\^Display *" "dpy" "\^,"
.BI "unsigned int " "dev_spec" "\^,"
+.BI "unsigned int " "led_class" "\^,"
+.BI "unsigned int " "led_id" "\^,"
+.BI "Atom " "name" "\^,"
+.BI "int *" "ndx_rtrn" "\^,"
+.BI "Bool *" "state_rtrn" "\^,"
+.BI "XkbIndicatorMapPtr " "map_rtrn" "\^,"
+.BI "Bool *" "real_rtrn" "\^);"
+.HP
+.B Bool XkbGetNamedIndicator
+.BI "(\^Display *" "dpy" "\^,"
.BI "Atom " "name" "\^,"
.BI "int *" "ndx_rtrn" "\^,"
.BI "Bool *" "state_rtrn" "\^,"
@@ -43,6 +53,12 @@ connection to the X server
.I \- dev_spec
keyboard device ID, or XkbUseCoreKbd
.TP
+.I \- led_class
+feedback class, or XkbDfltXIClass
+.TP
+.I \- led_id
+feedback ID, or XkbDfltXIId
+.TP
.I \- name
name of the indicator to be retrieved
.TP
@@ -65,16 +81,16 @@ to get the indicator names. Using names eliminates the need for hard-coding
bitmask values for particular keyboards. For example, instead of using
vendor-specific constants such as WSKBLed_ScrollLock mask on Digital
workstations or XLED_SCROLL_LOCK on Sun workstations, you can instead use
-.I XkbGetNamedIndicator
+.I XkbGetNamedDeviceIndicator
to look up information on the indicator named "Scroll Lock."
If the device specified by
.I device_spec
has an indicator named
-.I name, XkbGetNamedIndicator
+.IR name ", " XkbGetNamedDeviceIndicator
returns True and populates the rest of the parameters with information about the
indicator. Otherwise,
-.I XkbGetNamedIndicator
+.I XkbGetNamedDeviceIndicator
returns False.
The
@@ -95,22 +111,42 @@ Each of the "
" arguments is optional; you can pass NULL for any unneeded "
.I _rtrn
" arguments.
+
+.LP
+.I XkbGetNamedIndicator
+is a convenience function that calls
+.I XkbGetNamedDeviceIndicator
+with a
+.I device_spec
+of
+.BR XkbUseCoreKbd ,
+a
+.I led_class
+of
+.BR XkbDfltXIClass ,
+and a
+.I led_id
+of
+.BR XkbDfltXIId .
+It returns the return value from
+.IR XkbGetNamedDeviceIndicator .
+
.SH "RETURN VALUES"
.TP 15
True
The
-.I XkbGetNamedIndicator
-function returns True if the device specified by
+.IR XkbGetNamedIndicator " and " XkbGetNamedDeviceIndicator
+functions return True if the device specified by
.I device_spec
has an indicator named
-.I name.
+.IR name .
.TP 15
False
The
-.I XkbGetNamedIndicator
-function returns False if the device specified by
+.IR XkbGetNamedIndicator " and " XkbGetNamedDeviceIndicator
+functions return False if the device specified by
.I device_spec
does not have an indicator named
-.I name.
+.IR name .
.SH "SEE ALSO"
.BR XkbGetNames (__libmansuffix__)
diff --git a/lib/libX11/man/xkb/XkbKeyNumGroups.man b/lib/libX11/man/xkb/XkbKeyNumGroups.man
index 537747335..c241329ef 100644
--- a/lib/libX11/man/xkb/XkbKeyNumGroups.man
+++ b/lib/libX11/man/xkb/XkbKeyNumGroups.man
@@ -97,7 +97,7 @@ XkbRedirectIntoRange XkbRedirectIntoRange
XkbClampIntoRange XkbClampIntoRange
none of the above XkbWrapIntoRange
.TE
-
+.LP
.\"--- Chapter 10
The Xkb extension is composed of two parts: a server extension, and a
client-side X library extension.
@@ -142,7 +142,7 @@ function to manipulate one
control individually, you do not use an XkbControlsRec structure directly.
The Xkb controls are grouped as shown in Table 2.
-
+.ad l
.TS
c s s
l l l
@@ -152,43 +152,51 @@ _
Type of Control Control Name Boolean Control?
_
T{
-Controls for enabling and disabling other controls
+Controls for enabling and \%disabling other controls
T} EnabledControls No
- AutoReset No
+\^ AutoReset No
+_
T{
Control for bell behavior
T} AudibleBell Boolean
+_
T{
Controls for repeat key behavior
T} PerKeyRepeat No
- RepeatKeys Boolean
- DetectableAutorepeat Boolean
+\^ RepeatKeys Boolean
+\^ DetectableAutorepeat Boolean
+_
T{
-Controls for keyboard overlays
+Controls for \%keyboard overlays
T} Overlay1 Boolean
- Overlay2 Boolean
+\^ Overlay2 Boolean
+_
T{
Controls for using the mouse from the keyboard
T} MouseKeys Boolean
- MouseKeysAccel Boolean
+\^ MouseKeysAccel Boolean
+_
T{
Controls for better keyboard access by
-T} AccessXFeedback Boolean
-T{
physically impaired persons
-T} AccessXKeys Boolean
- AccessXTimeout Boolean
- BounceKeys Boolean
- SlowKeys Boolean
- StickyKeys Boolean
+T} AccessXFeedback Boolean
+\^ AccessXKeys Boolean
+\^ AccessXTimeout Boolean
+\^ BounceKeys Boolean
+\^ SlowKeys Boolean
+\^ StickyKeys Boolean
+_
T{
Controls for general keyboard mapping
T} GroupsWrap No
- IgnoreGroupLock Boolean
- IgnoreLockMods No
- InternalMods No
-.TE
+\^ IgnoreGroupLock Boolean
+\^ IgnoreLockMods No
+\^ InternalMods No
+_
+.TE
+.ad n
+.LP
The individual categories and controls are described first, together with
functions for manipulating
them.
@@ -209,12 +217,12 @@ handling */
unsigned char width; /\(** max # of shift levels for key */
unsigned short offset; /\(** index to keysym table in syms array
*/
-} XkbSymMapRec, *XkbSymMapPtr;
+ } XkbSymMapRec, *XkbSymMapPtr;
.fi
-
-.nf
+.LP
The XkbControlsRec structure is defined as follows:
+.nf
#define XkbMaxLegalKeyCode 255
#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)
diff --git a/lib/libX11/man/xkb/XkbOpenDisplay.man b/lib/libX11/man/xkb/XkbOpenDisplay.man
index 78b6520d3..302984a38 100644
--- a/lib/libX11/man/xkb/XkbOpenDisplay.man
+++ b/lib/libX11/man/xkb/XkbOpenDisplay.man
@@ -25,7 +25,7 @@ XkbOpenDisplay \- Checks for a compatible version of the Xkb extension in both
the library and the server, and initializes the extension for use.
.SH SYNOPSIS
.HP
-.B Display XkbOpenDisplay
+.B Display *XkbOpenDisplay
.BI "(\^char *" "display_name" "\^,"
.BI "int *" "event_rtrn" "\^,"
.BI "int *" "error_rtrn" "\^,"
diff --git a/lib/libX11/man/xkb/XkbSetNamedDeviceIndicator.man b/lib/libX11/man/xkb/XkbSetNamedDeviceIndicator.man
new file mode 100644
index 000000000..65b5e9d81
--- /dev/null
+++ b/lib/libX11/man/xkb/XkbSetNamedDeviceIndicator.man
@@ -0,0 +1 @@
+.so man__libmansuffix__/XkbSetNamedIndicator.__libmansuffix__
diff --git a/lib/libX11/man/xkb/XkbSetNamedIndicator.man b/lib/libX11/man/xkb/XkbSetNamedIndicator.man
index 5cd558d5c..81df50fce 100644
--- a/lib/libX11/man/xkb/XkbSetNamedIndicator.man
+++ b/lib/libX11/man/xkb/XkbSetNamedIndicator.man
@@ -1,4 +1,4 @@
-.\" Copyright 1999 Oracle and/or its affiliates. All rights reserved.
+.\" Copyright 1999, 2017, Oracle and/or its affiliates. All rights reserved.
.\"
.\" Permission is hereby granted, free of charge, to any person obtaining a
.\" copy of this software and associated documentation files (the "Software"),
@@ -26,9 +26,19 @@ the state of the indicator; sets the indicator to a specified state and sets the
indicator map for the indicator
.SH SYNOPSIS
.HP
-.B Bool XkbSetNamedIndicator
+.HP
+.B Bool XkbSetNamedDeviceIndicator
.BI "(\^Display *" "dpy" "\^,"
.BI "unsigned int " "device_spec" "\^,"
+.BI "unsigned int " "led_class" "\^,"
+.BI "unsigned int " "led_id" "\^,"
+.BI "Atom " "name" "\^,"
+.BI "Bool " "change_state" "\^,"
+.BI "Bool " "state" "\^,"
+.BI "Bool " "create_new" "\^,"
+.BI "XkbIndicatorMapPtr " "map" "\^);"
+.B Bool XkbSetNamedIndicator
+.BI "(\^Display *" "dpy" "\^,"
.BI "Atom " "name" "\^,"
.BI "Bool " "change_state" "\^,"
.BI "Bool " "state" "\^,"
@@ -44,6 +54,12 @@ connection to the X server
.I \- device_spec
device ID, or XkbUseCoreKbd
.TP
+.I \- led_class
+feedback class, or XkbDfltXIClass
+.TP
+.I \- led_id
+feedback ID, or XkbDfltXIId
+.TP
.I \- name
name of the indicator to change
.TP
@@ -61,7 +77,7 @@ new map for the indicator
.SH DESCRIPTION
.LP
If a compatible version of the Xkb extension is not available in the server,
-.I XkbSetNamedIndicator
+.I XkbSetNamedDeviceIndicator
returns False. Otherwise, it sends a request to the X server to change the
indicator specified by
.I name
@@ -69,13 +85,16 @@ and returns True.
If
.I change_state
-is True, and the optional parameter,
-.I state,
-is not NULL,
-.I XkbSetNamedIndicator
+is True,
+.I XkbSetNamedDeviceIndicator
tells the server to change the state of the named indicator to the value
specified by
-.I state.
+.IR state .
+If
+.I change_state
+is False, then
+.I state
+is not used.
If an indicator with the name specified by
.I name
@@ -85,26 +104,45 @@ parameter tells the server whether it should create a new named indicator. If
.I create_new
is True, the server finds the first indicator that doesn't have a name and gives
it the name specified by
-.I name.
+.IR name .
If the optional parameter,
-.I map, is not NULL,
-.I XkbSetNamedIndicator
+.IR map ,
+is not NULL,
+.I XkbSetNamedDeviceIndicator
tells the server to change the indicator's map to the values specified in
-.I map.
+.IR map .
In addition, it can also generate XkbIndicatorStateNotify,
XkbIndicatorMapNotify, and XkbNamesNotify events.
+.LP
+.I XkbSetNamedIndicator
+is a convenience function that calls
+.I XkbSetNamedDeviceIndicator
+with a
+.I device_spec
+of
+.BR XkbUseCoreKbd ,
+a
+.I led_class
+of
+.BR XkbDfltXIClass ,
+and a
+.I led_id
+of
+.BR XkbDfltXIId .
+It returns the return value from
+.IR XkbSetNamedDeviceIndicator .
.SH "RETURN VALUES"
.TP 15
True
The
-.I XkbSetNamedIndicator
-function returns True if a compatible version of the Xkb extension is available in the server.
+.IR XkbSetNamedIndicator " and " XkbSetNamedDeviceIndicator
+functions return True if a compatible version of the Xkb extension is available in the server.
.TP 15
False
The
-.I XkbSetNamedIndicator
-function returns False if a compatible version of the Xkb extension is not available in the server.
+.IR XkbSetNamedIndicator " and " XkbSetNamedDeviceIndicator
+functions return False if a compatible version of the Xkb extension is not available in the server.
.SH DIAGNOSTICS
.TP 15
.B BadAtom
@@ -112,6 +150,24 @@ A name is neither a valid Atom or None
.TP 15
.B BadImplementation
Invalid reply from server
+.TP 15
+.B BadKeyboard
+.I device_spec
+does not specify a device with indicators.
+.TP 15
+.B BadMatch
+.I led_id
+is not
+.B DfltXIId
+and does not specify a feedback of the class specified by
+.I led_class
+on the device specified by
+.IR device_spec .
+.TP 15
+.B BadValue
+.I led_class
+does not specify
+.BR DfltXIClass ", " LedFeedbackClass ", or " KbdFeedbackClass .
.SH "SEE ALSO"
.BR XkbIndicatorMapNotify (__libmansuffix__),
.BR XkbIndicatorStateNotify (__libmansuffix__),
diff --git a/lib/libX11/modules/im/ximcp/imCallbk.c b/lib/libX11/modules/im/ximcp/imCallbk.c
index 4e091d8ef..ead0806c6 100644
--- a/lib/libX11/modules/im/ximcp/imCallbk.c
+++ b/lib/libX11/modules/im/ximcp/imCallbk.c
@@ -624,16 +624,16 @@ _XimPreeditCaretCallback(Xim im,
*/
{
CARD8 buf[sz_ximPacketHeader + sz_ximPreeditCaretReply];
- INT16 len = sz_XIMID + sz_XICID + sz_ximPreeditCaretReply;
+ INT16 rlen = sz_XIMID + sz_XICID + sz_ximPreeditCaretReply;
int p;
- _XimSetHeader((XPointer)buf, XIM_PREEDIT_CARET_REPLY, 0, &len);
+ _XimSetHeader((XPointer)buf, XIM_PREEDIT_CARET_REPLY, 0, &rlen);
p = XIM_HEADER_SIZE;
*(CARD16*)&buf[p] = (CARD16)im->private.proto.imid; p += sz_CARD16;
*(CARD16*)&buf[p] = (CARD16)ic->private.proto.icid; p += sz_CARD16;
*(CARD32*)&buf[p] = (CARD32)cbs.position;
- if (!(_XimWriteData(im, len, buf))) {
+ if (!(_XimWriteData(im, rlen, buf))) {
return XimCbError;
}
_XimFlushData(im);
diff --git a/lib/libX11/modules/im/ximcp/imDefIc.c b/lib/libX11/modules/im/ximcp/imDefIc.c
index 143bd5942..7564dbadf 100644
--- a/lib/libX11/modules/im/ximcp/imDefIc.c
+++ b/lib/libX11/modules/im/ximcp/imDefIc.c
@@ -231,10 +231,9 @@ _XimReCreateIC(ic)
_XimRegisterFilter(ic);
MARK_IC_CONNECTED(ic);
- if (save_ic->private.proto.ic_resources)
- Xfree(save_ic->private.proto.ic_resources);
- if (save_ic->private.proto.ic_inner_resources)
- Xfree(save_ic->private.proto.ic_inner_resources);
+
+ Xfree(save_ic->private.proto.ic_resources);
+ Xfree(save_ic->private.proto.ic_inner_resources);
Xfree(save_ic);
return True;
@@ -833,7 +832,7 @@ _XimDestroyICCheck(
&& (imid == im->private.proto.imid)
&& (buf_s[2] & XIM_ICID_VALID)
&& (icid == ic->private.proto.icid))
- ret = False;
+ ret = False;
return ret;
}
@@ -845,22 +844,22 @@ _XimProtoICFree(
Xim im = (Xim)ic->core.im;
#endif
- if (ic->private.proto.preedit_font) {
- Xfree(ic->private.proto.preedit_font);
- ic->private.proto.preedit_font = NULL;
- }
- if (ic->private.proto.status_font) {
- Xfree(ic->private.proto.status_font);
- ic->private.proto.status_font = NULL;
- }
+
+ Xfree(ic->private.proto.preedit_font);
+ ic->private.proto.preedit_font = NULL;
+
+
+ Xfree(ic->private.proto.status_font);
+ ic->private.proto.status_font = NULL;
+
if (ic->private.proto.commit_info) {
_XimFreeCommitInfo(ic);
ic->private.proto.commit_info = NULL;
}
- if (ic->private.proto.ic_inner_resources) {
- Xfree(ic->private.proto.ic_inner_resources);
- ic->private.proto.ic_inner_resources = NULL;
- }
+
+ Xfree(ic->private.proto.ic_inner_resources);
+ ic->private.proto.ic_inner_resources = NULL;
+
#ifdef XIM_CONNECTABLE
if (IS_SERVER_CONNECTED(im) && IS_RECONNECTABLE(im)) {
@@ -868,18 +867,18 @@ _XimProtoICFree(
}
#endif /* XIM_CONNECTABLE */
- if (ic->private.proto.saved_icvalues) {
- Xfree(ic->private.proto.saved_icvalues);
- ic->private.proto.saved_icvalues = NULL;
- }
- if (ic->private.proto.ic_resources) {
- Xfree(ic->private.proto.ic_resources);
- ic->private.proto.ic_resources = NULL;
- }
- if (ic->core.hotkey) {
- Xfree(ic->core.hotkey);
- ic->core.hotkey = NULL;
- }
+
+ Xfree(ic->private.proto.saved_icvalues);
+ ic->private.proto.saved_icvalues = NULL;
+
+
+ Xfree(ic->private.proto.ic_resources);
+ ic->private.proto.ic_resources = NULL;
+
+
+ Xfree(ic->core.hotkey);
+ ic->core.hotkey = NULL;
+
return;
}
diff --git a/lib/libX11/modules/im/ximcp/imInsClbk.c b/lib/libX11/modules/im/ximcp/imInsClbk.c
index d5527e036..961aabaaa 100644
--- a/lib/libX11/modules/im/ximcp/imInsClbk.c
+++ b/lib/libX11/modules/im/ximcp/imInsClbk.c
@@ -108,7 +108,7 @@ _XimFilterPropertyNotify(
}
lock = True;
- for( ii = 0; ii < nitems; ii++, atoms ) {
+ for( ii = 0; ii < nitems; ii++ ) {
if(XGetSelectionOwner (display, atoms[ii])) {
for( icb = callback_list; icb; icb = icb->next ) {
if( !icb->call && !icb->destroy ) {
diff --git a/lib/libX11/modules/im/ximcp/imLcIm.c b/lib/libX11/modules/im/ximcp/imLcIm.c
index c19695df8..743df77b7 100644
--- a/lib/libX11/modules/im/ximcp/imLcIm.c
+++ b/lib/libX11/modules/im/ximcp/imLcIm.c
@@ -82,8 +82,8 @@ struct _XimCacheStruct {
DTCharIndex mbused;
DTCharIndex wcused;
DTCharIndex utf8used;
- char fname[1];
- /* char encoding[1] */
+ char fname[];
+ /* char encoding[] */
};
static struct _XimCacheStruct* _XimCache_mmap = NULL;
@@ -281,7 +281,7 @@ _XimReadCachedDefaultTree(
assert (m->id == XIM_CACHE_MAGIC);
assert (m->version == XIM_CACHE_VERSION);
if (size != m->size ||
- size < XOffsetOf (struct _XimCacheStruct, fname) + namelen + encodinglen) {
+ size < sizeof (struct _XimCacheStruct) + namelen + encodinglen) {
fprintf (stderr, "Ignoring broken XimCache %s [%s]\n", name, encoding);
munmap (m, size);
return False;
@@ -442,7 +442,7 @@ _XimWriteCachedDefaultTree(
int fd;
FILE *fp;
struct _XimCacheStruct *m;
- int msize = (XOffsetOf(struct _XimCacheStruct, fname)
+ int msize = (sizeof(struct _XimCacheStruct)
+ strlen(name) + strlen(encoding) + 2
+ XIM_CACHE_TREE_ALIGNMENT-1) & -XIM_CACHE_TREE_ALIGNMENT;
DefTreeBase *b = &im->private.local.base;
diff --git a/lib/libX11/modules/im/ximcp/imLcLkup.c b/lib/libX11/modules/im/ximcp/imLcLkup.c
index 9e4aec319..56dba9673 100644
--- a/lib/libX11/modules/im/ximcp/imLcLkup.c
+++ b/lib/libX11/modules/im/ximcp/imLcLkup.c
@@ -61,8 +61,8 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
||(ic->private.local.brl_committed != 0))) {
if (ic->private.local.brl_committed != 0) { /* Braille Event */
unsigned char pattern = ic->private.local.brl_committed;
- char mb[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)];
- ret = _Xlcwctomb(ic->core.im->core.lcd, mb, BRL_UC_ROW | pattern);
+ char mb2[XLC_PUBLIC(ic->core.im->core.lcd, mb_cur_max)];
+ ret = _Xlcwctomb(ic->core.im->core.lcd, mb2, BRL_UC_ROW | pattern);
if(ret > bytes) {
if(status) *status = XBufferOverflow;
return(ret);
@@ -74,7 +74,7 @@ _XimLocalMbLookupString(XIC xic, XKeyEvent *ev, char *buffer, int bytes,
} else {
if(status) *status = XLookupChars;
}
- memcpy(buffer, mb, ret);
+ memcpy(buffer, mb2, ret);
} else {
if(keysym) {
if(status) *status = XLookupKeySym;
diff --git a/lib/libX11/modules/om/generic/omGeneric.c b/lib/libX11/modules/om/generic/omGeneric.c
index 61070ca3f..22f826ec0 100644
--- a/lib/libX11/modules/om/generic/omGeneric.c
+++ b/lib/libX11/modules/om/generic/omGeneric.c
@@ -1617,15 +1617,14 @@ free_fontdataOM(
FontData font_data,
int font_data_count)
{
+ if (!font_data)
+ return;
+
for( ; font_data_count-- ; font_data++) {
- if(font_data->name){
Xfree(font_data->name);
font_data->name = NULL;
- }
- if(font_data->scopes){
Xfree(font_data->scopes);
font_data->scopes = NULL;
- }
}
}
@@ -1639,51 +1638,41 @@ close_om(
if ((data = gen->data)) {
for (count = gen->data_num; count-- > 0; data++) {
- if (data->charset_list){
Xfree(data->charset_list);
data->charset_list = NULL;
- }
+
/* free font_data for om */
- if (data->font_data) {
free_fontdataOM(data->font_data,data->font_data_count);
Xfree(data->font_data);
data->font_data = NULL;
- }
+
/* free substitute for om */
- if (data->substitute) {
free_fontdataOM(data->substitute,data->substitute_num);
Xfree(data->substitute);
data->substitute = NULL;
- }
+
/* free vmap for om */
- if (data->vmap) {
free_fontdataOM(data->vmap,data->vmap_num);
Xfree(data->vmap);
data->vmap = NULL;
- }
+
/* free vrotate for om */
- if (data->vrotate) {
Xfree(data->vrotate);
data->vrotate = NULL;
- }
}
Xfree(gen->data);
gen->data = NULL;
}
- if (gen->object_name){
Xfree(gen->object_name);
gen->object_name = NULL;
- }
- if (om->core.res_name){
Xfree(om->core.res_name);
om->core.res_name = NULL;
- }
- if (om->core.res_class){
+
Xfree(om->core.res_class);
om->core.res_class = NULL;
- }
+
if (om->core.required_charset.charset_list &&
om->core.required_charset.charset_count > 0){
XFreeStringList(om->core.required_charset.charset_list);
@@ -1692,10 +1681,9 @@ close_om(
Xfree((char*)om->core.required_charset.charset_list);
om->core.required_charset.charset_list = NULL;
}
- if (om->core.orientation_list.orientation){
+
Xfree(om->core.orientation_list.orientation);
om->core.orientation_list.orientation = NULL;
- }
Xfree(om);
diff --git a/lib/libX11/specs/XKB/ch08.xml b/lib/libX11/specs/XKB/ch08.xml
index 3bb6be629..aa308c0bf 100644
--- a/lib/libX11/specs/XKB/ch08.xml
+++ b/lib/libX11/specs/XKB/ch08.xml
@@ -62,7 +62,7 @@ as discussed in <xref linkend="Symbolic_Names" />. Then set the map using
<function>XkbSetMap</function>
(see <link linkend="Changing_Map_Components_in_the_Server">section 14.3</link>)
or
-<function>XkbSetNamedIndicator</function>
+<function>XkbSetNamedDeviceIndicator</function>
(below). To retrieve indicator names, use
<function>XkbGetNames</function>
(<xref linkend="Symbolic_Names" />).
@@ -266,7 +266,7 @@ is not, and if you call a function which updates the server’s image of the
indicator map (such as
<function>XkbSetIndicatorMap</function>
or
-<function>XkbSetNamedIndicator</function>),
+<function>XkbSetNamedDeviceIndicator</function>),
Xkb changes the keyboard state and controls to reflect the other fields of
the indicator map, as described in the remainder of this section. If you
attempt to explicitly change the value of an indicator for which
@@ -840,7 +840,7 @@ implementation, uses a mask to specify the indicators. The second method, which
is more suitable for applications concerned with interoperability, uses
indicator names. The correspondence between the indicator name and the bit
position in masks is as follows: one of the parameters returned from
-<function>XkbGetNamedIndicator</function>
+<function>XkbGetNamedDeviceIndicator</function>
is an index that is the bit position to use in any function call that requires
a mask of indicator bits, as well as the indicator’s index into the
<structname>XkbIndicatorRec</structname>
@@ -1038,20 +1038,22 @@ of using vendor-specific constants such as
mask on Digital workstations or
<symbol>XLED_SCROLL_LOCK</symbol>
on Sun workstations, you can instead use
+<function>XkbGetNamedDeviceIndicator</function> or
<function>XkbGetNamedIndicator</function>
to look up information on the indicator named <quote>Scroll Lock.</quote>
</para>
<para>
Use
-<function>XkbGetNamedIndicator</function>
-to look up the indicator map and other information for an indicator by name.
+<function>XkbGetNamedDeviceIndicator</function>
+to look up the indicator map and other information for an indicator by name
+on a specific device.
</para>
-<indexterm significance="preferred" zone="XkbGetNamedIndicator"><primary><function>XkbGetNamedIndicator</function></primary></indexterm>
-<funcsynopsis id="XkbGetNamedIndicator">
+<indexterm significance="preferred" zone="XkbGetNamedDeviceIndicator"><primary><function>XkbGetNamedDeviceIndicator</function></primary></indexterm>
+<funcsynopsis id="XkbGetNamedDeviceIndicator">
<funcprototype>
- <funcdef>Bool <function>XkbGetNamedIndicator</function></funcdef>
+ <funcdef>Bool <function>XkbGetNamedDeviceIndicator</function></funcdef>
<!-- (
<parameter>dpy</parameter>,
<parameter>dev_spec</parameter>,
@@ -1064,6 +1066,8 @@ to look up the indicator map and other information for an indicator by name.
<paramdef>Display *<parameter>dpy</parameter></paramdef>
<paramdef>unsigned int <parameter>device_spec</parameter></paramdef>
+ <paramdef>unsigned int <parameter>led_class</parameter></paramdef>
+ <paramdef>unsigned int <parameter>led_id</parameter></paramdef>
<paramdef>Atom <parameter>name</parameter></paramdef>
<paramdef>int *<parameter>ndx_rtrn</parameter></paramdef>
<paramdef>Bool *<parameter>state_rtrn</parameter></paramdef>
@@ -1094,6 +1098,26 @@ to look up the indicator map and other information for an indicator by name.
</varlistentry>
<varlistentry>
<term>
+ <parameter>led_class</parameter>
+ </term>
+ <listitem>
+ <para>
+ feedback class, or <symbol>XkbDfltXIClass</symbol>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>led_id</parameter>
+ </term>
+ <listitem>
+ <para>
+ feedback ID, or <symbol>XkbDfltXIId</symbol>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
<parameter>name</parameter>
</term>
<listitem>
@@ -1148,14 +1172,16 @@ to look up the indicator map and other information for an indicator by name.
<para>
If the device specified by
<parameter>device_spec</parameter>
+with feedback specified by
+<parameter>led_class</parameter> and <parameter>led_id</parameter>
has an indicator named
<parameter>name</parameter>,
-<function>XkbGetNamedIndicator</function>
+<function>XkbGetNamedDeviceIndicator</function>
returns
<symbol>True</symbol>
and populates the rest of the parameters with information about the indicator.
Otherwise,
-<function>XkbGetNamedIndicator</function>
+<function>XkbGetNamedDeviceIndicator</function>
returns
<symbol>False</symbol>.
</para>
@@ -1192,7 +1218,7 @@ for any unneeded "<parameter>_rtrn</parameter>" arguments.
<para>
-<function>XkbGetNamedIndicator</function>
+<function>XkbGetNamedDeviceIndicator</function>
can generate
<errorname>BadAtom</errorname>
and
@@ -1200,6 +1226,108 @@ and
errors.
</para>
+<para>
+As a convenience function, Xkb provides a function to get information about
+indicators with the default class and identifier on the default device:
+<function>XkbGetNamedIndicator</function>.
+</para>
+
+
+<indexterm significance="preferred" zone="XkbGetNamedIndicator"><primary><function>XkbGetNamedIndicator</function></primary></indexterm>
+<funcsynopsis id="XkbGetNamedIndicator">
+ <funcprototype>
+ <funcdef>Bool <function>XkbGetNamedIndicator</function></funcdef>
+ <paramdef>Display *<parameter>dpy</parameter></paramdef>
+ <paramdef>Atom <parameter>name</parameter></paramdef>
+ <paramdef>int *<parameter>ndx_rtrn</parameter></paramdef>
+ <paramdef>Bool *<parameter>state_rtrn</parameter></paramdef>
+ <paramdef>XkbIndicatorMapPtr <parameter>map_rtrn</parameter></paramdef>
+ <paramdef>Bool *<parameter>real_rtrn</parameter></paramdef>
+ </funcprototype>
+</funcsynopsis>
+<variablelist>
+ <varlistentry>
+ <term>
+ <parameter>dpy</parameter>
+ </term>
+ <listitem>
+ <para>
+ connection to the X server
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>name</parameter>
+ </term>
+ <listitem>
+ <para>
+ name of the indicator to be retrieved
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>ndx_rtrn</parameter>
+ </term>
+ <listitem>
+ <para>
+ backfilled with the index of the retrieved indicator
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>state_rtrn</parameter>
+ </term>
+ <listitem>
+ <para>
+ backfilled with the current state of the retrieved indicator
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>map_rtrn</parameter>
+ </term>
+ <listitem>
+ <para>
+ backfilled with the mapping for the retrieved indicator
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>real_rtrn</parameter>
+ </term>
+ <listitem>
+ <para>
+ backfilled with <symbol>True</symbol>
+ if the named indicator is real (physical)
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+<function>XkbGetNamedIndicator</function>
+calls
+<function>XkbGetNamedDeviceIndicator</function>
+with the specified parameters, a
+<structfield>device_spec</structfield>
+of
+<symbol>XkbUseCoreKbd</symbol>,
+a
+<structfield>led_class</structfield>
+of
+<symbol>XkbDfltXIClass</symbol>,
+and a
+<structfield>led_id</structfield>
+of
+<symbol>XkbDfltXIId</symbol>,
+and returns the value which was returned by
+<function>XkbGetNamedDeviceIndicator</function>.
+</para>
</sect2>
</sect1>
@@ -1222,7 +1350,7 @@ There are two ways to make changes to indicator maps and state: either change a
local copy of the indicator maps and use
<function>XkbSetIndicatorMap</function>
or
-<function>XkbSetNamedIndicator</function>,
+<function>XkbSetNamedDeviceIndicator</function>,
or, to reduce network traffic, use an
<structname>XkbIndicatorChangesRec</structname>
structure and use
@@ -1252,7 +1380,7 @@ is not, and if you call a function that updates the server’s image of the
indicator map (such as
<function>XkbSetIndicatorMap</function>
or
-<function>XkbSetNamedIndicator</function>),
+<function>XkbSetNamedDeviceIndicator</function>),
Xkb changes the keyboard state and controls to reflect the other fields of
the indicator map. If you attempt to explicitly change the value of an
indicator for which
@@ -1404,6 +1532,7 @@ parameter to the server.
<title>Changing Indicator Maps by Name</title>
<para>
+<function>XkbSetNamedDeviceIndicator</function> and
<function>XkbSetNamedIndicator</function>
can do several related things:
</para>
@@ -1431,10 +1560,10 @@ Set the indicator map for the indicator
</listitem>
</itemizedlist>
-<indexterm significance="preferred" zone="XkbSetNamedIndicator"><primary><function>XkbSetNamedIndicator</function></primary></indexterm>
-<funcsynopsis id="XkbSetNamedIndicator">
+<indexterm significance="preferred" zone="XkbSetNamedDeviceIndicator"><primary><function>XkbSetNamedDeviceIndicator</function></primary></indexterm>
+<funcsynopsis id="XkbSetNamedDeviceIndicator">
<funcprototype>
- <funcdef>Bool<function>XkbSetNamedIndicator</function></funcdef>
+ <funcdef>Bool<function>XkbSetNamedDeviceIndicator</function></funcdef>
<!-- (
<parameter>dpy</parameter>,
<parameter>device_spec</parameter>,
@@ -1446,6 +1575,8 @@ Set the indicator map for the indicator
<paramdef>Display *<parameter>dpy</parameter></paramdef>
<paramdef>unsigned int <parameter>device_spec</parameter></paramdef>
+ <paramdef>unsigned int <parameter>led_class</parameter></paramdef>
+ <paramdef>unsigned int <parameter>led_id</parameter></paramdef>
<paramdef>Atom <parameter>name</parameter></paramdef>
<paramdef>Bool <parameter>change_state</parameter></paramdef>
<paramdef>Bool <parameter>state</parameter></paramdef>
@@ -1476,6 +1607,26 @@ Set the indicator map for the indicator
</varlistentry>
<varlistentry>
<term>
+ <parameter>led_class</parameter>
+ </term>
+ <listitem>
+ <para>
+ feedback class, or <symbol>XkbDfltXIClass</symbol>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>led_id</parameter>
+ </term>
+ <listitem>
+ <para>
+ feedback ID, or <symbol>XkbDfltXIId</symbol>
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
<parameter>name</parameter>
</term>
<listitem>
@@ -1529,7 +1680,7 @@ Set the indicator map for the indicator
<para>
If a compatible version of the Xkb extension is not available in the server,
-<function>XkbSetNamedIndicator</function>
+<function>XkbSetNamedDeviceIndicator</function>
returns
<symbol>False</symbol>.
Otherwise, it sends a request to the X server to change the indicator
@@ -1545,14 +1696,16 @@ If
<parameter>change_state</parameter>
is
<symbol>True</symbol>,
-and the optional parameter,
-<parameter>state</parameter>,
-is not
-<symbol>NULL</symbol>,
-<function>XkbSetNamedIndicator</function>
+<function>XkbSetNamedDeviceIndicator</function>
tells the server to change the state of the named indicator to the value
specified by
<parameter>state</parameter>.
+If
+<parameter>change_state</parameter>
+is
+<symbol>False</symbol>,
+<parameter>state</parameter>
+is not used.
</para>
@@ -1576,13 +1729,13 @@ If the optional parameter,
<parameter>map</parameter>,
is not
<symbol>NULL</symbol>,
-<function>XkbSetNamedIndicator</function>
+<function>XkbSetNamedDeviceIndicator</function>
tells the server to change the indicator’s map to the values specified
in <parameter>map</parameter>.
</para>
<para>
-<function>XkbSetNamedIndicator</function>
+<function>XkbSetNamedDeviceIndicator</function>
can generate
<errorname>BadAtom</errorname>
and
@@ -1596,6 +1749,107 @@ and
events (see <link linkend="Tracking_Name_Changes">section 18.5</link>).
</para>
+<para>
+As a convenience function, Xkb provides a function to set information about
+indicators with the default class and identifier on the default device:
+<function>XkbSetNamedIndicator</function>.
+</para>
+
+<indexterm significance="preferred" zone="XkbSetNamedIndicator"><primary><function>XkbSetNamedIndicator</function></primary></indexterm>
+<funcsynopsis id="XkbSetNamedIndicator">
+ <funcprototype>
+ <funcdef>Bool<function>XkbSetNamedIndicator</function></funcdef>
+ <paramdef>Display *<parameter>dpy</parameter></paramdef>
+ <paramdef>Atom <parameter>name</parameter></paramdef>
+ <paramdef>Bool <parameter>change_state</parameter></paramdef>
+ <paramdef>Bool <parameter>state</parameter></paramdef>
+ <paramdef>Bool <parameter>create_new</parameter></paramdef>
+ <paramdef>XkbIndicatorMapPtr <parameter>map</parameter></paramdef>
+ </funcprototype>
+</funcsynopsis>
+<variablelist>
+ <varlistentry>
+ <term>
+ <parameter>dpy</parameter>
+ </term>
+ <listitem>
+ <para>
+ connection to the X server
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>name</parameter>
+ </term>
+ <listitem>
+ <para>
+ name of the indicator to change
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>change_state</parameter>
+ </term>
+ <listitem>
+ <para>
+ whether to change the indicator state or not
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>state</parameter>
+ </term>
+ <listitem>
+ <para>
+ desired new state for the indicator
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>create_new</parameter>
+ </term>
+ <listitem>
+ <para>
+ whether a new indicator with the specified name should be
+ created when necessary
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <parameter>map</parameter>
+ </term>
+ <listitem>
+ <para>
+ new map for the indicator
+ </para>
+ </listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+<function>XkbSetNamedIndicator</function>
+calls
+<function>XkbSetNamedDeviceIndicator</function>
+with the specified parameters, a
+<structfield>device_spec</structfield>
+of
+<symbol>XkbUseCoreKbd</symbol>,
+a
+<structfield>led_class</structfield>
+of
+<symbol>XkbDfltXIClass</symbol>,
+and a
+<structfield>led_id</structfield>
+of
+<symbol>XkbDfltXIId</symbol>,
+and returns the value which was returned by
+<function>XkbSetNamedDeviceIndicator</function>.
+</para>
</sect2>
<sect2 id='XkbIndicatorChangesRec'>
diff --git a/lib/libX11/src/DisName.c b/lib/libX11/src/DisName.c
index 87a1e2f0e..5a90ab34f 100644
--- a/lib/libX11/src/DisName.c
+++ b/lib/libX11/src/DisName.c
@@ -60,5 +60,5 @@ XDisplayName(
return( (char *)display );
if ( (d = getenv( "DISPLAY" )) != (char *)NULL )
return( d );
- return( "" );
+ return( (char *) "" );
}
diff --git a/lib/libX11/src/FSWrap.c b/lib/libX11/src/FSWrap.c
index 12d0406ba..92caea07c 100644
--- a/lib/libX11/src/FSWrap.c
+++ b/lib/libX11/src/FSWrap.c
@@ -195,7 +195,7 @@ XCreateFontSet (
if (oc && def_string) {
*def_string = oc->core.default_string;
if (!*def_string)
- *def_string = "";
+ *def_string = (char *)"";
}
if (oc == NULL)
diff --git a/lib/libX11/src/FontNames.c b/lib/libX11/src/FontNames.c
index 9ffdfd299..ec7d90fa2 100644
--- a/lib/libX11/src/FontNames.c
+++ b/lib/libX11/src/FontNames.c
@@ -88,24 +88,16 @@ int *actualCount) /* RETURN */
* unpack into null terminated strings.
*/
chstart = ch;
- chend = ch + (rlen + 1);
+ chend = ch + rlen;
length = *(unsigned char *)ch;
*ch = 1; /* make sure it is non-zero for XFreeFontNames */
for (i = 0; i < rep.nFonts; i++) {
if (ch + length < chend) {
flist[i] = ch + 1; /* skip over length */
ch += length + 1; /* find next length ... */
- if (ch <= chend) {
- length = *(unsigned char *)ch;
- *ch = '\0'; /* and replace with null-termination */
- count++;
- } else {
- Xfree(chstart);
- Xfree(flist);
- flist = NULL;
- count = 0;
- break;
- }
+ length = *(unsigned char *)ch;
+ *ch = '\0'; /* and replace with null-termination */
+ count++;
} else {
Xfree(chstart);
Xfree(flist);
diff --git a/lib/libX11/src/GetFPath.c b/lib/libX11/src/GetFPath.c
index 8c3f49c95..87d257615 100644
--- a/lib/libX11/src/GetFPath.c
+++ b/lib/libX11/src/GetFPath.c
@@ -42,7 +42,7 @@ char **XGetFontPath(
int count = 0;
register unsigned i;
register int length;
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq (GetFontPath, req);
@@ -69,15 +69,20 @@ char **XGetFontPath(
/*
* unpack into null terminated strings.
*/
- chend = ch + (nbytes + 1);
- length = *ch;
+ chend = ch + nbytes;
+ length = *(unsigned char *)ch;
for (i = 0; i < rep.nPaths; i++) {
if (ch + length < chend) {
flist[i] = ch+1; /* skip over length */
ch += length + 1; /* find next length ... */
- length = *ch;
+ length = *(unsigned char *)ch;
*ch = '\0'; /* and replace with null-termination */
count++;
+ } else if (i == 0) {
+ Xfree(flist);
+ Xfree(ch);
+ flist = NULL;
+ break;
} else
flist[i] = NULL;
}
diff --git a/lib/libX11/src/GetIFocus.c b/lib/libX11/src/GetIFocus.c
index 5d43ead4f..0a7f36e8d 100644
--- a/lib/libX11/src/GetIFocus.c
+++ b/lib/libX11/src/GetIFocus.c
@@ -36,7 +36,7 @@ XGetInputFocus(
int *revert_to)
{
xGetInputFocusReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq(GetInputFocus, req);
(void) _XReply (dpy, (xReply *)&rep, 0, xTrue);
diff --git a/lib/libX11/src/GetImage.c b/lib/libX11/src/GetImage.c
index ff32d5891..44a576a1b 100644
--- a/lib/libX11/src/GetImage.c
+++ b/lib/libX11/src/GetImage.c
@@ -105,14 +105,16 @@ XImage *XGetImage (
planes = 1;
}
- if (!image)
+ if (!image) {
Xfree(data);
- if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 ||
- INT_MAX / image->height <= image->bytes_per_line ||
- INT_MAX / planes <= image->height * image->bytes_per_line ||
- nbytes < planes * image->height * image->bytes_per_line) {
- XDestroyImage(image);
- image = NULL;
+ } else {
+ if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 ||
+ INT_MAX / image->height <= image->bytes_per_line ||
+ INT_MAX / planes <= image->height * image->bytes_per_line ||
+ nbytes < planes * image->height * image->bytes_per_line) {
+ XDestroyImage(image);
+ image = NULL;
+ }
}
UnlockDisplay(dpy);
SyncHandle();
diff --git a/lib/libX11/src/GetKCnt.c b/lib/libX11/src/GetKCnt.c
index 17f487fbe..5829fbeaa 100644
--- a/lib/libX11/src/GetKCnt.c
+++ b/lib/libX11/src/GetKCnt.c
@@ -35,7 +35,7 @@ XGetKeyboardControl (
register XKeyboardState *state)
{
xGetKeyboardControlReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq (GetKeyboardControl, req);
(void) _XReply (dpy, (xReply *) &rep,
diff --git a/lib/libX11/src/GetPCnt.c b/lib/libX11/src/GetPCnt.c
index 2c35d210c..72d9495b5 100644
--- a/lib/libX11/src/GetPCnt.c
+++ b/lib/libX11/src/GetPCnt.c
@@ -38,7 +38,7 @@ XGetPointerControl(
int *threshold)
{
xGetPointerControlReply rep;
- xReq *req;
+ _X_UNUSED xReq *req;
LockDisplay(dpy);
GetEmptyReq(GetPointerControl, req);
(void) _XReply (dpy, (xReply *)&rep, 0, xTrue);
diff --git a/lib/libX11/src/GetPntMap.c b/lib/libX11/src/GetPntMap.c
index 29fdf21f0..07625f8a0 100644
--- a/lib/libX11/src/GetPntMap.c
+++ b/lib/libX11/src/GetPntMap.c
@@ -45,7 +45,7 @@ int XGetPointerMapping (
unsigned char mapping[256]; /* known fixed size */
unsigned long nbytes, remainder = 0;
xGetPointerMappingReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq(GetPointerMapping, req);
diff --git a/lib/libX11/src/GetSSaver.c b/lib/libX11/src/GetSSaver.c
index 1aba3bb74..7c2a3061a 100644
--- a/lib/libX11/src/GetSSaver.c
+++ b/lib/libX11/src/GetSSaver.c
@@ -40,7 +40,7 @@ XGetScreenSaver(
{
xGetScreenSaverReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq(GetScreenSaver, req);
diff --git a/lib/libX11/src/GrServer.c b/lib/libX11/src/GrServer.c
index 11d21e491..c4c62bef3 100644
--- a/lib/libX11/src/GrServer.c
+++ b/lib/libX11/src/GrServer.c
@@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group.
int
XGrabServer (register Display *dpy)
{
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq(GrabServer, req);
UnlockDisplay(dpy);
diff --git a/lib/libX11/src/LiHosts.c b/lib/libX11/src/LiHosts.c
index 83cf3c791..315e4dbb4 100644
--- a/lib/libX11/src/LiHosts.c
+++ b/lib/libX11/src/LiHosts.c
@@ -77,7 +77,7 @@ XHostAddress *XListHosts (
xListHostsReply reply;
unsigned char *buf, *bp;
register unsigned i;
- register xListHostsReq *req;
+ _X_UNUSED register xListHostsReq *req;
XServerInterpretedAddress *sip;
*nhosts = 0;
@@ -119,11 +119,16 @@ XHostAddress *XListHosts (
_XRead (dpy, (char *) buf, nbytes);
for (i = 0; i < reply.nHosts; i++) {
+ if (bp > buf + nbytes - SIZEOF(xHostEntry))
+ goto fail;
op->family = ((xHostEntry *) bp)->family;
op->length =((xHostEntry *) bp)->length;
if (op->family == FamilyServerInterpreted) {
char *tp = (char *) (bp + SIZEOF(xHostEntry));
- char *vp = memchr(tp, 0, op->length);
+ char *vp;
+ if (tp > (char *) (buf + nbytes - op->length))
+ goto fail;
+ vp = memchr(tp, 0, op->length);
if (vp != NULL) {
sip->type = tp;
@@ -138,6 +143,8 @@ XHostAddress *XListHosts (
sip++;
} else {
op->address = (char *) (bp + SIZEOF(xHostEntry));
+ if (op->address > (char *) (buf + nbytes - op->length))
+ goto fail;
}
bp += SIZEOF(xHostEntry) + (((op->length + 3) >> 2) << 2);
op++;
@@ -149,9 +156,9 @@ XHostAddress *XListHosts (
UnlockDisplay(dpy);
SyncHandle();
return (outbuf);
+fail:
+ *enabled = reply.enabled;
+ *nhosts = 0;
+ Xfree(outbuf);
+ return (NULL);
}
-
-
-
-
-
diff --git a/lib/libX11/src/ListExt.c b/lib/libX11/src/ListExt.c
index 0516e4596..a795041d0 100644
--- a/lib/libX11/src/ListExt.c
+++ b/lib/libX11/src/ListExt.c
@@ -41,7 +41,7 @@ char **XListExtensions(
int count = 0;
register unsigned i;
register int length;
- register xReq *req;
+ _X_UNUSED register xReq *req;
unsigned long rlen = 0;
LockDisplay(dpy);
@@ -74,19 +74,20 @@ char **XListExtensions(
/*
* unpack into null terminated strings.
*/
- chend = ch + (rlen + 1);
- length = *ch;
+ chend = ch + rlen;
+ length = *(unsigned char *)ch;
for (i = 0; i < rep.nExtensions; i++) {
if (ch + length < chend) {
list[i] = ch+1; /* skip over length */
ch += length + 1; /* find next length ... */
- if (ch <= chend) {
- length = *ch;
- *ch = '\0'; /* and replace with null-termination */
- count++;
- } else {
- list[i] = NULL;
- }
+ length = *(unsigned char *)ch;
+ *ch = '\0'; /* and replace with null-termination */
+ count++;
+ } else if (i == 0) {
+ Xfree(list);
+ Xfree(ch);
+ list = NULL;
+ break;
} else
list[i] = NULL;
}
diff --git a/lib/libX11/src/Macros.c b/lib/libX11/src/Macros.c
index 394a7641f..dcd038026 100644
--- a/lib/libX11/src/Macros.c
+++ b/lib/libX11/src/Macros.c
@@ -283,7 +283,7 @@ int XAddPixel(
int
XNoOp (register Display *dpy)
{
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq(NoOperation, req);
diff --git a/lib/libX11/src/ModMap.c b/lib/libX11/src/ModMap.c
index 49a5d08e8..ca15dde25 100644
--- a/lib/libX11/src/ModMap.c
+++ b/lib/libX11/src/ModMap.c
@@ -34,7 +34,7 @@ XModifierKeymap *
XGetModifierMapping(register Display *dpy)
{
xGetModifierMappingReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
unsigned long nbytes;
XModifierKeymap *res;
@@ -84,7 +84,7 @@ XSetModifierMapping(
req->length += mapSize >> 2;
req->numKeyPerModifier = modifier_map->max_keypermod;
- Data(dpy, modifier_map->modifiermap, mapSize);
+ Data(dpy, (const char *)modifier_map->modifiermap, mapSize);
(void) _XReply(dpy, (xReply *) & rep,
(SIZEOF(xSetModifierMappingReply) - SIZEOF(xReply)) >> 2, xTrue);
diff --git a/lib/libX11/src/QuKeybd.c b/lib/libX11/src/QuKeybd.c
index 4b8431d50..0a2d4d0fc 100644
--- a/lib/libX11/src/QuKeybd.c
+++ b/lib/libX11/src/QuKeybd.c
@@ -39,7 +39,7 @@ XQueryKeymap(
char keys[32])
{
xQueryKeymapReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq(QueryKeymap, req);
diff --git a/lib/libX11/src/ReconfWM.c b/lib/libX11/src/ReconfWM.c
index 8dc3534e0..b3d8624cf 100644
--- a/lib/libX11/src/ReconfWM.c
+++ b/lib/libX11/src/ReconfWM.c
@@ -105,7 +105,7 @@ Status XReconfigureWMWindow (
*/
{
xGetInputFocusReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
GetEmptyReq(GetInputFocus, req);
(void) _XReply (dpy, (xReply *)&rep, 0, xTrue);
diff --git a/lib/libX11/src/SetHints.c b/lib/libX11/src/SetHints.c
index 5f0a4d4c8..626a2b3ab 100644
--- a/lib/libX11/src/SetHints.c
+++ b/lib/libX11/src/SetHints.c
@@ -211,7 +211,7 @@ XSetCommand (
int argc)
{
register int i;
- register int nbytes;
+ size_t nbytes;
register char *buf, *bp;
for (i = 0, nbytes = 0; i < argc; i++) {
nbytes += safestrlen(argv[i]) + 1;
@@ -295,7 +295,7 @@ XSetClassHint(
{
char *class_string;
char *s;
- int len_nm, len_cl;
+ size_t len_nm, len_cl;
len_nm = safestrlen(classhint->res_name);
len_cl = safestrlen(classhint->res_class);
diff --git a/lib/libX11/src/StColor.c b/lib/libX11/src/StColor.c
index d5a217fb0..221fae136 100644
--- a/lib/libX11/src/StColor.c
+++ b/lib/libX11/src/StColor.c
@@ -50,6 +50,7 @@ XStoreColor(
citem->green = def->green;
citem->blue = def->blue;
citem->flags = def->flags; /* do_red, do_green, do_blue */
+ citem->pad = 0;
UnlockDisplay(dpy);
diff --git a/lib/libX11/src/StColors.c b/lib/libX11/src/StColors.c
index 17a215cc0..fa1814c8e 100644
--- a/lib/libX11/src/StColors.c
+++ b/lib/libX11/src/StColors.c
@@ -53,6 +53,7 @@ XStoreColors(
citem.green = defs[i].green;
citem.blue = defs[i].blue;
citem.flags = defs[i].flags;
+ citem.pad = 0;
/* note that xColorItem doesn't contain all 16-bit quantities, so
we can't use Data16 */
diff --git a/lib/libX11/src/StrKeysym.c b/lib/libX11/src/StrKeysym.c
index 12fce6872..be77a93cd 100644
--- a/lib/libX11/src/StrKeysym.c
+++ b/lib/libX11/src/StrKeysym.c
@@ -115,7 +115,7 @@ XStringToKeysym(_Xconst char *s)
{
XrmValue result;
XrmRepresentation from_type;
- char c;
+ char d;
XrmQuark names[2];
names[0] = _XrmInternalStringToQuark(s, p - s - 1, sig, False);
@@ -126,10 +126,10 @@ XStringToKeysym(_Xconst char *s)
val = 0;
for (i = 0; i < result.size - 1; i++)
{
- c = ((char *)result.addr)[i];
- if ('0' <= c && c <= '9') val = (val<<4)+c-'0';
- else if ('a' <= c && c <= 'f') val = (val<<4)+c-'a'+10;
- else if ('A' <= c && c <= 'F') val = (val<<4)+c-'A'+10;
+ d = ((char *)result.addr)[i];
+ if ('0' <= d && d <= '9') val = (val<<4)+d-'0';
+ else if ('a' <= d && d <= 'f') val = (val<<4)+d-'a'+10;
+ else if ('A' <= d && d <= 'F') val = (val<<4)+d-'A'+10;
else return NoSymbol;
}
return val;
diff --git a/lib/libX11/src/Sync.c b/lib/libX11/src/Sync.c
index 6326de768..bc768d4f6 100644
--- a/lib/libX11/src/Sync.c
+++ b/lib/libX11/src/Sync.c
@@ -37,7 +37,7 @@ XSync (
Bool discard)
{
xGetInputFocusReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq(GetInputFocus, req);
diff --git a/lib/libX11/src/UngrabSvr.c b/lib/libX11/src/UngrabSvr.c
index ea0084879..20ad9aa35 100644
--- a/lib/libX11/src/UngrabSvr.c
+++ b/lib/libX11/src/UngrabSvr.c
@@ -33,7 +33,7 @@ int
XUngrabServer (
register Display *dpy)
{
- register xReq *req;
+ _X_UNUSED register xReq *req;
LockDisplay(dpy);
GetEmptyReq(UngrabServer, req);
diff --git a/lib/libX11/src/XlibInt.c b/lib/libX11/src/XlibInt.c
index 729694885..903ca88fe 100644
--- a/lib/libX11/src/XlibInt.c
+++ b/lib/libX11/src/XlibInt.c
@@ -196,7 +196,7 @@ void _XSeqSyncFunction(
register Display *dpy)
{
xGetInputFocusReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
if ((X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy)) >= (65535 - BUFSIZE/SIZEOF(xReq))) {
GetEmptyReq(GetInputFocus, req);
@@ -1238,7 +1238,7 @@ _XWireToEvent(
* _XDefaultIOError - Default fatal system error reporting routine. Called
* when an X internal system error is encountered.
*/
-int _XDefaultIOError(
+_X_NORETURN int _XDefaultIOError(
Display *dpy)
{
if (ECHECK(EPIPE)) {
@@ -1382,6 +1382,16 @@ int _XDefaultError(
XErrorEvent *event)
{
if (_XPrintDefaultError (dpy, event, stderr) == 0) return 0;
+
+ /*
+ * Store in dpy flags that the client is exiting on an unhandled XError
+ * (pretend it is an IOError, since the application is dying anyway it
+ * does not make a difference).
+ * This is useful for _XReply not to hang if the application makes Xlib
+ * calls in _fini as part of process termination.
+ */
+ dpy->flags |= XlibDisplayIOError;
+
exit(1);
/*NOTREACHED*/
}
diff --git a/lib/libX11/src/xcb_io.c b/lib/libX11/src/xcb_io.c
index bd26a62ae..649c82008 100644
--- a/lib/libX11/src/xcb_io.c
+++ b/lib/libX11/src/xcb_io.c
@@ -700,10 +700,7 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard)
/* it's not an error, but we don't have a reply, so it's an I/O
* error. */
if(!reply)
- {
_XIOError(dpy);
- return 0;
- }
/* there's no error and we have a reply. */
dpy->xcb->reply_data = reply;
diff --git a/lib/libX11/src/xcms/cmsCmap.c b/lib/libX11/src/xcms/cmsCmap.c
index c5401c05d..c7087ecb1 100644
--- a/lib/libX11/src/xcms/cmsCmap.c
+++ b/lib/libX11/src/xcms/cmsCmap.c
@@ -181,7 +181,7 @@ CmapRecForColormap(
}
{
xGetInputFocusReply rep;
- register xReq *req;
+ _X_UNUSED register xReq *req;
GetEmptyReq(GetInputFocus, req);
(void) _XReply (dpy, (xReply *)&rep, 0, xTrue);
diff --git a/lib/libX11/src/xcms/cmsProp.c b/lib/libX11/src/xcms/cmsProp.c
index 2826ee7be..77c072f22 100644
--- a/lib/libX11/src/xcms/cmsProp.c
+++ b/lib/libX11/src/xcms/cmsProp.c
@@ -138,6 +138,7 @@ _XcmsGetProperty(
if (xgwp_ret != Success || format_ret == 0 || nitems_ret == 0) {
/* the property does not exist or is of an unexpected type or
getting window property failed */
+ XFree (prop_ret);
return(XcmsFailure);
}
diff --git a/lib/libX11/src/xkb/XKBAlloc.c b/lib/libX11/src/xkb/XKBAlloc.c
index 50a5764d6..f824bca8c 100644
--- a/lib/libX11/src/xkb/XKBAlloc.c
+++ b/lib/libX11/src/xkb/XKBAlloc.c
@@ -216,24 +216,22 @@ XkbFreeNames(XkbDescPtr xkb, unsigned which, Bool freeMap)
type = map->types;
for (i = 0; i < map->num_types; i++, type++) {
- if (type->level_names != NULL) {
_XkbFree(type->level_names);
type->level_names = NULL;
- }
}
}
}
- if ((which & XkbKeyNamesMask) && (names->keys != NULL)) {
+ if (which & XkbKeyNamesMask) {
_XkbFree(names->keys);
names->keys = NULL;
names->num_keys = 0;
}
- if ((which & XkbKeyAliasesMask) && (names->key_aliases)) {
+ if (which & XkbKeyAliasesMask) {
_XkbFree(names->key_aliases);
names->key_aliases = NULL;
names->num_key_aliases = 0;
}
- if ((which & XkbRGNamesMask) && (names->radio_groups)) {
+ if (which & XkbRGNamesMask) {
_XkbFree(names->radio_groups);
names->radio_groups = NULL;
names->num_rg = 0;
diff --git a/lib/libX11/src/xkb/XKBExtDev.c b/lib/libX11/src/xkb/XKBExtDev.c
index b9710f86b..d45460e99 100644
--- a/lib/libX11/src/xkb/XKBExtDev.c
+++ b/lib/libX11/src/xkb/XKBExtDev.c
@@ -36,7 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
/***====================================================================***/
-extern void
+void
XkbNoteDeviceChanges(XkbDeviceChangesPtr old,
XkbExtensionDeviceNotifyEvent *new,
unsigned int wanted)
diff --git a/lib/libX11/src/xlibi18n/lcCT.c b/lib/libX11/src/xlibi18n/lcCT.c
index b1613007d..1f413e97c 100644
--- a/lib/libX11/src/xlibi18n/lcCT.c
+++ b/lib/libX11/src/xlibi18n/lcCT.c
@@ -1021,19 +1021,19 @@ cstoct(
) {
while (csstr_len > 0 && ct_len > 0) {
unsigned char ch = * (const unsigned char *) csptr;
- int char_size = (ch < 0xc0 ? 1 :
+ int ch_size = (ch < 0xc0 ? 1 :
ch < 0xe0 ? 2 :
ch < 0xf0 ? 3 :
ch < 0xf8 ? 4 :
ch < 0xfc ? 5 :
6);
int i;
- if (!(csstr_len >= char_size && ct_len >= char_size))
+ if (!(csstr_len >= ch_size && ct_len >= ch_size))
break;
- for (i = char_size; i > 0; i--)
+ for (i = ch_size; i > 0; i--)
*ctptr++ = *csptr++;
- csstr_len -= char_size;
- ct_len -= char_size;
+ csstr_len -= ch_size;
+ ct_len -= ch_size;
}
} else {
while (csstr_len > 0 && ct_len > 0) {
diff --git a/lib/libX11/src/xlibi18n/lcDB.c b/lib/libX11/src/xlibi18n/lcDB.c
index fda3ae7e3..19e80aa2f 100644
--- a/lib/libX11/src/xlibi18n/lcDB.c
+++ b/lib/libX11/src/xlibi18n/lcDB.c
@@ -790,7 +790,7 @@ f_right_brace(
case S_VALUE:
if (! store_to_database(db))
return 0;
- /* fall into next case */
+ /* fall through - to next case */
case S_CATEGORY:
if (parse_info.name[parse_info.nest_depth] != NULL) {
Xfree(parse_info.name[parse_info.nest_depth]);
diff --git a/lib/libX11/src/xlibi18n/lcGeneric.c b/lib/libX11/src/xlibi18n/lcGeneric.c
index 1c78a95c6..f816fee77 100644
--- a/lib/libX11/src/xlibi18n/lcGeneric.c
+++ b/lib/libX11/src/xlibi18n/lcGeneric.c
@@ -77,6 +77,7 @@ create(
return lcd;
err:
+ Xfree(lcd->core);
Xfree(lcd);
return (XLCd) NULL;
}
@@ -1027,10 +1028,8 @@ freeByteM(
}
blst = codeset->byteM;
for (i = 0; i < codeset->length; i++) {
- if (blst[i].byteinfo) {
Xfree(blst[i].byteinfo);
blst[i].byteinfo = NULL;
- }
}
Xfree(codeset->byteM);
codeset->byteM = NULL;
@@ -1044,20 +1043,18 @@ freeConversion(
if (codeset->mbconv) {
mbconv = codeset->mbconv;
/* ... */
- if (mbconv->convlist) {
- Xfree(mbconv->convlist);
- mbconv->convlist = NULL;
- }
+ Xfree(mbconv->convlist);
+ mbconv->convlist = NULL;
+
Xfree(mbconv);
codeset->mbconv = NULL;
}
if (codeset->ctconv) {
ctconv = codeset->ctconv;
/* ... */
- if (ctconv->convlist) {
- Xfree(ctconv->convlist);
- ctconv->convlist = NULL;
- }
+ Xfree(ctconv->convlist);
+ ctconv->convlist = NULL;
+
Xfree(ctconv);
codeset->ctconv = NULL;
}
@@ -1072,14 +1069,12 @@ freeExtdSegment(
return;
}
ctextseg = codeset->ctextseg;
- if (ctextseg->name) {
- Xfree(ctextseg->name);
- ctextseg->name = NULL;
- }
- if (ctextseg->area) {
- Xfree(ctextseg->area);
- ctextseg->area = NULL;
- }
+ Xfree(ctextseg->name);
+ ctextseg->name = NULL;
+
+ Xfree(ctextseg->area);
+ ctextseg->area = NULL;
+
Xfree(codeset->ctextseg);
codeset->ctextseg = NULL;
}
@@ -1093,10 +1088,10 @@ freeParseInfo(
return;
}
parse_info = codeset->parse_info;
- if (parse_info->encoding) {
- Xfree(parse_info->encoding);
- parse_info->encoding = NULL;
- }
+
+ Xfree(parse_info->encoding);
+ parse_info->encoding = NULL;
+
Xfree(codeset->parse_info);
codeset->parse_info = NULL;
}
@@ -1115,10 +1110,10 @@ destroy_CodeSetList(
freeConversion(codeset[i]);
freeExtdSegment(codeset[i]);
freeParseInfo(codeset[i]);
- if (codeset[i]->charset_list) {
- Xfree(codeset[i]->charset_list);
- codeset[i]->charset_list = NULL;
- }
+
+ Xfree(codeset[i]->charset_list);
+ codeset[i]->charset_list = NULL;
+
Xfree(codeset[i]); codeset[i]=NULL;
}
Xfree(codeset); gen->codeset_list = NULL;
@@ -1130,21 +1125,20 @@ destroy_SegConv(
{
SegConv seg = gen->segment_conv;
int i;
+
if (gen->segment_conv_num == 0) {
return;
}
for (i=0;i<gen->segment_conv_num;i++) {
- if (seg[i].source_encoding) {
+
Xfree(seg[i].source_encoding);
seg[i].source_encoding = NULL;
- }
- if (seg[i].destination_encoding) {
+
Xfree(seg[i].destination_encoding);
seg[i].destination_encoding = NULL;
- }
- if (seg[i].conv) {
- Xfree(seg[i].conv); seg[i].conv = NULL;
- }
+
+ Xfree(seg[i].conv);
+ seg[i].conv = NULL;
}
Xfree(seg); gen->segment_conv = NULL;
}
@@ -1156,14 +1150,13 @@ destroy_gen(
XLCdGenericPart *gen = XLC_GENERIC_PART(lcd);
destroy_SegConv(gen);
destroy_CodeSetList(gen);
- if (gen->mb_parse_table) {
- Xfree(gen->mb_parse_table);
- gen->mb_parse_table = NULL;
- }
- if (gen->mb_parse_list) {
- Xfree(gen->mb_parse_list);
- gen->mb_parse_list = NULL;
- }
+
+ Xfree(gen->mb_parse_table);
+ gen->mb_parse_table = NULL;
+
+ Xfree(gen->mb_parse_list);
+ gen->mb_parse_list = NULL;
+
}
/* VW/UDC end 95.01.08 */
diff --git a/lib/libX11/src/xlibi18n/lcPublic.c b/lib/libX11/src/xlibi18n/lcPublic.c
index 98a7435fd..f35f17a63 100644
--- a/lib/libX11/src/xlibi18n/lcPublic.c
+++ b/lib/libX11/src/xlibi18n/lcPublic.c
@@ -97,6 +97,7 @@ create(
return lcd;
err:
+ Xfree(lcd->core);
Xfree(lcd);
return (XLCd) NULL;
}