diff options
Diffstat (limited to 'lib')
250 files changed, 2474 insertions, 968 deletions
diff --git a/lib/libX11/ChangeLog b/lib/libX11/ChangeLog index 827fe5353..20dc2813c 100644 --- a/lib/libX11/ChangeLog +++ b/lib/libX11/ChangeLog @@ -1,3 +1,905 @@ +commit ca8115186f810eccb7d86b0979980eff3ba95f0b +Author: Keith Packard <keithp@keithp.com> +Date: Thu Nov 19 11:30:41 2020 -0800 + + Version 1.7.0 + + Release notes in README.md, version bump in configure.ac + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 325ac177fb6d38f4c7689d9ce059792eaef388ef +Author: Keith Packard <keithp@keithp.com> +Date: Mon Nov 16 15:48:40 2020 -0800 + + Update libX11 .so version to 6.4.0 + + There have been API additions since the previous release, so the + .so version needs to change. + + Signed-off-by: Keith Packard <keithp@keithp.com> + +commit 103e2e11519984aa5746c06e7d90d1f5bc8174a3 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Oct 31 09:24:01 2020 -0700 + + Don't leave dangling pointers in Free functions + + While these are mostly called during teardown of larger structures + that are about to themselves be freed, there's no guarantee that + will always be the case, so try to be safer here. + + [ This bug was found by the Parfait 4.0 bug checking tool. + http://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT_ID:13 ] + + v2: Deduplicate & simplify pointer clearing in _XFreeEventCookies + as suggested by @keithp + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7d70e302218e2ec8518548ddcdc02d828e7889af +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Oct 31 08:56:34 2020 -0700 + + XimProto.h: wrap XIM_HEADER_SIZE definition in parens + + Resolves parfait warning of potential macro misinterpretation if + expanded in the midst of other arithmetic operations with higher + precedence. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit a3c0b5dbd6b12ae64bc78b11795647a7f6df0c7a +Author: Keith Packard <keithp@keithp.com> +Date: Tue Nov 17 13:15:18 2020 -0800 + + Copy locale modifiers when creating XimInstCallback [v2] + + Locale modifiers may be freed whenever XSetLocaleModifiers gets + called, even if the locale hasn't changed. This means that we cannot + save a pointer to those modifiers in the XimInstCallback record and + must, instead, make a copy of them instead. + + This fixes a problem uncovered when running wish under libasan as + follows (on current Debian unstable): + + $ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.6 wish + + Reported-by: Vittorio Zecca <zeccav@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + + v2: + Remove incorrect 'else' token found by @alanc + +commit 960e2e0cfac12c3477c672d0d40818a0dc74aca5 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Mon Nov 16 09:34:57 2020 +1000 + + gitlab CI: add a basic build test + + Using Arch as base distribution here because we can expect our dependencies to + be up-to-date. We rely on the Arch for our dependencies rather than building + those from git (notably: xorg-macros, xtrans and libxcb). + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit dbb55e1a5e82870466b095097d9e46046680ec25 +Author: Frediano Ziglio <fziglio@redhat.com> +Date: Wed Jan 29 09:06:54 2020 +0000 + + Fix poll_for_response race condition + + In poll_for_response is it possible that event replies are skipped + and a more up to date message reply is returned. + This will cause next poll_for_event call to fail aborting the program. + + This was proved using some slow ssh tunnel or using some program + to slow down server replies (I used a combination of xtrace and strace). + + How the race happens: + - program enters into poll_for_response; + - poll_for_event is called but the server didn't still send the reply; + - pending_requests is not NULL because we send a request (see call + to append_pending_request in _XSend); + - xcb_poll_for_reply64 is called from poll_for_response; + - xcb_poll_for_reply64 will read from server, at this point + server reply with an event (say sequence N) and the reply to our + last request (say sequence N+1); + - xcb_poll_for_reply64 returns the reply for the request we asked; + - last_request_read is set to N+1 sequence in poll_for_response; + - poll_for_response returns the response to the request; + - poll_for_event is called (for instance from another poll_for_response); + - event with sequence N is retrieved; + - the N sequence is widen, however, as the "new" number computed from + last_request_read is less than N the number is widened to N + 2^32 + (assuming last_request_read is still contained in 32 bit); + - poll_for_event enters the nested if statement as req is NULL; + - we compare the widen N (which now does not fit into 32 bit) with + request (which fits into 32 bit) hitting the throw_thread_fail_assert. + + To avoid the race condition and to avoid the sequence to go back + I check again for new events after getting the response and + return this last event if present saving the reply to return it + later. + + To test the race and the fix it's helpful to add a delay (I used a + "usleep(5000)") before calling xcb_poll_for_reply64. + + Original patch written by Frediano Ziglio, see + https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/34 + + Reworked primarily for readability by Peter Hutterer, see + https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/53 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit 30ccef3a48029bf4fc31d4abda2d2778d0ad6277 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Nov 7 22:22:47 2020 -0800 + + Avoid recursing through _XError due to sequence adjustment + + This patch is based on research done by Dmitry Osipenko to uncover the + cause of a large class of Xlib lockups. + + _XError must unlock and re-lock the display around the call to the + user error handler function. When re-locking the display, two + functions are called to ensure that the display is ready to generate a request: + + _XIDHandler(dpy); + _XSeqSyncFunction(dpy); + + The first ensures that there is at least one XID available to use + (possibly calling _xcb_generate_id to do so). The second makes sure a + reply is received at least every 65535 requests to keep sequence + numbers in sync (possibly generating a GetInputFocus request and + synchronously awaiting the reply). + + If the second of these does generate a GetInputFocus request and wait + for the reply, then a pending error will cause recursion into _XError, + which deadlocks the display. + + One seemingly easy fix is to have _XError avoid those calls by + invoking InternalLockDisplay instead of LockDisplay. That function + does everything that LockDisplay does *except* call those final two + functions which may end up receiving an error. + + However, that doesn't protect the system from applications which call + some legal Xlib function from within their error handler. Any Xlib + function which cannot generate protocol or wait for events is valid, + including many which invoke LockDisplay. + + What we need to do is make LockDisplay skip these two function calls + precisely when it is called from within the _XError context for the + same display. + + This patch accomplishes this by creating a list of threads in the + display which are in _XError, and then having LockDisplay check the + current thread against those list elements. + + Inspired-by: Dmitry Osipenko <digetx@gmail.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + Tested-by: Dmitry Osipenko <digetx@gmail.com> + Reviewed-by: Dmitry Osipenko <digetx@gmail.com> + +commit c9c4d6efbf92ab51695e2e740319503221d68eed +Author: Benno Schulenberg <bensberg@telfort.nl> +Date: Fri Nov 13 11:34:04 2020 +0100 + + nls: improve the comments for the Serbian compose sequences + + Also put an extra space before the lone combining characters + so they have some room to breathe. + + Signed-off-by: Benno Schulenberg <bensberg@telfort.nl> + +commit 3497dae3d9c52a252110b2a0983b82000be0fe8e +Author: Benno Schulenberg <bensberg@telfort.nl> +Date: Fri Nov 13 11:23:09 2020 +0100 + + nls: remove mistaken Serbian compose sequences with combining diacritics + + Combining characters are not dead keys -- they have an immediate effect + and combine with the preceding character. So they cannot be used in + compose sequences. + + Signed-off-by: Benno Schulenberg <bensberg@telfort.nl> + +commit 5cd60398b7787297008b13a848ed3cfbd7ef178d +Author: Benno Schulenberg <bensberg@telfort.nl> +Date: Mon Nov 2 16:34:39 2020 +0100 + + nls: rename the obsolete sr_CS locale to sr_RS + + Fixes #107, for the most part. + + Signed-off-by: Benno Schulenberg <bensberg@telfort.nl> + +commit 7cf1729590534e257b851899cf03421b65c538e3 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Nov 7 17:02:56 2020 -0800 + + Don't attempt to unload locale context data + + Most locale context users call _XlcCurrentLC, which returns a pointer + which never needs to be passed to _XCloseLC, meaning it has unbounded + lifetime, so that locale data can never be freed. + + Remove all reference counting and just leave all locales that were + ever used in memory. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Martin Peres <martin.peres@mupuf.org> + +commit 87a8fd8051b823636c3c4f3c37c4cfd11fdb880d +Author: Jacek Caban <jacek@codeweavers.com> +Date: Mon Aug 14 19:20:19 2017 +0200 + + Don't cache last lcd in _XlcCurrentLC. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=55678 + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=68538 + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69088 + + The way it's currently cached is not thread safe. As long as locale doesn't change, the same object is reused anyway. + + Signed-off-by: Jacek Caban <jacek@codeweavers.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Martin Peres <martin.peres@mupuf.org> + +commit 7a38c09b82ee2522d987c3da4af8af186e562c61 +Author: Keith Packard <keithp@keithp.com> +Date: Sat Nov 7 16:59:37 2020 -0800 + + Don't cache converters in _Xlcmbtowc and Xlcwctomb + + These functions were caching encoding conversion functions in static + variables which is not thread safe. Let the conversion loader do its + job and cache locale to converters there. It's less efficient, but + it's also (now) thread safe. + + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Martin Peres <martin.peres@mupuf.org> + +commit b52ba5c209165fc2c533b77b86147b31763299f3 +Author: Jacek Caban <jacek@codeweavers.com> +Date: Mon Aug 14 19:20:20 2017 +0200 + + Make conv_list thread safe. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=55678 + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=68538 + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69088 + Signed-off-by: Jacek Caban <jacek@codeweavers.com> + Signed-off-by: Keith Packard <keithp@keithp.com> + Acked-by: Martin Peres <martin.peres@mupuf.org> + +commit 8b5ce3a9b1219c81711944880e5a1e1cfad3d956 +Author: Antti Savolainen <antti.savo@gmail.com> +Date: Wed Sep 16 07:47:26 2020 +0000 + + Added DOWNWARD ARROW support + +commit 7138826dccba9d538dfb142ce9af1a40d64ea849 +Author: Antti Savolainen <antti.savo@gmail.com> +Date: Tue Sep 8 00:54:23 2020 +0300 + + Added support for UPWARDS ARROW and ALMOST EQUAL TO + + Signed-off-by: Antti Savolainen <antti.savo@gmail.com> + +commit 56d59299f7433cdeb88bac970b06eb7df44df5bb +Author: Jonathan Belsewir <jonbel@jonasund.de> +Date: Thu Nov 5 22:57:50 2020 +0000 + + Add less and greater to characters that are difficult to access on some keyboards + +commit 5caf45f8d3bebad5b72ac88545adc156ccfd754d +Author: Benno Schulenberg <bensberg@telfort.nl> +Date: Fri Oct 23 17:12:22 2020 +0200 + + nls: Allow all letters with a caron to be composed also with v. + + It was strange that the accented letters Ž and ž can be composed with + sequences that start with "v" ("v Z" and "v z"), but not Č and č and + Š and š (and other letters with a caron). For these letters, compose + sequences that start with a "c" had to be used, which was frustrating + because it is hard to remember that "c" stands for "caron", AND the + graphically more obvious "v" is right next to it. + + (Unfortunately, the sequence "v l" is already taken for vertical line. + Maybe the compose sequences for vertical line could be reduced to just + "V L" and "L V"?) + + Signed-off-by: Benno Schulenberg <bensberg@telfort.nl> + +commit 62de4ac9025e2cb3f62a890241c06ebc75acce62 +Author: Benno Schulenberg <bensberg@telfort.nl> +Date: Sun Nov 1 20:23:55 2020 +0100 + + nls: vertically align the target column of aliases + + Also improve the grammar of the initial comment. + + Signed-off-by: Benno Schulenberg <bensberg@telfort.nl> + +commit f5b26a16ef959fc6860e9cf58b97a042600900b4 +Author: Benno Schulenberg <bensberg@telfort.nl> +Date: Sun Nov 1 20:17:05 2020 +0100 + + nls: remove some twenty aliases that have been obsolete for fifteen years + + Signed-off-by: Benno Schulenberg <bensberg@telfort.nl> + +commit 3e61f3b49660e081108f06bc514366f1784cb2e0 +Author: Benno Schulenberg <bensberg@telfort.nl> +Date: Sun Nov 1 19:50:56 2020 +0100 + + nls: remove country-specific aliases for two constructed languages + + These artificial languages are meant to be international and are + thus not specific to any country. If one would want to support + aliases like ia_FR or ia_CH, then one would also have to support + ia_AU, ia_DE, ia_ES, et cetera, et cetera. That would be silly. + + Signed-off-by: Benno Schulenberg <bensberg@telfort.nl> + +commit 3f9c43adde22bb2ab4bef5837bc8401af9bb537c +Author: Benno Schulenberg <bensberg@telfort.nl> +Date: Sun Nov 1 17:28:24 2020 +0100 + + nls: remove four aliases where the name is identical to the definition + + They were found with: + + while read one two; do + if [[ $one == $two: ]]; then echo $two; fi; + done <nls/locale.alias.pre + + Signed-off-by: Benno Schulenberg <bensberg@telfort.nl> + +commit 9f9c5365816bdd036fd80d54b22e86764ea4b7a7 +Author: Carlos Garnacho <carlosg@gnome.org> +Date: Fri Jun 14 17:55:14 2019 +0200 + + Add XSetIOErrorExitHandler() function + + This function complements XSetIOErrorHandler(), allowing to override + the default behavior that trusts on I/O errors never coming back + (i.e. exit()ing the process). + + This is meant as a mechanism for Wayland compositors (that are too + a X11 client + compositing manager) to unfasten seatbelts and jump + through the car window. It might get lucky and land on a stack of + pillows. + + In consequence, some functions labeled as _X_NORETURN can as a + matter of fact return. So those hints were removed. + + Signed-off-by: Carlos Garnacho <carlosg@gnome.org> + Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> + +commit 4cb758019e374fa7c022fe79d28444e13441717b +Author: Carlos Garnacho <carlosg@gnome.org> +Date: Fri Jun 14 17:54:47 2019 +0200 + + Prepare for _XIOError() possibly returning + + Ensure current state is cut short on _XIOError(), possible reentrancy + should be skipped through the XlibDisplayIOError flag checks. + + Signed-off-by: Carlos Garnacho <carlosg@gnome.org> + Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> + +commit a37986f7a7d4ae9b8292b132dbb0da2885ea919c +Author: Ross Burton <ross.burton@intel.com> +Date: Wed Jan 22 17:11:23 2020 +0000 + + cpprules.in: squash whitespace in generated files + + CPP is used to generate files, but as cpp reads files from the build host the + output has a number of blank lines at the beginning which varies depending on + what GCC and friends is used. + + Pathalogical example: + + $ cpp -undef -traditional /dev/null + # 1 "/dev/null" + # 1 "<built-in>" + # 1 "<command-line>" + # 31 "<command-line>" + # 1 "/usr/include/stdc-predef.h" 1 3 4 + + # 17 "/usr/include/stdc-predef.h" 3 4 + + [ 40 blank line ] + + # 32 "<command-line>" 2 + # 1 "/dev/null" + + So depending on the content of stdc-predef.h and what other headers CPP will + load, the amount of whitespace in the generates files varies. This can result in + differences in reproducible environments, and file conflicts in multilib + environments. + + As whitespace is irrelevant to these machine-readable files, extend the sed to + just delete blank lines. + +commit 16192ce2a7e462e09f95aa45ce9eaa180e483c43 +Author: Carmina16 <mistresssilvara@hotmail.com> +Date: Sun Jun 16 02:54:25 2019 +0000 + + Adding ia and ie locales + +commit caa71668af7fd3ebdd56353c8f0ab90824773969 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Mon Sep 28 16:16:07 2020 -0700 + + Use __builtin_popcountl if available to replace Ones() in GetImage.c + + If the compiler knows of a better algorithm for counting the number of + bits set in a word for the target CPU, let it use that, instead of the + classic algorithm optimized for PDP-6. + + Based on libXext commit 490a25e6f8a4d2482af4364c700b68ad11a4d10b + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 1a9269a95c353e3de9f4d33bab9f1363d84e79db +Author: Krzesimir Nowak <qdlacz@gmail.com> +Date: Mon Jun 1 12:58:30 2020 +0000 + + Fix leaking modifiers string. + + Reported by valgrind: + + ``` + ==118175== 17 bytes in 1 blocks are definitely lost in loss record 13 of 1,675 + ==118175== at 0x483A809: malloc (vg_replace_malloc.c:307) + ==118175== by 0x5CD1B46: _XlcDefaultMapModifiers (in /usr/lib64/libX11.so.6.3.0) + ==118175== by 0x5CD1F1A: XSetLocaleModifiers (in /usr/lib64/libX11.so.6.3.0) + ==118175== by 0x496841C: X11_InitKeyboard (SDL_x11keyboard.c:324) + ==118175== by 0x496F0CA: X11_VideoInit (SDL_x11video.c:455) + ==118175== by 0x494747B: SDL_VideoInit_REAL (SDL_video.c:532) + ==118175== by 0x489E886: SDL_InitSubSystem_REAL (SDL.c:206) + ==118175== by 0x402634: main (fade.cc:35) + ``` + +commit d127217f26df1bf7566c1f372d8b5329a06754ea +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Aug 16 17:03:24 2020 -0700 + + Exempt XLookupKeysym from XKeycodeToKeysym deprecation warnings + + Gets rid of: + src/xkb/XKBBind.c: In function ‘XLookupKeysym’: + src/xkb/XKBBind.c:234:5: warning: ‘XKeycodeToKeysym’ is deprecated + [https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations] + 234 | return XKeycodeToKeysym(dpy, event->keycode, col); + | ^~~~~~ + src/xkb/XKBBind.c:96:1: note: declared here + 96 | XKeycodeToKeysym(Display *dpy, + | ^~~~~~~~~~~~~~~~ + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit a64eb5f478c6ca84ef3457a01f9a7c3db8ecf1e5 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Aug 16 16:50:43 2020 -0700 + + lcUTF8: Increase string buffer size from 20 to 32 bytes + + While we don't expect large enough ints to need it, we don't + enforce a maximum size, so gcc assumes the worst and warns: + + ../../../src/xlibi18n/lcUTF8.c: In function ‘create_tofontcs_conv’: + ../../../src/xlibi18n/lcUTF8.c:1736:34: warning: ‘.charset.name’ directive output may be truncated writing 13 bytes into a region of size between 8 and 17 [-Wformat-truncation=] + 1736 | snprintf(buf, sizeof(buf), "fs%d.charset.name", i); + | ^~~~~~~~~~~~~ + ../../../src/xlibi18n/lcUTF8.c:1736:2: note: ‘snprintf’ output between 17 and 26 bytes into a destination of size 20 + 1736 | snprintf(buf, sizeof(buf), "fs%d.charset.name", i); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ../../../src/xlibi18n/lcUTF8.c:1739:46: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] + 1739 | snprintf(buf, sizeof(buf), "fs%d.charset", i); + | ^ + ../../../src/xlibi18n/lcUTF8.c:1739:6: note: ‘snprintf’ output between 12 and 21 bytes into a destination of size 20 + 1739 | snprintf(buf, sizeof(buf), "fs%d.charset", i); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ../../../src/xlibi18n/lcUTF8.c:1754:41: warning: ‘.charset.name’ directive output may be truncated writing 13 bytes into a region of size between 8 and 17 [-Wformat-truncation=] + 1754 | snprintf(buf, sizeof(buf), "fs%d.charset.name", i); + | ^~~~~~~~~~~~~ + ../../../src/xlibi18n/lcUTF8.c:1754:9: note: ‘snprintf’ output between 17 and 26 bytes into a destination of size 20 + 1754 | snprintf(buf, sizeof(buf), "fs%d.charset.name", i); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ../../../src/xlibi18n/lcUTF8.c:1757:53: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] + 1757 | snprintf(buf, sizeof(buf), "fs%d.charset", i); + | ^ + ../../../src/xlibi18n/lcUTF8.c:1757:13: note: ‘snprintf’ output between 12 and 21 bytes into a destination of size 20 + 1757 | snprintf(buf, sizeof(buf), "fs%d.charset", i); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 54925250ad9c825bea671dcade5c913bad88abee +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Aug 16 16:33:59 2020 -0700 + + i18n: use memcpy instead of strncpy on unterminated char arrays + + Avoids gcc warnings that we're using strncpy wrong to copy a known-length + set of characters without a terminating '\0' to a buffer whose length we + are checking separately. (Should also be imperceptibly faster since we + no longer check if each byte is '\0' when we already know it won't be.) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 8754868dbbbc5fa096282df0504aa7880488eeb9 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Aug 16 16:02:01 2020 -0700 + + Mark FreeBlueTblElements label unused in LRGB.c + + Quiets gcc 10.2 warning of: + src/xcms/LRGB.c: In function ‘LINEAR_RGB_InitSCCData’: + src/xcms/LRGB.c:798:1: warning: label ‘FreeBlueTblElements’ defined + but not used + [https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-label-Wunused-label] + 798 | FreeBlueTblElements: + | ^~~~~~~~~~~~~~~~~~~ + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 52b0cd67073f2f4665884b5a7decfedeb3b7ca1e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sun Aug 16 14:54:47 2020 -0700 + + Raise minimum required xproto version to 7.0.25 (released 2013-11-23) + + Allows us to depend on _X_COLD directly instead of having to check for it. + + (Since we also use _X_UNUSED, 7.0.22 or later was implicitly required + already but not checked for.) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit deafb99fd8faf8b044eaee13d072440ce4db76af +Author: Maya Rashish <maya@NetBSD.org> +Date: Sun Aug 23 21:19:33 2020 +0300 + + Avoid the use of "register" keyword in public headers. + + This causes issues when compiling code for C++17. + +commit 505420662577749e36640db48f6b6b9ae0236e09 +Author: Matthieu Herrb <matthieu@herrb.eu> +Date: Mon Aug 24 15:42:25 2020 +0200 + + libX11 1.6.12 + + Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> + +commit acdaaadcb3d85c61fd43669fc5dddf0f8c3f911d +Author: Matthieu Herrb <matthieu@herrb.eu> +Date: Thu Aug 13 18:02:58 2020 +0200 + + Fix an integer overflow in init_om() + + CVE-2020-14363 + + This can lead to a double free later, as reported by Jayden Rivers. + + Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> + +commit d15c24c8b44be5e4054c8ecd0ff9dcf2c8e18e5b +Author: Niclas Zeising <zeising@daemonic.se> +Date: Tue Aug 11 13:44:38 2020 +0200 + + Fix input clients connecting to server + + Fix a bug where some input clients can't connect to the input server. + This fixes #117. + + FreeBSD bugzilla reference: + https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248549 + + Signed-off-by: Niclas Zeising <zeising@daemonic.se> + +commit 6dd618e5ea8e7558dd8e99a2777ab7b69211789c +Author: Maya Rashish <maya@NetBSD.org> +Date: Sat Aug 15 00:48:56 2020 +0300 + + Avoid the use of "register" keyword in XkbTranslateKeySym. + + This causes issues when compiling code for C++17. + While here, make function prototype match the header with regards + to removal of another register keyword. + +commit 780d222343098b4bfe3ec529b4a0dc2aadea19bf +Author: Christopher Chavez <chrischavez@gmx.us> +Date: Mon Aug 10 17:08:39 2020 +0000 + + Fix typo GCCLipYOrigin -> GCClipYOrigin in XCreateGC() manpage + +commit 29a8251a456bb7dc10146b4713f499a624d6dacd +Author: Felix Yan <felixonmars@archlinux.org> +Date: Thu Aug 6 16:03:38 2020 +0000 + + Correct a typo in GetStCmap.c + +commit 0d8f038db83f68724a84ef9d4ccd0d5e33ec6a70 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Aug 6 08:07:57 2020 -0700 + + libX11 1.6.11 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 93fce3f4e79cbc737d6468a4f68ba3de1b83953b +Author: Yichao Yu <yyc1992@gmail.com> +Date: Sun Aug 2 13:43:58 2020 -0400 + + Fix size calculation in `_XimAttributeToValue`. + + The check here guards the read below. + For `XimType_XIMStyles`, these are `num` of `CARD32` and for `XimType_XIMHotKeyTriggers` + these are `num` of `XIMTRIGGERKEY` ref[1] which is defined as 3 x `CARD32`. + (There are data after the `XIMTRIGGERKEY` according to the spec but they are not read by this + function and doesn't need to be checked.) + + The old code here used the native datatype size instead of the wire protocol size causing + the check to always fail. + + Also fix the size calculation for the header (size). It is 2 x CARD16 for both types + despite the unused `CARD16` for `XimType_XIMStyles`. + + [1] https://www.x.org/releases/X11R7.6/doc/libX11/specs/XIM/xim.html#Input_Method_Styles + + This fixes a regression caused by 388b303c62aa35a245f1704211a023440ad2c488 in 1.6.10. + + Fix #116 + +commit 9949364ea761ab7efa2a9930ec7718f966a740c0 +Author: Matthieu Herrb <matthieu@herrb.eu> +Date: Thu Jul 30 21:36:22 2020 +0200 + + libX11 1.6.10 + + Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> + +commit 1703b9f3435079d3c6021e1ee2ec34fd4978103d +Author: Matthieu Herrb <matthieu@herrb.eu> +Date: Fri Jul 24 21:09:10 2020 +0200 + + Change the data_len parameter of _XimAttributeToValue() to CARD16 + + It's coming from a length in the protocol (unsigned) and passed + to functions that expect unsigned int parameters (_XCopyToArg() + and memcpy()). + + Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> + Reviewed-by: Todd Carson <toc@daybefore.net> + +commit 1a566c9e00e5f35c1f9e7f3d741a02e5170852b2 +Author: Todd Carson <tc@daybefore.net> +Date: Fri Jul 24 20:59:32 2020 +0200 + + Zero out buffers in functions + + It looks like uninitialized stack or heap memory can leak + out via padding bytes. + + Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> + Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> + +commit 2fcfcc49f3b1be854bb9085993a01d17c62acf60 +Author: Todd Carson <tc@daybefore.net> +Date: Fri Jul 24 20:22:44 2020 +0200 + + Fix more unchecked lengths + + Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> + Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> + +commit 388b303c62aa35a245f1704211a023440ad2c488 +Author: Todd Carson <tc@daybefore.net> +Date: Fri Jul 24 19:36:51 2020 +0200 + + fix integer overflows in _XimAttributeToValue() + + Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> + Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> + +commit 0e6561efcfaa0ae7b5c74eac7e064b76d687544e +Author: Todd Carson <tc@daybefore.net> +Date: Fri Jul 24 19:33:30 2020 +0200 + + Fix signed length values in _XimGetAttributeID() + + The lengths are unsigned according to the specification. Passing + negative values can lead to data corruption. + + Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> + Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> + +commit 2b7598221d87049d03e9a95fcb541c37c8728184 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Wed Jul 22 15:19:58 2020 -0700 + + Fix spelling/wording issues + + Found by using: + codespell --builtin clear,rare,usage,informal,code,names + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f9e3378ebcfc79ff00591b8617a68e97580a741e +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Sun Jul 19 22:19:24 2020 +0200 + + xlibi18n: Fix converting horizline keysyms to UCS + + U+23BA - U+23BD are meant to represent the scan lines, and U+2500 is + unified with scan line 5. + + Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> + +commit 4385a84c4a79c1b60bf12839899a1544198de975 +Author: Samuel Thibault <samuel.thibault@ens-lyon.org> +Date: Thu Jun 4 02:19:13 2020 +0200 + + Braille: Fix default lookup + + cbb59d172 ('Braille: Fix typing quickly') broke the default lookup that + translates Braille keysym patterns to Braille Unicode patterns since it + rightfully clears brl_committing, but then we do not have it any more to + fill brl_committed. + + This change saves the committed pattern so we can return it in the + default lookup. + + Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> + +commit fb65b67169105c82c243f265e0f993cf72efdacd +Author: Marko Myllynen <myllynen@redhat.com> +Date: Fri Feb 28 13:59:36 2020 +0200 + + Update Finnish compose sequences for SFS 5966:2019 standard + + U0219, U0218, U021B, U021A are now part of the standard. + + Fixes #70 which was printed incorrectly in the earlier standard version. + +commit 07724ce046348a21cc82a874853b14b9a285df75 +Author: Tristan Miller <psychonaut@nothingisreal.com> +Date: Wed Sep 25 13:34:01 2019 +0200 + + Add acute accent compose sequences for Russian vowels. + + Fixes: https://gitlab.freedesktop.org/xorg/lib/libx11/issues/104 + + Signed-off-by: Tristan Miller <psychonaut@nothingisreal.com> + +commit 3ec9264d01a3a66c0fa0145a7c1db06a64be1507 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Apr 25 14:40:54 2020 -0400 + + document an ancient performance problem (see Debian #954845). + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 791c93816ce0520d54925b0b3ccbc29823370041 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Sat Apr 25 14:22:11 2020 -0400 + + update/correct function prototypes in manpages to match headers + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 844271305a28e87031562dfeb43defbea02960a2 +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Apr 21 20:53:35 2020 -0400 + + reduce gcc-normal warnings using casts (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 53b59ddfc114a55d26e9717a1b4822f1b18c40ca +Author: Thomas E. Dickey <dickey@invisible-island.net> +Date: Tue Apr 21 18:13:22 2020 -0400 + + reduce gcc-normal warnings using casts (no object change) + + Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net> + +commit 68c72a7341b114277ab232f2499ee3bd035af8a0 +Author: Adam Jackson <ajax@redhat.com> +Date: Wed Dec 11 11:53:11 2019 -0500 + + Fix XTS regression in XCopyColormapAndFree + + XCopyColormapAndFree/5 threw an assertion: + + 520|4 5 00014017 1 2|Assertion XCopyColormapAndFree-5.(A) + 520|4 5 00014017 1 3|When a colourmap argument does not name a valid colourmap, + 520|4 5 00014017 1 4|then a BadColor error occurs. + 520|4 5 00014017 1 5|METH: Create a bad colourmap by creating and freeing a colourmap. + 520|4 5 00014017 1 6|METH: Call test function using bad colourmap as the colourmap argument. + 520|4 5 00014017 1 7|METH: Verify that a BadColor error occurs. + 520|4 5 00014017 1 8|unexpected signal 6 (SIGABRT) received + 220|4 5 2 15:05:53|UNRESOLVED + 410|4 5 1 15:05:53|IC End + 510|4|system 0: Abandoning testset: caught unexpected signal 11 (SIGSEGV) + + More specifically: + + lt-XCopyColormapAndFree: xcb_io.c:533: _XAllocID: Assertion `ret != inval_id' failed. + + This bug was introduced (by following my advice, d'oh) in: + + commit 99a2cf1aa0b58391078d5d3edf0a7dab18c7745d + Author: Tapani Pälli <tapani.palli@intel.com> + Date: Mon May 13 08:29:49 2019 +0300 + + Protect colormap add/removal with display lock + + In that patch we moved the call to _XcmsCopyCmapRecAndFree inside the + display lock. The problem is said routine has side effects, including + trying to implicitly create a colormap in some cases. Since we don't run + the XID handler until SyncHandle() we would see inconsistent internal + xlib state, triggering the above assert. + + Fix this by dropping and re-taking the display lock before calling into + XCMS. + + Reviewed-by: Tapani Pälli <tapani.palli@intel.com> + +commit 7f46a38139f66fda734f3a6c445b84ea89c8f310 +Author: Alex Henrie <alexhenrie24@gmail.com> +Date: Wed Jan 1 14:54:06 2020 -0700 + + Handle small final sigma in XConvertCase + + lowercase: GREEK SMALL LETTER FINAL SIGMA (U+03C2) + uppercase: GREEK CAPITAL LETTER SIGMA (U+03A3) + + This mapping was correct in UCSConvertCase, but the "legacy" mapping + must also be correct for Caps Lock to work with the final sigma key. + + https://gitlab.freedesktop.org/xorg/lib/libx11/issues/5 + + Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> + +commit a48787d3d155c8a09cead345f5055da30c1db537 +Author: Peter Hutterer <peter.hutterer@who-t.net> +Date: Wed Dec 11 14:12:27 2019 +1000 + + Handle ssharp in XConvertCase() + + lowercase: LATIN SMALL LETTER SHARP S (U+00DF) + uppercase: LATIN CAPITAL LETTER SHARP S (U+1E9E) + + The uppercase sharp s (XK_ssharp) is a relatively recent addition to unicode + but was added to the relevant keyboard layouts in xkeyboard-config-2.25 + (d1411e5e95c) + https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/issues/144 + + Alas, the CapsLock behavior was broken on the finnish layout (maybe others). + This was due to xkbcomp using XConvertCase() to determine whether a key + requires the type FOUR_LEVEL_ALPHABETIC or FOUR_LEVEL_SEMIALPHABETIC. + + Let's make this function return the right lower/upper symbols for the sharp s + and hope that the world won't get any worse because of it. + + https://gitlab.freedesktop.org/xorg/lib/libx11/issues/110 + + Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> + +commit b8766a438461e20b5c6f7a6111b703d4cb71501f +Author: Raul Fernandes <rgfernandes@gmail.com> +Date: Wed Oct 9 18:39:26 2019 +0000 + + Use memcmp and memcpy + commit db7cca17ad7807e92a928da9d4c68a00f4836da2 Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 9 13:41:29 2019 -0400 diff --git a/lib/libX11/Makefile.bsd-wrapper b/lib/libX11/Makefile.bsd-wrapper index 334c34b19..49d54a664 100644 --- a/lib/libX11/Makefile.bsd-wrapper +++ b/lib/libX11/Makefile.bsd-wrapper @@ -1,7 +1,7 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.25 2019/08/04 13:33:46 matthieu Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.26 2020/11/28 14:39:45 matthieu Exp $ .include <bsd.xconf.mk> -SHARED_LIBS= X11 17.0 X11_xcb 2.0 +SHARED_LIBS= X11 17.1 X11_xcb 2.0 CONFIGURE_ARGS= --enable-tcp-transport --enable-unix-transport --enable-ipv6 \ --disable-composecache \ diff --git a/lib/libX11/Makefile.in b/lib/libX11/Makefile.in index 94bafe20a..36e73d32e 100644 --- a/lib/libX11/Makefile.in +++ b/lib/libX11/Makefile.in @@ -59,9 +59,10 @@ DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ @@ -350,6 +351,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/README.md b/lib/libX11/README.md index 371b890c9..a5fbd67f4 100644 --- a/lib/libX11/README.md +++ b/lib/libX11/README.md @@ -1,11 +1,11 @@ -libX11 - Core X11 protocol client library ------------------------------------------ +# libX11 - Core X11 protocol client library Documentation for this library can be found in the included man pages, and in the Xlib spec from the specs subdirectory, also available at: - https://www.x.org/releases/current/doc/libX11/libX11/libX11.html - https://www.x.org/releases/current/doc/libX11/libX11/libX11.pdf + - https://www.x.org/releases/current/doc/libX11/libX11/libX11.html + + - https://www.x.org/releases/current/doc/libX11/libX11/libX11.pdf and the O'Reilly Xlib books, which they have made freely available online, though only for older versions of X11: @@ -21,7 +21,7 @@ Xorg mailing list: https://lists.x.org/mailman/listinfo/xorg -The master development code repository can be found at: +The primary development code repository can be found at: https://gitlab.freedesktop.org/xorg/lib/libX11 @@ -31,3 +31,47 @@ For patch submission instructions, see: https://www.x.org/wiki/Development/Documentation/SubmittingPatches + +## Release 1.7.0 + +Version 1.7.0 includes a new API, hence the change from the 1.6 series +to 1.7: + + * XSetIOErrorExitHandler which provides a mechanism for applications + to recover from I/O error conditions instead of being forced to + exit. Thanks to Carlos Garnacho for this. + +This release includes a bunch of bug fixes, some which have been pending for over three years: + + * A bunch of nls cleanups to remove obsolete entries and clean up + formatting of the ist. Thanks to Benno Schulenberg for these. + + * Warning fixes and other cleanups across a huge swath of the + library. Thanks to Alan Coopersmith for these. + + * Memory allocation bugs, including leaks and use after free in the + locale code. Thanks to Krzesimir Nowak, Jacek Caban and Vittorio + Zecca for these. + + * Thread safety fixes in the locale code. Thanks to Jacek Caban for + these. + + * poll_for_response race condition fix. Thanks to Frediano Ziglio for + the bulk of this effort, and to Peter Hutterer for careful review + and improvements. + +Version 1.7.0 includes a couple of new locales: + + * ia and ie locales. Thanks to Carmina16 for these. + +There are also numerous compose entries added, including: + + * |^ or ^| for ↑, |v or v| for ↓, ~~ for ≈. Thanks to Antti + Savolainen for this. + + * Allowing use of 'v' for caron, in addition to 'c', so things like + vC for Č, vc for č. Thanks to Benno Schulenberg for this. + + * Compose sequences LT, lt for '<', and GT, gt for '>' for keyboards + where those are difficult to access. Thanks to Jonathan Belsewir + for this. diff --git a/lib/libX11/aclocal.m4 b/lib/libX11/aclocal.m4 index 5c7efbb7e..c80b07ba7 100644 --- a/lib/libX11/aclocal.m4 +++ b/lib/libX11/aclocal.m4 @@ -19,9 +19,9 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29.1) -dnl +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +# serial 12 (pkg-config-0.29.2) + dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> dnl @@ -62,7 +62,7 @@ dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29.1]) +[m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ @@ -163,7 +163,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no -AC_MSG_CHECKING([for $1]) +AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) @@ -173,11 +173,11 @@ and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` - else + else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs @@ -194,7 +194,7 @@ installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full @@ -1317,6 +1317,7 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ax_define_dir.m4]) +m4_include([m4/ax_gcc_builtin.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) diff --git a/lib/libX11/compile b/lib/libX11/compile index 99e50524b..23fcba011 100644 --- a/lib/libX11/compile +++ b/lib/libX11/compile @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ func_file_conv () MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ func_file_conv () mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff --git a/lib/libX11/configure b/lib/libX11/configure index 0a110ff6e..4be53a8ec 100644 --- a/lib/libX11/configure +++ b/lib/libX11/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libX11 1.6.9. +# Generated by GNU Autoconf 2.69 for libX11 1.7.0. # # Report bugs to <https://gitlab.freedesktop.org/xorg/lib/libx11/issues>. # @@ -651,8 +651,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libX11' PACKAGE_TARNAME='libX11' -PACKAGE_VERSION='1.6.9' -PACKAGE_STRING='libX11 1.6.9' +PACKAGE_VERSION='1.7.0' +PACKAGE_STRING='libX11 1.7.0' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/lib/libx11/issues' PACKAGE_URL='' @@ -890,6 +890,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -1010,6 +1011,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1262,6 +1264,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1399,7 +1410,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1512,7 +1523,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.9 to adapt to many kinds of systems. +\`configure' configures libX11 1.7.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1552,6 +1563,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1582,7 +1594,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libX11 1.6.9:";; + short | recursive ) echo "Configuration of libX11 1.7.0:";; esac cat <<\_ACEOF @@ -1749,7 +1761,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libX11 configure 1.6.9 +libX11 configure 1.7.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2275,7 +2287,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.9, which was +It was created by libX11 $as_me 1.7.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4493,7 +4505,7 @@ fi # Define the identity of the package. PACKAGE='libX11' - VERSION='1.6.9' + VERSION='1.7.0' cat >>confdefs.h <<_ACEOF @@ -19178,7 +19190,7 @@ fi # Checks for pkg-config packages # Always required -X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.11.1' +X11_REQUIRES='xproto >= 7.0.25 xextproto xtrans xcb >= 1.11.1' X11_EXTRA_DEPS="xcb >= 1.11.1" @@ -19873,6 +19885,50 @@ done # Checks for typedefs, structures, and compiler characteristics. + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcountl" >&5 +$as_echo_n "checking for __builtin_popcountl... " >&6; } +if ${ax_cv_have___builtin_popcountl+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + __builtin_popcountl(0) + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ax_cv_have___builtin_popcountl=yes +else + ax_cv_have___builtin_popcountl=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have___builtin_popcountl" >&5 +$as_echo "$ax_cv_have___builtin_popcountl" >&6; } + + if test yes = $ax_cv_have___builtin_popcountl; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE___BUILTIN_POPCOUNTL 1 +_ACEOF + +fi + + + + # Checks for library functions. for ac_func in strtol seteuid do : @@ -20263,8 +20319,8 @@ fi if test "x$XF86BIGFONT" = "xyes"; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BIGFONT" >&5 -$as_echo_n "checking for BIGFONT... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xf86bigfontproto >= 1.2.0" >&5 +$as_echo_n "checking for xf86bigfontproto >= 1.2.0... " >&6; } if test -n "$BIGFONT_CFLAGS"; then pkg_cv_BIGFONT_CFLAGS="$BIGFONT_CFLAGS" @@ -20304,7 +20360,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -20322,7 +20378,7 @@ fi XF86BIGFONT="no" elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } XF86BIGFONT="no" else @@ -20760,8 +20816,8 @@ _ACEOF pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X11" >&5 -$as_echo_n "checking for X11... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $X11_REQUIRES" >&5 +$as_echo_n "checking for $X11_REQUIRES... " >&6; } if test -n "$X11_CFLAGS"; then pkg_cv_X11_CFLAGS="$X11_CFLAGS" @@ -20801,7 +20857,7 @@ fi if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then @@ -20828,7 +20884,7 @@ Alternatively, you may set the environment variables X11_CFLAGS and X11_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -20935,7 +20991,7 @@ locales="\ ja_JP.UTF-8 ja.SJIS km_KH.UTF-8 ko koi8-c koi8-r \ koi8-u ko_KR.UTF-8 microsoft-cp1251 microsoft-cp1255 \ microsoft-cp1256 mulelao-1 nokhchi-1 pt_BR.UTF-8 pt_PT.UTF-8 \ - ru_RU.UTF-8 sr_CS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 \ + ru_RU.UTF-8 sr_RS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 \ vi_VN.tcvn vi_VN.viscii zh_CN zh_CN.gb18030 \ zh_CN.gbk zh_CN.UTF-8 zh_HK.big5 zh_HK.big5hkscs zh_HK.UTF-8 \ zh_TW zh_TW.big5 zh_TW.UTF-8" @@ -21647,7 +21703,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.9, which was +This file was extended by libX11 $as_me 1.7.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21713,7 +21769,7 @@ _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.9 +libX11 config.status 1.7.0 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 3a042bab5..bd7755a62 100644 --- a/lib/libX11/configure.ac +++ b/lib/libX11/configure.ac @@ -1,7 +1,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libX11], [1.6.9], +AC_INIT([libX11], [1.7.0], [https://gitlab.freedesktop.org/xorg/lib/libx11/issues], [libX11]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([src/config.h include/X11/XlibConf.h]) @@ -78,7 +78,7 @@ AC_SUBST([EXEEXT_FOR_BUILD]) # Checks for pkg-config packages # Always required -X11_REQUIRES='xproto >= 7.0.17 xextproto xtrans xcb >= 1.11.1' +X11_REQUIRES='xproto >= 7.0.25 xextproto xtrans xcb >= 1.11.1' X11_EXTRA_DEPS="xcb >= 1.11.1" PKG_PROG_PKG_CONFIG() @@ -152,6 +152,7 @@ AC_MSG_RESULT($XLIB_LOADABLE_XCURSOR) AC_CHECK_HEADERS([sys/filio.h sys/select.h sys/ioctl.h sys/socket.h]) # Checks for typedefs, structures, and compiler characteristics. +AX_GCC_BUILTIN([__builtin_popcountl]) # Checks for library functions. AC_CHECK_FUNCS([strtol seteuid]) @@ -375,7 +376,7 @@ locales="\ ja_JP.UTF-8 ja.SJIS km_KH.UTF-8 ko koi8-c koi8-r \ koi8-u ko_KR.UTF-8 microsoft-cp1251 microsoft-cp1255 \ microsoft-cp1256 mulelao-1 nokhchi-1 pt_BR.UTF-8 pt_PT.UTF-8 \ - ru_RU.UTF-8 sr_CS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 \ + ru_RU.UTF-8 sr_RS.UTF-8 tatar-cyr th_TH th_TH.UTF-8 tscii-0 \ vi_VN.tcvn vi_VN.viscii zh_CN zh_CN.gb18030 \ zh_CN.gbk zh_CN.UTF-8 zh_HK.big5 zh_HK.big5hkscs zh_HK.UTF-8 \ zh_TW zh_TW.big5 zh_TW.UTF-8" diff --git a/lib/libX11/cpprules.in b/lib/libX11/cpprules.in index cd2388ba6..be5e1a3f9 100644 --- a/lib/libX11/cpprules.in +++ b/lib/libX11/cpprules.in @@ -23,7 +23,8 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ -e '/^[ ]*XHASH/s/XHASH/\#/' \ -e 's,X11_LOCALEDATADIR,$(X11_LOCALEDATADIR),g' \ - -e '/\@\@$$/s/\@\@$$/\\/' + -e '/\@\@$$/s/\@\@$$/\\/' \ + -e '/^$$/d' .pre: @$(mkdir_p) $(@D) diff --git a/lib/libX11/include/Makefile.in b/lib/libX11/include/Makefile.in index ee0b5658f..911ddf903 100644 --- a/lib/libX11/include/Makefile.in +++ b/lib/libX11/include/Makefile.in @@ -55,9 +55,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(x11extinclude_HEADERS) $(x11include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -291,6 +292,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/include/X11/ImUtil.h b/lib/libX11/include/X11/ImUtil.h index ffdba1a93..779e1dc15 100644 --- a/lib/libX11/include/X11/ImUtil.h +++ b/lib/libX11/include/X11/ImUtil.h @@ -15,16 +15,16 @@ _XGetBitsPerPixel( extern int _XSetImage( XImage *srcimg, - register XImage *dstimg, - register int x, - register int y); + XImage *dstimg, + int x, + int y); extern int _XReverse_Bytes( - register unsigned char *bpt, - register int nb); + unsigned char *bpt, + int nb); extern void _XInitImageFuncPtrs( - register XImage *image); + XImage *image); #endif /* _X11_IMUTIL_H_ */ diff --git a/lib/libX11/include/X11/XKBlib.h b/lib/libX11/include/X11/XKBlib.h index 8f6c72c12..dd532b224 100644 --- a/lib/libX11/include/X11/XKBlib.h +++ b/lib/libX11/include/X11/XKBlib.h @@ -396,7 +396,7 @@ extern Bool XkbTranslateKeyCode( extern int XkbTranslateKeySym( Display * /* dpy */, - register KeySym * /* sym_return */, + KeySym * /* sym_return */, unsigned int /* modifiers */, char * /* buffer */, int /* nbytes */, diff --git a/lib/libX11/include/X11/Xlib.h b/lib/libX11/include/X11/Xlib.h index 84403f79e..65f814924 100644 --- a/lib/libX11/include/X11/Xlib.h +++ b/lib/libX11/include/X11/Xlib.h @@ -295,7 +295,7 @@ typedef struct { int bit_gravity; /* one of bit gravity values */ int win_gravity; /* one of the window gravity values */ int backing_store; /* NotUseful, WhenMapped, Always */ - unsigned long backing_planes;/* planes to be preseved if possible */ + unsigned long backing_planes;/* planes to be preserved if possible */ unsigned long backing_pixel;/* value to use in restoring planes */ Bool save_under; /* should bits under be saved? (popups) */ long event_mask; /* set of events that should be saved */ @@ -369,7 +369,7 @@ typedef struct _XImage { int depth; /* depth of image */ int bytes_per_line; /* accelarator to next line */ int bits_per_pixel; /* bits per pixel (ZPixmap) */ - unsigned long red_mask; /* bits in z arrangment */ + unsigned long red_mask; /* bits in z arrangement */ unsigned long green_mask; unsigned long blue_mask; XPointer obdata; /* hook for the object routines to hang on */ @@ -1858,6 +1858,16 @@ extern XIOErrorHandler XSetIOErrorHandler ( XIOErrorHandler /* handler */ ); +typedef void (*XIOErrorExitHandler) ( /* WARNING, this type not in Xlib spec */ + Display*, /* display */ + void* /* user_data */ +); + +extern void XSetIOErrorExitHandler ( + Display*, /* display */ + XIOErrorExitHandler, /* handler */ + void* /* user_data */ +); extern XPixmapFormatValues *XListPixmapFormats( Display* /* display */, diff --git a/lib/libX11/include/X11/Xlibint.h b/lib/libX11/include/X11/Xlibint.h index 844571688..abcc59acb 100644 --- a/lib/libX11/include/X11/Xlibint.h +++ b/lib/libX11/include/X11/Xlibint.h @@ -203,8 +203,10 @@ struct _XDisplay unsigned long request_upper32bit; #endif - /* avoid recursion on requests sequence number synchronization */ - Bool req_seq_syncing; /* requests syncing is in-progress */ + struct _XErrorThreadInfo *error_threads; + + XIOErrorExitHandler exit_handler; + void *exit_handler_data; }; #define XAllocIDs(dpy,ids,n) (*(dpy)->idlist_alloc)(dpy,ids,n) @@ -447,15 +449,15 @@ extern LockInfoPtr _Xglobal_lock; */ #if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__) -# define Xmalloc(size) malloc(((size) == 0 ? 1 : (size))) -# define Xrealloc(ptr, size) realloc((ptr), ((size) == 0 ? 1 : (size))) -# define Xcalloc(nelem, elsize) calloc(((nelem) == 0 ? 1 : (nelem)), (elsize)) +# define Xmalloc(size) malloc((size_t)((size) == 0 ? 1 : (size))) +# define Xrealloc(ptr, size) realloc((ptr), (size_t)((size) == 0 ? 1 : (size))) +# define Xcalloc(nelem, elsize) calloc((size_t)((nelem) == 0 ? 1 : (nelem)), (size_t)(elsize)) #else -# define Xmalloc(size) malloc((size)) -# define Xrealloc(ptr, size) realloc((ptr), (size)) -# define Xcalloc(nelem, elsize) calloc((nelem), (elsize)) +# define Xmalloc(size) malloc((size_t)(size)) +# define Xrealloc(ptr, size) realloc((ptr), (size_t)(size)) +# define Xcalloc(nelem, elsize) calloc((size_t)(nelem), (size_t)(elsize)) #endif @@ -639,7 +641,7 @@ extern void _XFlushGCCache(Display *dpy, GC gc); #ifndef DataRoutineIsProcedure #define Data(dpy, data, len) {\ if (dpy->bufptr + (len) <= dpy->bufmax) {\ - memcpy(dpy->bufptr, data, (int)len);\ + memcpy(dpy->bufptr, data, (int)(len));\ dpy->bufptr += ((len) + 3) & ~3;\ } else\ _XSend(dpy, data, len);\ @@ -675,12 +677,12 @@ extern void _XFlushGCCache(Display *dpy, GC gc); #define Data32(dpy, data, len) _XData32(dpy, (_Xconst long *)data, len) extern int _XData32( Display *dpy, - register _Xconst long *data, + _Xconst long *data, unsigned len ); extern void _XRead32( Display *dpy, - register long *data, + long *data, long len ); #else @@ -918,15 +920,6 @@ typedef struct _XExten { /* private to extension mechanism */ struct _XExten *next_flush; /* next in list of those with flushes */ } _XExtension; -/* Temporary definition until we can depend on an xproto release with it */ -#ifdef _X_COLD -# define _XLIB_COLD _X_COLD -#elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403) /* 4.3+ */ -# define _XLIB_COLD __attribute__((__cold__)) -#else -# define _XLIB_COLD /* nothing */ -#endif - /* extension hooks */ #ifdef DataRoutineIsProcedure @@ -938,7 +931,7 @@ extern int _XError( ); extern int _XIOError( Display* /* dpy */ -) _X_NORETURN; +); extern int (*_XIOErrorFunction)( Display* /* dpy */ ); @@ -949,11 +942,11 @@ extern int (*_XErrorFunction)( extern void _XEatData( Display* /* dpy */, unsigned long /* n */ -) _XLIB_COLD; +) _X_COLD; extern void _XEatDataWords( Display* /* dpy */, unsigned long /* n */ -) _XLIB_COLD; +) _X_COLD; #if defined(__SUNPRO_C) /* Studio compiler alternative to "cold" attribute */ # pragma rarely_called(_XEatData, _XEatDataWords) #endif @@ -1382,10 +1375,10 @@ extern int _XF86LoadQueryLocaleFont( ); extern void _XProcessWindowAttributes ( - register Display *dpy, + Display *dpy, xChangeWindowAttributesReq *req, - register unsigned long valuemask, - register XSetWindowAttributes *attributes); + unsigned long valuemask, + XSetWindowAttributes *attributes); extern int _XDefaultError( Display *dpy, @@ -1394,8 +1387,12 @@ extern int _XDefaultError( extern int _XDefaultIOError( Display *dpy); +extern void _XDefaultIOErrorExit( + Display *dpy, + void *user_data); + extern void _XSetClipRectangles ( - register Display *dpy, + Display *dpy, GC gc, int clip_x_origin, int clip_y_origin, XRectangle *rectangles, @@ -1403,13 +1400,13 @@ extern void _XSetClipRectangles ( int ordering); Status _XGetWindowAttributes( - register Display *dpy, + Display *dpy, Window w, XWindowAttributes *attr); int _XPutBackEvent ( - register Display *dpy, - register XEvent *event); + Display *dpy, + XEvent *event); extern Bool _XIsEventCookie( Display *dpy, diff --git a/lib/libX11/m4/ax_gcc_builtin.m4 b/lib/libX11/m4/ax_gcc_builtin.m4 new file mode 100644 index 000000000..18e62b87a --- /dev/null +++ b/lib/libX11/m4/ax_gcc_builtin.m4 @@ -0,0 +1,176 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_gcc_builtin.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_GCC_BUILTIN(BUILTIN) +# +# DESCRIPTION +# +# This macro checks if the compiler supports one of GCC's built-in +# functions; many other compilers also provide those same built-ins. +# +# The BUILTIN parameter is the name of the built-in function. +# +# If BUILTIN is supported define HAVE_<BUILTIN>. Keep in mind that since +# builtins usually start with two underscores they will be copied over +# into the HAVE_<BUILTIN> definition (e.g. HAVE___BUILTIN_EXPECT for +# __builtin_expect()). +# +# The macro caches its result in the ax_cv_have_<BUILTIN> variable (e.g. +# ax_cv_have___builtin_expect). +# +# The macro currently supports the following built-in functions: +# +# __builtin_assume_aligned +# __builtin_bswap16 +# __builtin_bswap32 +# __builtin_bswap64 +# __builtin_choose_expr +# __builtin___clear_cache +# __builtin_clrsb +# __builtin_clrsbl +# __builtin_clrsbll +# __builtin_clz +# __builtin_clzl +# __builtin_clzll +# __builtin_complex +# __builtin_constant_p +# __builtin_cpu_init +# __builtin_cpu_is +# __builtin_cpu_supports +# __builtin_ctz +# __builtin_ctzl +# __builtin_ctzll +# __builtin_expect +# __builtin_ffs +# __builtin_ffsl +# __builtin_ffsll +# __builtin_fpclassify +# __builtin_huge_val +# __builtin_huge_valf +# __builtin_huge_vall +# __builtin_inf +# __builtin_infd128 +# __builtin_infd32 +# __builtin_infd64 +# __builtin_inff +# __builtin_infl +# __builtin_isinf_sign +# __builtin_nan +# __builtin_nand128 +# __builtin_nand32 +# __builtin_nand64 +# __builtin_nanf +# __builtin_nanl +# __builtin_nans +# __builtin_nansf +# __builtin_nansl +# __builtin_object_size +# __builtin_parity +# __builtin_parityl +# __builtin_parityll +# __builtin_popcount +# __builtin_popcountl +# __builtin_popcountll +# __builtin_powi +# __builtin_powif +# __builtin_powil +# __builtin_prefetch +# __builtin_trap +# __builtin_types_compatible_p +# __builtin_unreachable +# +# Unsupported built-ins will be tested with an empty parameter set and the +# result of the check might be wrong or meaningless so use with care. +# +# LICENSE +# +# Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com> +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_GCC_BUILTIN], [ + AS_VAR_PUSHDEF([ac_var], [ax_cv_have_$1]) + + AC_CACHE_CHECK([for $1], [ac_var], [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ + m4_case([$1], + [__builtin_assume_aligned], [$1("", 0)], + [__builtin_bswap16], [$1(0)], + [__builtin_bswap32], [$1(0)], + [__builtin_bswap64], [$1(0)], + [__builtin_choose_expr], [$1(0, 0, 0)], + [__builtin___clear_cache], [$1("", "")], + [__builtin_clrsb], [$1(0)], + [__builtin_clrsbl], [$1(0)], + [__builtin_clrsbll], [$1(0)], + [__builtin_clz], [$1(0)], + [__builtin_clzl], [$1(0)], + [__builtin_clzll], [$1(0)], + [__builtin_complex], [$1(0.0, 0.0)], + [__builtin_constant_p], [$1(0)], + [__builtin_cpu_init], [$1()], + [__builtin_cpu_is], [$1("intel")], + [__builtin_cpu_supports], [$1("sse")], + [__builtin_ctz], [$1(0)], + [__builtin_ctzl], [$1(0)], + [__builtin_ctzll], [$1(0)], + [__builtin_expect], [$1(0, 0)], + [__builtin_ffs], [$1(0)], + [__builtin_ffsl], [$1(0)], + [__builtin_ffsll], [$1(0)], + [__builtin_fpclassify], [$1(0, 1, 2, 3, 4, 0.0)], + [__builtin_huge_val], [$1()], + [__builtin_huge_valf], [$1()], + [__builtin_huge_vall], [$1()], + [__builtin_inf], [$1()], + [__builtin_infd128], [$1()], + [__builtin_infd32], [$1()], + [__builtin_infd64], [$1()], + [__builtin_inff], [$1()], + [__builtin_infl], [$1()], + [__builtin_isinf_sign], [$1(0.0)], + [__builtin_nan], [$1("")], + [__builtin_nand128], [$1("")], + [__builtin_nand32], [$1("")], + [__builtin_nand64], [$1("")], + [__builtin_nanf], [$1("")], + [__builtin_nanl], [$1("")], + [__builtin_nans], [$1("")], + [__builtin_nansf], [$1("")], + [__builtin_nansl], [$1("")], + [__builtin_object_size], [$1("", 0)], + [__builtin_parity], [$1(0)], + [__builtin_parityl], [$1(0)], + [__builtin_parityll], [$1(0)], + [__builtin_popcount], [$1(0)], + [__builtin_popcountl], [$1(0)], + [__builtin_popcountll], [$1(0)], + [__builtin_powi], [$1(0, 0)], + [__builtin_powif], [$1(0, 0)], + [__builtin_powil], [$1(0, 0)], + [__builtin_prefetch], [$1("")], + [__builtin_trap], [$1()], + [__builtin_types_compatible_p], [$1(int, int)], + [__builtin_unreachable], [$1()], + [m4_warn([syntax], [Unsupported built-in $1, the test may fail]) + $1()] + ) + ])], + [AS_VAR_SET([ac_var], [yes])], + [AS_VAR_SET([ac_var], [no])]) + ]) + + AS_IF([test yes = AS_VAR_GET([ac_var])], + [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1), 1, + [Define to 1 if the system has the `$1' built-in function])], []) + + AS_VAR_POPDEF([ac_var]) +]) diff --git a/lib/libX11/man/AllPlanes.man b/lib/libX11/man/AllPlanes.man index 70d837e87..3532bef55 100644 --- a/lib/libX11/man/AllPlanes.man +++ b/lib/libX11/man/AllPlanes.man @@ -63,7 +63,7 @@ Colormap DefaultColormap\^(\^Display *\fIdisplay\fP\^, int DefaultDepth\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); .HP int *XListDepths\^(\^Display *\fIdisplay\fP, int \fIscreen_number\fP, int -\fIcount_return\fP\^); +*\fIcount_return\fP\^); .HP GC DefaultGC\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); .HP @@ -82,9 +82,9 @@ int DisplayPlanes\^(\^Display *\fIdisplay\fP\^, \^int \fIscreen_number\fP\^); .HP char *DisplayString\^(\^Display *\fIdisplay\fP\^); .HP -long XMaxRequestSize(\^Display *\fIdisplay\fP\^) +long XMaxRequestSize(\^Display *\fIdisplay\fP\^); .HP -long XExtendedMaxRequestSize(\^Display *\fIdisplay\fP\^) +long XExtendedMaxRequestSize(\^Display *\fIdisplay\fP\^); .HP unsigned long LastKnownRequestProcessed\^(\^Display *\fIdisplay\fP\^); .HP @@ -103,9 +103,9 @@ int ScreenCount\^(\^Display *\fIdisplay\fP\^); Screen *ScreenOfDisplay\^(\^Display *\fIdisplay\fP, int \fIscreen_number\fP\^); .HP -char *ServerVendor\^(\^Display *\fIdisplay\fP\^) +char *ServerVendor\^(\^Display *\fIdisplay\fP\^); .HP -int VendorRelease\^(\^Display *\fIdisplay\fP\^) +int VendorRelease\^(\^Display *\fIdisplay\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/lib/libX11/man/Makefile.in b/lib/libX11/man/Makefile.in index 25dcb0189..b7d4591d0 100644 --- a/lib/libX11/man/Makefile.in +++ b/lib/libX11/man/Makefile.in @@ -54,9 +54,10 @@ subdir = man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -326,6 +327,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/man/XAddConnectionWatch.man b/lib/libX11/man/XAddConnectionWatch.man index 7dc66eef2..b776092dd 100644 --- a/lib/libX11/man/XAddConnectionWatch.man +++ b/lib/libX11/man/XAddConnectionWatch.man @@ -54,10 +54,10 @@ typedef void (*XConnectionWatchProc)\^(\^Display *\fIdisplay\fP\^, XPointer \fIclient_data\fP\^, int \fIfd\fP\^, Bool \fIopening\fP\^, XPointer *\fIwatch_data\fP\^); .HP -Status XAddConnectionWatch\^(\^Display *\fIdisplay\fP\^, XWatchProc +Status XAddConnectionWatch\^(\^Display *\fIdisplay\fP\^, XConnectionWatchProc \fIprocedure\fP\^, XPointer \fIclient_data\fP\^); .HP -Status XRemoveConnectionWatch\^(\^Display *\fIdisplay\fP\^, XWatchProc +void XRemoveConnectionWatch\^(\^Display *\fIdisplay\fP\^, XConnectionWatchProc \fIprocedure\fP\^, XPointer \fIclient_data\fP\^); .HP void XProcessInternalConnection\^(\^Display *\fIdisplay\fP\^, int \fIfd\fP\^); diff --git a/lib/libX11/man/XAddHost.man b/lib/libX11/man/XAddHost.man index 03b9fd4d6..bb75aa2d5 100644 --- a/lib/libX11/man/XAddHost.man +++ b/lib/libX11/man/XAddHost.man @@ -82,7 +82,7 @@ int XAddHosts\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhosts\fP, int \fInum_hosts\fP\^); .HP XHostAddress *XListHosts\^(\^Display *\fIdisplay\fP, int *\fInhosts_return\fP, -Bool \fIstate_return\fP\^); +Bool *\fIstate_return\fP\^); .HP int XRemoveHost\^(\^Display *\fIdisplay\fP, XHostAddress *\fIhost\fP\^); .HP diff --git a/lib/libX11/man/XAllocColor.man b/lib/libX11/man/XAllocColor.man index d7ff5e986..aa051ed97 100644 --- a/lib/libX11/man/XAllocColor.man +++ b/lib/libX11/man/XAllocColor.man @@ -56,7 +56,7 @@ Status XAllocColor\^(\^Display *\fIdisplay\fP, Colormap \fIcolormap\fP\^, XColor *\fIscreen_in_out\fP\^); .HP Status XAllocNamedColor\^(\^Display *\fIdisplay\fP, Colormap \fIcolormap\fP\^, -char *\fIcolor_name\fP\^, XColor *\fIscreen_def_return\fP\^, XColor +_Xconst char *\fIcolor_name\fP\^, XColor *\fIscreen_def_return\fP\^, XColor *\fIexact_def_return\fP\^); .HP Status XAllocColorCells\^(\^Display *\fIdisplay\fP, Colormap \fIcolormap\fP\^, diff --git a/lib/libX11/man/XAllocIconSize.man b/lib/libX11/man/XAllocIconSize.man index ae5162ff2..36c09cfca 100644 --- a/lib/libX11/man/XAllocIconSize.man +++ b/lib/libX11/man/XAllocIconSize.man @@ -55,7 +55,7 @@ int XSetIconSizes\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XIconSize *\fIsize_list\fP, int \fIcount\fP\^); .LP Status XGetIconSizes\^(\^Display *\fIdisplay\fP, Window \fIw\fP, XIconSize -**\fIsize_list_return\fP, int \fIcount_return\fP\^); +**\fIsize_list_return\fP, int *\fIcount_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/lib/libX11/man/XCopyArea.man b/lib/libX11/man/XCopyArea.man index 25f9ed9bc..0ac299c44 100644 --- a/lib/libX11/man/XCopyArea.man +++ b/lib/libX11/man/XCopyArea.man @@ -57,7 +57,7 @@ int \fIwidth\fP\^, unsigned \fIheight\fP\^, int \fIdest_x\fP\^, int .HP int XCopyPlane\^(\^Display *\fIdisplay\fP\^, Drawable \fIsrc\fP\^, Drawable \fIdest\fP\^, GC \fIgc\fP\^, int \fIsrc_x\fP\^, int \fIsrc_y\fP\^, unsigned -\fIwidth\fP\^, int \fIheight\fP\^, int \fIdest_x\fP\^, int \fIdest_y\fP\^, +\fIwidth\fP\^, unsigned \fIheight\fP\^, int \fIdest_x\fP\^, int \fIdest_y\fP\^, unsigned long \fIplane\fP\^); .SH ARGUMENTS .IP \fIdest_x\fP 1i diff --git a/lib/libX11/man/XCreateFontCursor.man b/lib/libX11/man/XCreateFontCursor.man index 587d1cfd6..977795ff2 100644 --- a/lib/libX11/man/XCreateFontCursor.man +++ b/lib/libX11/man/XCreateFontCursor.man @@ -60,8 +60,8 @@ Cursor XCreatePixmapCursor\^(\^Display *\fIdisplay\fP\^, Pixmap .HP Cursor XCreateGlyphCursor\^(\^Display *\fIdisplay\fP\^, Font \fIsource_font\fP\^, Font \fImask_font\fP\^, unsigned int \fIsource_char\fP\^, -unsigned int \fImask_char\fP\^, XColor *\fIforeground_color\fP\^, XColor -*\fIbackground_color\fP\^); +unsigned int \fImask_char\fP\^, XColor _Xconst *\fIforeground_color\fP\^, XColor +_Xconst *\fIbackground_color\fP\^); .SH ARGUMENTS .IP \fIbackground_color\fP 1i Specifies the RGB values for the background of the source. diff --git a/lib/libX11/man/XCreateFontSet.man b/lib/libX11/man/XCreateFontSet.man index d2111eb35..3b102cfe3 100644 --- a/lib/libX11/man/XCreateFontSet.man +++ b/lib/libX11/man/XCreateFontSet.man @@ -50,7 +50,7 @@ XCreateFontSet, XFreeFontSet \- create and free an international text drawing font set .SH SYNTAX .HP -XFontSet XCreateFontSet\^(\^Display *\fIdisplay\fP\^, char +XFontSet XCreateFontSet\^(\^Display *\fIdisplay\fP\^, _Xconst char *\fIbase_font_name_list\fP\^, char ***\fImissing_charset_list_return\fP\^, int *\fImissing_charset_count_return\fP\^, char **\fIdef_string_return\fP\^); .HP diff --git a/lib/libX11/man/XCreateGC.man b/lib/libX11/man/XCreateGC.man index e737f98ae..0c7674f7d 100644 --- a/lib/libX11/man/XCreateGC.man +++ b/lib/libX11/man/XCreateGC.man @@ -178,7 +178,7 @@ If the valuemask contains a valid set of GC mask bits .BR GCSubwindowMode , .BR GCGraphicsExposures , .BR GCClipXOrigin , -.BR GCCLipYOrigin , +.BR GCClipYOrigin , .BR GCDashOffset , or .BR GCArcMode ) diff --git a/lib/libX11/man/XCreateOC.man b/lib/libX11/man/XCreateOC.man index 8b2644b76..22f484ae6 100644 --- a/lib/libX11/man/XCreateOC.man +++ b/lib/libX11/man/XCreateOC.man @@ -50,7 +50,7 @@ XCreateOC, XDestroyOC, XSetOCValues, XGetOCValues, XOMOfOC \- create output contexts .SH SYNTAX .HP -XOC XCreateOC\^(\^XOM \fIom\fP\^); +XOC XCreateOC\^(\^XOM \fIom\fP\^, ...); .HP void XDestroyOC\^(\^XOC \fIoc\fP\^); .HP diff --git a/lib/libX11/man/XDrawImageString.man b/lib/libX11/man/XDrawImageString.man index 9f2cffcad..fb741deea 100644 --- a/lib/libX11/man/XDrawImageString.man +++ b/lib/libX11/man/XDrawImageString.man @@ -51,11 +51,11 @@ XDrawImageString, XDrawImageString16 \- draw image text .SH SYNTAX .HP int XDrawImageString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC -\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char *\fIstring\fP\^, int +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, _Xconst char *\fIstring\fP\^, int \fIlength\fP\^); .HP int XDrawImageString16\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC -\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, XChar2b *\fIstring\fP\^, int +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, _Xconst XChar2b *\fIstring\fP\^, int \fIlength\fP\^); .SH ARGUMENTS .IP \fId\fP 1i @@ -149,6 +149,13 @@ window is used as a Drawable. .B BadMatch Some argument or pair of arguments has the correct type and range but fails to match in some other way required by the request. +.SH NOTES +Unlike XDrawString and XDrawString16, +these functions send no more than 255 characters at a time to the server. +When the total number of characters to be sent is larger than 255, +these functions split the string into chunks up to 255 characters. +After sending each chunk, +these functions query the server to determine the actual text extent. .SH "SEE ALSO" XDrawString(__libmansuffix__), XDrawText(__libmansuffix__), diff --git a/lib/libX11/man/XDrawString.man b/lib/libX11/man/XDrawString.man index 97844ee16..295c1a368 100644 --- a/lib/libX11/man/XDrawString.man +++ b/lib/libX11/man/XDrawString.man @@ -51,11 +51,11 @@ XDrawString, XDrawString16 \- draw text characters .SH SYNTAX .HP int XDrawString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC -\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char *\fIstring\fP\^, int +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, _Xconst char *\fIstring\fP\^, int \fIlength\fP\^); .HP int XDrawString16\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, GC -\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, XChar2b *\fIstring\fP\^, int +\fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, _Xconst XChar2b *\fIstring\fP\^, int \fIlength\fP\^); .SH ARGUMENTS .IP \fId\fP 1i diff --git a/lib/libX11/man/XGetWindowProperty.man b/lib/libX11/man/XGetWindowProperty.man index 70df32498..b297ffff8 100644 --- a/lib/libX11/man/XGetWindowProperty.man +++ b/lib/libX11/man/XGetWindowProperty.man @@ -61,7 +61,7 @@ Atom *XListProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, int .HP int XChangeProperty\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Atom \fIproperty\fP\^, Atom \fItype\fP\^, int \fIformat\fP\^, int \fImode\fP\^, -unsigned char *\fIdata\fP\^, int \fInelements\fP\^); +_Xconst unsigned char *\fIdata\fP\^, int \fInelements\fP\^); .HP int XRotateWindowProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, Atom \fIproperties\fP\^[]\^, int \fInum_prop\fP\^, int \fInpositions\fP\^); diff --git a/lib/libX11/man/XInternAtom.man b/lib/libX11/man/XInternAtom.man index 6cd6374d6..c9b962171 100644 --- a/lib/libX11/man/XInternAtom.man +++ b/lib/libX11/man/XInternAtom.man @@ -50,7 +50,7 @@ XInternAtom, XInternAtoms, XGetAtomName, XGetAtomNames \- create or return atom names .SH SYNTAX .HP -Atom XInternAtom\^(\^Display *\fIdisplay\fP\^, char *\fIatom_name\fP\^, Bool +Atom XInternAtom\^(\^Display *\fIdisplay\fP\^, _Xconst char *\fIatom_name\fP\^, Bool \fIonly_if_exists\fP\^); .HP Status XInternAtoms\^(\^Display *\fIdisplay\fP\^, char **\fInames\fP\^, int diff --git a/lib/libX11/man/XListFonts.man b/lib/libX11/man/XListFonts.man index 6dd1c9e9c..ed3213a64 100644 --- a/lib/libX11/man/XListFonts.man +++ b/lib/libX11/man/XListFonts.man @@ -50,12 +50,12 @@ XListFonts, XFreeFontNames, XListFontsWithInfo, XFreeFontInfo \- obtain or free font names and information .SH SYNTAX .HP -char **XListFonts\^(\^Display *\^\fIdisplay\fP\^, char *\^\fIpattern\fP\^, int +char **XListFonts\^(\^Display *\^\fIdisplay\fP\^, _Xconst char *\^\fIpattern\fP\^, int \fImaxnames\fP\^, int *\^\fIactual_count_return\fP\^); .HP int XFreeFontNames\^(\^char *\fIlist\fP\^[\^]\^); .HP -char **XListFontsWithInfo\^(\^Display *\fIdisplay\fP\^, char *\fIpattern\fP\^, +char **XListFontsWithInfo\^(\^Display *\fIdisplay\fP\^, _Xconst char *\fIpattern\fP\^, int \fImaxnames\fP\^, int *\fIcount_return\fP\^, XFontStruct **\fIinfo_return\fP\^); .HP diff --git a/lib/libX11/man/XLoadFont.man b/lib/libX11/man/XLoadFont.man index b4c023ef6..4fc237ba0 100644 --- a/lib/libX11/man/XLoadFont.man +++ b/lib/libX11/man/XLoadFont.man @@ -60,11 +60,11 @@ XLoadFont, XQueryFont, XLoadQueryFont, XFreeFont, XGetFontProperty, XUnloadFont, XCharStruct, XFontProp, XChar2b, XFontStruct \- load or unload fonts and font metric structures .SH SYNTAX .HP -Font XLoadFont\^(\^Display *\fIdisplay\fP\^, char *\fIname\fP\^); +Font XLoadFont\^(\^Display *\fIdisplay\fP\^, _Xconst char *\fIname\fP\^); .HP XFontStruct *XQueryFont\^(\^Display *\fIdisplay\fP\^, XID \fIfont_ID\fP\^); .HP -XFontStruct *XLoadQueryFont\^(\^Display *\fIdisplay\fP\^, char +XFontStruct *XLoadQueryFont\^(\^Display *\fIdisplay\fP\^, _Xconst char *\fIname\fP\^); .HP int XFreeFont\^(\^Display *\fIdisplay\fP\^, XFontStruct *\fIfont_struct\fP\^); diff --git a/lib/libX11/man/XLookupKeysym.man b/lib/libX11/man/XLookupKeysym.man index 2f54a49e6..05204b7dc 100644 --- a/lib/libX11/man/XLookupKeysym.man +++ b/lib/libX11/man/XLookupKeysym.man @@ -59,7 +59,7 @@ int XLookupString(\^XKeyEvent *\fIevent_struct\fP\^, char *\fIkeysym_return\fP\^, XComposeStatus *\fIstatus_in_out\fP\^); .HP int XRebindKeysym(\^Display *\fIdisplay\fP\^, KeySym \fIkeysym\fP\^, KeySym -\fIlist\fP\^[\^]\^, int \fImod_count\fP\^, unsigned char *\fIstring\fP\^, int +\fIlist\fP\^[\^]\^, int \fImod_count\fP\^, _Xconst unsigned char *\fIstring\fP\^, int \fInum_bytes\fP\^); .SH ARGUMENTS .IP \fIbuffer_return\fP 1i diff --git a/lib/libX11/man/XOpenDisplay.man b/lib/libX11/man/XOpenDisplay.man index 68faefbec..c385057b5 100644 --- a/lib/libX11/man/XOpenDisplay.man +++ b/lib/libX11/man/XOpenDisplay.man @@ -50,7 +50,7 @@ XOpenDisplay, XCloseDisplay \- connect or disconnect to X server .SH SYNTAX .HP -Display *XOpenDisplay\^(\^char *\fIdisplay_name\fP\^); +Display *XOpenDisplay\^(\^_Xconst char *\fIdisplay_name\fP\^); .HP int XCloseDisplay\^(Display *\fIdisplay\fP\^); .SH ARGUMENTS diff --git a/lib/libX11/man/XOpenOM.man b/lib/libX11/man/XOpenOM.man index 275589c9e..637b850e9 100644 --- a/lib/libX11/man/XOpenOM.man +++ b/lib/libX11/man/XOpenOM.man @@ -56,9 +56,9 @@ XOM XOpenOM\^(\^Display *\fIdisplay\fP\^, XrmDatabase \fIdb\fP\^, char .HP Status XCloseOM\^(\^XOM \fIom\fP\^); .HP -char *XSetOMValues\^(\^XOM \fIom\fP\^); +char *XSetOMValues\^(\^XOM \fIom\fP, ...\^); .HP -char *XGetOMValues\^(\^XOM \fIom\fP\^); +char *XGetOMValues\^(\^XOM \fIom\fP, ...\^); .HP Display *XDisplayOfOM\^(\^XOM \fIom\fP\^); .HP diff --git a/lib/libX11/man/XParseGeometry.man b/lib/libX11/man/XParseGeometry.man index ed4a9070c..8fc042db1 100644 --- a/lib/libX11/man/XParseGeometry.man +++ b/lib/libX11/man/XParseGeometry.man @@ -50,12 +50,12 @@ XParseGeometry, XWMGeometry \- parse window geometry .SH SYNTAX .HP -int XParseGeometry\^(\^char *\fIparsestring\fP\^, int *\fIx_return\fP\^, int +int XParseGeometry\^(\^_Xconst char *\fIparsestring\fP\^, int *\fIx_return\fP\^, int *\fIy_return\fP\^, unsigned int *\fIwidth_return\fP\^, unsigned int *\fIheight_return\fP\^); .HP -int XWMGeometry\^(\^Display *\fIdisplay\fP\^, int \fIscreen\fP\^, char -*\fIuser_geom\fP\^, char *\fIdef_geom\fP\^, unsigned int \fIbwidth\fP\^, +int XWMGeometry\^(\^Display *\fIdisplay\fP\^, int \fIscreen\fP\^, _Xconst char +*\fIuser_geom\fP\^, _Xconst char *\fIdef_geom\fP\^, unsigned int \fIbwidth\fP\^, XSizeHints *\fIhints\fP\^, int *\fIx_return\fP, int *\fIy_return\fP\^, int *\fIwidth_return\fP\^, int *\fIheight_return\fP\^, int *\fIgravity_return\fP\^); diff --git a/lib/libX11/man/XQueryColor.man b/lib/libX11/man/XQueryColor.man index c25dbc577..b5111e7bc 100644 --- a/lib/libX11/man/XQueryColor.man +++ b/lib/libX11/man/XQueryColor.man @@ -58,11 +58,11 @@ int XQueryColors\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, XColor \fIdefs_in_out\fP[\^]\^, int \fIncolors\fP\^); .HP Status XLookupColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, -char *\fIcolor_name\fP\^, XColor *\fIexact_def_return\fP\^, XColor +_Xconst char *\fIcolor_name\fP\^, XColor *\fIexact_def_return\fP\^, XColor *\fIscreen_def_return\fP\^); .HP Status XParseColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, -char *\fIspec\fP\^, XColor *\fIexact_def_return\fP\^); +_Xconst char *\fIspec\fP\^, XColor *\fIexact_def_return\fP\^); .SH ARGUMENTS .IP \fIcolormap\fP 1i Specifies the colormap. diff --git a/lib/libX11/man/XReadBitmapFile.man b/lib/libX11/man/XReadBitmapFile.man index 4d43ef4fc..520be3521 100644 --- a/lib/libX11/man/XReadBitmapFile.man +++ b/lib/libX11/man/XReadBitmapFile.man @@ -50,16 +50,16 @@ XReadBitmapFile, XReadBitmapFileData, XWriteBitmapFile, XCreatePixmapFromBitmapData, XCreateBitmapFromData \- manipulate bitmaps .SH SYNTAX .HP -int XReadBitmapFile(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, char +int XReadBitmapFile(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, _Xconst char *\fIfilename\fP\^, unsigned int *\fIwidth_return\fP, unsigned int *\fIheight_return\fP\^, Pixmap *\fIbitmap_return\fP\^, int *\fIx_hot_return\fP, int *\fIy_hot_return\fP\^); .HP -int XReadBitmapFileData(\^char *\fIfilename\fP\^, unsigned int +int XReadBitmapFileData(\^_Xconst char *\fIfilename\fP\^, unsigned int *\fIwidth_return\fP, unsigned int *\fIheight_return\fP\^, unsigned char -*\fIdata_return\fP\^, int *\fIx_hot_return\fP, int *\fIy_hot_return\fP\^); +**\fIdata_return\fP\^, int *\fIx_hot_return\fP, int *\fIy_hot_return\fP\^); .HP -int XWriteBitmapFile(\^Display *\fIdisplay\fP\^, char *\fIfilename\fP\^, +int XWriteBitmapFile(\^Display *\fIdisplay\fP\^, _Xconst char *\fIfilename\fP\^, Pixmap \fIbitmap\fP\^, unsigned int \fIwidth\fP, unsigned int \fIheight\fP\^, int \fIx_hot\fP, int \fIy_hot\fP\^); .HP @@ -69,7 +69,7 @@ Pixmap XCreatePixmapFromBitmapData\^(\^Display *\fIdisplay\fP\^, Drawable \fIdepth\fP\^); .HP Pixmap XCreateBitmapFromData(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, -char *\fIdata\fP\^, unsigned int \fIwidth\fP, unsigned int \fIheight\fP\^); +_Xconst char *\fIdata\fP\^, unsigned int \fIwidth\fP, unsigned int \fIheight\fP\^); .SH ARGUMENTS .IP \fIbitmap\fP 1i Specifies the bitmap. diff --git a/lib/libX11/man/XSaveContext.man b/lib/libX11/man/XSaveContext.man index 58782811a..999649274 100644 --- a/lib/libX11/man/XSaveContext.man +++ b/lib/libX11/man/XSaveContext.man @@ -51,7 +51,7 @@ XSaveContext, XFindContext, XDeleteContext, XUniqueContext \- associative look-u .SH SYNTAX .HP int XSaveContext(\^Display *\fIdisplay\fP\^, XID \fIrid\fP\^, XContext -\fIcontext\fP\^, XPointer \fIdata\fP\^); +\fIcontext\fP\^, _Xconst char *\fIdata\fP\^); .HP int XFindContext(\^Display *\fIdisplay\fP\^, XID \fIrid\fP\^, XContext \fIcontext\fP\^, XPointer *\fIdata_return\fP\^); diff --git a/lib/libX11/man/XSetErrorHandler.man b/lib/libX11/man/XSetErrorHandler.man index f04b3b491..2f30420fc 100644 --- a/lib/libX11/man/XSetErrorHandler.man +++ b/lib/libX11/man/XSetErrorHandler.man @@ -47,7 +47,7 @@ .ds xC Inter-Client Communication Conventions Manual .TH XSetErrorHandler __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS" .SH NAME -XSetErrorHandler, XGetErrorText, XDisplayName, XSetIOErrorHandler, XGetErrorDatabaseText \- default error handlers +XSetErrorHandler, XGetErrorText, XDisplayName, XSetIOErrorHandler, XSetIOErrorExitHandler, XGetErrorDatabaseText \- default error handlers .SH SYNTAX .HP int (*XSetErrorHandler\^(\^int (\^*\^\fIhandler\fP\^)\^(Display *, XErrorEvent @@ -56,13 +56,17 @@ int (*XSetErrorHandler\^(\^int (\^*\^\fIhandler\fP\^)\^(Display *, XErrorEvent int XGetErrorText\^(\^Display *\fIdisplay\fP\^, int \fIcode\fP\^, char *\fIbuffer_return\fP\^, int \fIlength\fP\^); .HP -char *XDisplayName\^(\^char *\fIstring\fP\^); +char *XDisplayName\^(\^_Xconst char *\fIstring\fP\^); .HP int (*XSetIOErrorHandler\^(\^int (\^*\^\fIhandler\fP\^)(Display *)\^)\^)\^(\^); .HP -int XGetErrorDatabaseText\^(\^Display *\fIdisplay\fP\^, char *\fIname\fP, char -*\fImessage\fP\^, char *\fIdefault_string\fP\^, char *\fIbuffer_return\fP\^, +void (*XSetIOErrorExitHandler\^(Display +*\fIdisplay\fP\^, void (\^*\^\fIhandler\fP\^)(Display *, void +*)\^, void *\fIuser_data\fP)\^)\^(\^); +.HP +int XGetErrorDatabaseText\^(\^Display *\fIdisplay\fP\^, _Xconst char *\fIname\fP, _Xconst char +*\fImessage\fP\^, _Xconst char *\fIdefault_string\fP\^, char *\fIbuffer_return\fP\^, int \fIlength\fP\^); .SH ARGUMENTS .IP \fIbuffer_return\fP 1i @@ -136,9 +140,11 @@ sets the fatal I/O error handler. Xlib calls the program's supplied error handler if any sort of system call error occurs (for example, the connection to the server was lost). This is assumed to be a fatal condition, -and the called routine should not return. +and the called routine should normally not return. If the I/O error handler does return, -the client process exits. +the client process exits by default, this behavior may be altered with the +.BR XSetIOErrorExitHandler +function. .LP Note that the previous error handler is returned. .LP diff --git a/lib/libX11/man/XSetLineAttributes.man b/lib/libX11/man/XSetLineAttributes.man index 6a0d4a973..3e34711d1 100644 --- a/lib/libX11/man/XSetLineAttributes.man +++ b/lib/libX11/man/XSetLineAttributes.man @@ -55,7 +55,7 @@ int \fIline_width\fP\^, int \fIline_style\fP\^, int \fIcap_style\fP\^, int \fIjoin_style\fP\^); .HP int XSetDashes\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int -\fIdash_offset\fP\^, char \fIdash_list\fP[]\^, int \fIn\fP\^); +\fIdash_offset\fP\^, _Xconst char \fIdash_list\fP[]\^, int \fIn\fP\^); .SH ARGUMENTS .IP \fIcap_style\fP 1i Specifies the line-style and cap-style you want to set for the specified GC. diff --git a/lib/libX11/man/XSetPointerMapping.man b/lib/libX11/man/XSetPointerMapping.man index d52ff3080..8cbdf1d2f 100644 --- a/lib/libX11/man/XSetPointerMapping.man +++ b/lib/libX11/man/XSetPointerMapping.man @@ -50,7 +50,7 @@ XSetPointerMapping, XGetPointerMapping \- manipulate pointer settings .SH SYNTAX .HP -int XSetPointerMapping\^(\^Display *\fIdisplay\fP\^, unsigned char +int XSetPointerMapping\^(\^Display *\fIdisplay\fP\^, _Xconst unsigned char \fImap\fP\^[]\^, int \fInmap\fP\^); .HP int XGetPointerMapping\^(\^Display *\fIdisplay\fP\^, unsigned char diff --git a/lib/libX11/man/XSetState.man b/lib/libX11/man/XSetState.man index e8478a8f5..aee921c28 100644 --- a/lib/libX11/man/XSetState.man +++ b/lib/libX11/man/XSetState.man @@ -51,7 +51,7 @@ XSetState, XSetFunction, XSetPlaneMask, XSetForeground, XSetBackground \- GC con .SH SYNTAX .HP int XSetState\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, unsigned long -\fIforeground\fP\^, unsigned int \fIbackground\fP\^, int \fIfunction\fP\^, +\fIforeground\fP\^, unsigned long \fIbackground\fP\^, int \fIfunction\fP\^, unsigned long \fIplane_mask\fP\^); .HP int XSetFunction\^(\^Display *\fIdisplay\fP\^, GC \fIgc\fP\^, int diff --git a/lib/libX11/man/XSetWMIconName.man b/lib/libX11/man/XSetWMIconName.man index 382b3d1d5..738bc30a7 100644 --- a/lib/libX11/man/XSetWMIconName.man +++ b/lib/libX11/man/XSetWMIconName.man @@ -56,7 +56,7 @@ XTextProperty *\fItext_prop\fP\^); Status XGetWMIconName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, XTextProperty *\fItext_prop_return\fP\^); .HP -int XSetIconName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +int XSetIconName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, _Xconst char *\fIicon_name\fP\^); .HP Status XGetIconName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char diff --git a/lib/libX11/man/XSetWMName.man b/lib/libX11/man/XSetWMName.man index 064fe1596..5e191ce95 100644 --- a/lib/libX11/man/XSetWMName.man +++ b/lib/libX11/man/XSetWMName.man @@ -56,7 +56,7 @@ void XSetWMName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, XTextProperty Status XGetWMName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, XTextProperty *\fItext_prop_return\fP\^); .HP -int XStoreName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char +int XStoreName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, _Xconst char *\fIwindow_name\fP\^); .HP Status XFetchName\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char diff --git a/lib/libX11/man/XSetWMProperties.man b/lib/libX11/man/XSetWMProperties.man index 0587c12ac..840bbff37 100644 --- a/lib/libX11/man/XSetWMProperties.man +++ b/lib/libX11/man/XSetWMProperties.man @@ -56,13 +56,13 @@ XTextProperty *\fIwindow_name\fP\^, XTextProperty *\fIicon_name\fP\^, char **\fIargv\fP\^, int \fIargc\fP\^, XSizeHints *\fInormal_hints\fP\^, XWMHints *\fIwm_hints\fP\^, XClassHint *\fIclass_hints\fP\^); .HP -void XmbSetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char -*\fIwindow_name\fP\^, char *\fIicon_name\fP\^, char *\fIargv\fP\^[], int +void XmbSetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, _Xconst char +*\fIwindow_name\fP\^, _Xconst char *\fIicon_name\fP\^, char *\fIargv\fP\^[], int \fIargc\fP\^, XSizeHints *\fInormal_hints\fP\^, XWMHints *\fIwm_hints\fP\^, XClassHint *\fIclass_hints\fP\^); .HP -void Xutf8SetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, char -*\fIwindow_name\fP\^, char *\fIicon_name\fP\^, char *\fIargv\fP\^[], int +void Xutf8SetWMProperties\^(\^Display *\fIdisplay\fP\^, Window \fIw\fP\^, _Xconst char +*\fIwindow_name\fP\^, _Xconst char *\fIicon_name\fP\^, char *\fIargv\fP\^[], int \fIargc\fP\^, XSizeHints *\fInormal_hints\fP\^, XWMHints *\fIwm_hints\fP\^, XClassHint *\fIclass_hints\fP\^); .SH ARGUMENTS diff --git a/lib/libX11/man/XStoreBytes.man b/lib/libX11/man/XStoreBytes.man index e2dd461f6..dc78170f7 100644 --- a/lib/libX11/man/XStoreBytes.man +++ b/lib/libX11/man/XStoreBytes.man @@ -50,10 +50,10 @@ XStoreBytes, XStoreBuffer, XFetchBytes, XFetchBuffer, XRotateBuffers \- manipulate cut and paste buffers .SH SYNTAX .HP -int XStoreBytes\^(\^Display *\fIdisplay\fP\^, char *\fIbytes\fP\^, int +int XStoreBytes\^(\^Display *\fIdisplay\fP\^, _Xconst char *\fIbytes\fP\^, int \^\fInbytes\fP\^); .HP -int XStoreBuffer\^(\^Display *\fIdisplay\fP\^, char *\fIbytes\fP\^, int +int XStoreBuffer\^(\^Display *\fIdisplay\fP\^, _Xconst char *\fIbytes\fP\^, int \^\fInbytes\fP\^, int \fIbuffer\fP\^); .HP char *XFetchBytes\^(\^Display *\fIdisplay\fP\^, int *\fInbytes_return\fP\^); diff --git a/lib/libX11/man/XStoreColors.man b/lib/libX11/man/XStoreColors.man index cd585ee8e..e27d9ed73 100644 --- a/lib/libX11/man/XStoreColors.man +++ b/lib/libX11/man/XStoreColors.man @@ -57,7 +57,7 @@ int XStoreColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, XColor *\fIcolor\fP\^); .HP int XStoreNamedColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, -char *\^\fIcolor\fP\^, unsigned long \fIpixel\fP\^, int \fIflags\fP\^); +_Xconst char *\^\fIcolor\fP\^, unsigned long \fIpixel\fP\^, int \fIflags\fP\^); .SH ARGUMENTS .IP \fIcolor\fP 1i Specifies the pixel and RGB values or the color name string (for example, red). diff --git a/lib/libX11/man/XStringToKeysym.man b/lib/libX11/man/XStringToKeysym.man index 14bc0d627..86dcda76e 100644 --- a/lib/libX11/man/XStringToKeysym.man +++ b/lib/libX11/man/XStringToKeysym.man @@ -50,7 +50,7 @@ XStringToKeysym, XKeysymToString, XKeycodeToKeysym, XKeysymToKeycode, XConvertCase \- convert keysyms .SH SYNTAX .HP -KeySym XStringToKeysym\^(\^char *\fIstring\fP\^); +KeySym XStringToKeysym\^(\^_Xconst char *\fIstring\fP\^); .HP char *XKeysymToString\^(\^KeySym \fIkeysym\fP\^); .HP diff --git a/lib/libX11/man/XSupportsLocale.man b/lib/libX11/man/XSupportsLocale.man index 348aa09dc..2fe659a69 100644 --- a/lib/libX11/man/XSupportsLocale.man +++ b/lib/libX11/man/XSupportsLocale.man @@ -53,7 +53,7 @@ XSupportsLocale, XSetLocaleModifiers \- determine locale support and configure l .HP Bool XSupportsLocale\^(void); .HP -char *XSetLocaleModifiers\^(\^char *\fImodifier_list\fP\^); +char *XSetLocaleModifiers\^(\^_Xconst char *\fImodifier_list\fP\^); .SH ARGUMENTS .IP \fImodifier_list\fP 1i Specifies the modifiers. diff --git a/lib/libX11/man/XTextExtents.man b/lib/libX11/man/XTextExtents.man index 752fa2c5c..c5109a6e4 100644 --- a/lib/libX11/man/XTextExtents.man +++ b/lib/libX11/man/XTextExtents.man @@ -50,23 +50,23 @@ XTextExtents, XTextExtents16, XQueryTextExtents, XQueryTextExtents16 \- compute or query text extents .SH SYNTAX .HP -int XTextExtents\^(\^XFontStruct *\fIfont_struct\fP\^, char *\fIstring\fP\^, +int XTextExtents\^(\^XFontStruct *\fIfont_struct\fP\^, _Xconst char *\fIstring\fP\^, int \fInchars\fP\^, int *\fIdirection_return\fP\^, int *\fIfont_ascent_return\fP, int *\fIfont_descent_return\fP\^, XCharStruct *\fIoverall_return\fP\^); .HP -int XTextExtents16\^(\^XFontStruct *\fIfont_struct\fP\^, XChar2b +int XTextExtents16\^(\^XFontStruct *\fIfont_struct\fP\^, _Xconst XChar2b *\fIstring\fP\^, int \fInchars\fP\^, int *\fIdirection_return\fP\^, int *\fIfont_ascent_return\fP, int *\fIfont_descent_return\fP\^, XCharStruct *\fIoverall_return\fP\^); .HP -int XQueryTextExtents\^(\^Display *\fIdisplay\fP\^, XID \fIfont_ID\fP\^, char +int XQueryTextExtents\^(\^Display *\fIdisplay\fP\^, XID \fIfont_ID\fP\^, _Xconst char *\fIstring\fP\^, int \fInchars\fP\^, int *\fIdirection_return\fP\^, int *\fIfont_ascent_return\fP, int *\fIfont_descent_return\fP\^, XCharStruct *\fIoverall_return\fP\^); .HP int XQueryTextExtents16\^(\^Display *\fIdisplay\fP\^, XID \fIfont_ID\fP\^, -XChar2b *\fIstring\fP\^, int \fInchars\fP\^, int *\fIdirection_return\fP\^, +_Xconst XChar2b *\fIstring\fP\^, int \fInchars\fP\^, int *\fIdirection_return\fP\^, int *\fIfont_ascent_return\fP, int *\fIfont_descent_return\fP\^, XCharStruct *\fIoverall_return\fP\^); .SH ARGUMENTS diff --git a/lib/libX11/man/XTextWidth.man b/lib/libX11/man/XTextWidth.man index 5985bcbc1..e9aa1ca38 100644 --- a/lib/libX11/man/XTextWidth.man +++ b/lib/libX11/man/XTextWidth.man @@ -50,10 +50,10 @@ XTextWidth, XTextWidth16 \- compute text width .SH SYNTAX .HP -int XTextWidth\^(\^XFontStruct *\fIfont_struct\fP\^, char *\fIstring\fP\^, +int XTextWidth\^(\^XFontStruct *\fIfont_struct\fP\^, _Xconst char *\fIstring\fP\^, int \fIcount\fP\^); .HP -int XTextWidth16\^(\^XFontStruct *\fIfont_struct\fP\^, XChar2b +int XTextWidth16\^(\^XFontStruct *\fIfont_struct\fP\^, _Xconst XChar2b *\fIstring\fP\^, int \fIcount\fP\^); .SH ARGUMENTS .IP \fIcount\fP 1i diff --git a/lib/libX11/man/XcmsAllocColor.man b/lib/libX11/man/XcmsAllocColor.man index c8346e322..9ae80fb88 100644 --- a/lib/libX11/man/XcmsAllocColor.man +++ b/lib/libX11/man/XcmsAllocColor.man @@ -54,7 +54,7 @@ Status XcmsAllocColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, XcmsColor *\fIcolor_in_out\fP\^, XcmsColorFormat \fIresult_format\fP\^); .HP Status XcmsAllocNamedColor\^(\^Display *\fIdisplay\fP\^, Colormap -\fIcolormap\fP\^, char *\fIcolor_string\fP\^, XcmsColor +\fIcolormap\fP\^, _Xconst char *\fIcolor_string\fP\^, XcmsColor *\fIcolor_screen_return\fP\^, XcmsColor *\fIcolor_exact_return\fP\^, XcmsColorFormat \fIresult_format\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i diff --git a/lib/libX11/man/XcmsQueryColor.man b/lib/libX11/man/XcmsQueryColor.man index 6a1099fcb..00117ea38 100644 --- a/lib/libX11/man/XcmsQueryColor.man +++ b/lib/libX11/man/XcmsQueryColor.man @@ -58,7 +58,7 @@ Status XcmsQueryColors\^(\^Display *\fIdisplay\fP\^, Colormap \fIncolors\fP\^, XcmsColorFormat \fIresult_format\fP\^); .HP Status XcmsLookupColor\^(\^Display *\fIdisplay\fP\^, Colormap -\fIcolormap\fP\^, char *\fIcolor_string\fP\^, XcmsColor +\fIcolormap\fP\^, _Xconst char *\fIcolor_string\fP\^, XcmsColor *\fIcolor_exact_return\fP\^, XcmsColor *\fIcolor_screen_return\fP\^, XcmsColorFormat \fIresult_format\fP\^); .SH ARGUMENTS diff --git a/lib/libX11/man/XcmsStoreColor.man b/lib/libX11/man/XcmsStoreColor.man index 39cbaca05..c31646c25 100644 --- a/lib/libX11/man/XcmsStoreColor.man +++ b/lib/libX11/man/XcmsStoreColor.man @@ -53,9 +53,11 @@ XcmsStoreColor, XcmsStoreColors \- set colors Status XcmsStoreColor\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^, XcmsColor *\fIcolor\fP\^); .HP -Status XcmsStoreColors\^(\^Display *\fIdisplay\fP\^, Colormap -\fIcolormap\fP\^, XcmsColor \fIcolors\fP\^[\^]\^, int \fIncolors\fP\^, Bool -\fIcompression_flags_return\fP\^[\^]\^); +Status XcmsStoreColors\^(\^Display *\fIdisplay\fP\^, +Colormap \fIcolormap\fP\^, +XcmsColor *\fIcolors\fP\^, +unsigned \fIncolors\fP\^, +Bool *\fIcompression_flags_return\fP\^); .SH ARGUMENTS .IP \fIdisplay\fP 1i Specifies the connection to the X server. diff --git a/lib/libX11/man/XmbDrawImageString.man b/lib/libX11/man/XmbDrawImageString.man index 406645fdf..8a0b78007 100644 --- a/lib/libX11/man/XmbDrawImageString.man +++ b/lib/libX11/man/XmbDrawImageString.man @@ -52,16 +52,16 @@ XmbDrawImageString, XwcDrawImageString, Xutf8DrawImageString \- draw image text .SH SYNTAX .HP void XmbDrawImageString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, -XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char -*\fIstring\fP\^, int \fInum_bytes\fP\^); +XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^); .HP void XwcDrawImageString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, -wchar_t *\fIstring\fP\^, int \fInum_wchars\fP\^); +_Xconst wchar_t *\fIstring\fP\^, int \fInum_wchars\fP\^); .HP void Xutf8DrawImageString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, -XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char -*\fIstring\fP\^, int \fInum_bytes\fP\^); +XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/lib/libX11/man/XmbDrawString.man b/lib/libX11/man/XmbDrawString.man index da48940dc..74de253b4 100644 --- a/lib/libX11/man/XmbDrawString.man +++ b/lib/libX11/man/XmbDrawString.man @@ -52,16 +52,16 @@ XmbDrawString, XwcDrawString, Xutf8DrawString \- draw text using a single font s .SH SYNTAX .HP void XmbDrawString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, XFontSet -\fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char -*\fIstring\fP\^, int \fInum_bytes\fP\^); +\fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^); .HP void XwcDrawString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, XFontSet -\fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, wchar_t -*\fIstring\fP\^, int \fInum_wchars\fP\^); +\fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, +_Xconst wchar_t *\fIstring\fP\^, int \fInum_wchars\fP\^); .HP void Xutf8DrawString\^(\^Display *\fIdisplay\fP\^, Drawable \fId\fP\^, -XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, char -*\fIstring\fP\^, int \fInum_bytes\fP\^); +XFontSet \fIfont_set\fP\^, GC \fIgc\fP\^, int \fIx\fP\^, int \fIy\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^); .SH ARGUMENTS .IP \fId\fP 1i Specifies the drawable. diff --git a/lib/libX11/man/XmbTextEscapement.man b/lib/libX11/man/XmbTextEscapement.man index 5391f68b4..e91263777 100644 --- a/lib/libX11/man/XmbTextEscapement.man +++ b/lib/libX11/man/XmbTextEscapement.man @@ -51,13 +51,16 @@ XmbTextEscapement, XwcTextEscapement, Xutf8TextEscapement \- obtain the escapement of text .SH SYNTAX .HP -int XmbTextEscapement\^(\^XFontSet \fIfont_set\fP\^, char *\fIstring\fP\^, int +int XmbTextEscapement\^(\^XFontSet \fIfont_set\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^); .HP -int XwcTextEscapement\^(\^XFontSet \fIfont_set\fP\^, wchar_t *\fIstring\fP\^, +int XwcTextEscapement\^(\^XFontSet \fIfont_set\fP\^, +_Xconst wchar_t *\fIstring\fP\^, int \fInum_wchars\fP\^); .HP -int Xutf8TextEscapement\^(\^XFontSet \fIfont_set\fP\^, char *\fIstring\fP\^, +int Xutf8TextEscapement\^(\^XFontSet \fIfont_set\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^); .SH ARGUMENTS .IP \fIfont_set\fP 1i diff --git a/lib/libX11/man/XmbTextExtents.man b/lib/libX11/man/XmbTextExtents.man index 01ae8e581..aaa8643ef 100644 --- a/lib/libX11/man/XmbTextExtents.man +++ b/lib/libX11/man/XmbTextExtents.man @@ -51,15 +51,18 @@ XmbTextExtents, XwcTextExtents, Xutf8TextExtents \- compute text extents .SH SYNTAX .HP -int XmbTextExtents\^(\^XFontSet \fIfont_set\fP\^, char *\fIstring\fP\^, int +int XmbTextExtents\^(\^XFontSet \fIfont_set\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle *\fIoverall_logical_return\fP\^); .HP -int XwcTextExtents\^(\^XFontSet \fIfont_set\fP\^, wchar_t *\fIstring\fP\^, int +int XwcTextExtents\^(\^XFontSet \fIfont_set\fP\^, +_Xconst wchar_t *\fIstring\fP\^, int \fInum_wchars\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle *\fIoverall_logical_return\fP\^); .HP -int Xutf8TextExtents\^(\^XFontSet \fIfont_set\fP\^, char *\fIstring\fP\^, int +int Xutf8TextExtents\^(\^XFontSet \fIfont_set\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle *\fIoverall_logical_return\fP\^); .SH ARGUMENTS diff --git a/lib/libX11/man/XmbTextListToTextProperty.man b/lib/libX11/man/XmbTextListToTextProperty.man index e97636597..fabcc00d3 100644 --- a/lib/libX11/man/XmbTextListToTextProperty.man +++ b/lib/libX11/man/XmbTextListToTextProperty.man @@ -65,14 +65,17 @@ int Xutf8TextListToTextProperty\^(\^Display *\fIdisplay\fP\^, char **\fIlist\fP\^, int \fIcount\fP\^, XICCEncodingStyle \fIstyle\fP\^, XTextProperty *\fItext_prop_return\fP\^); .HP -int XmbTextPropertyToTextList\^(\^Display *\fIdisplay\fP\^, XTextProperty +int XmbTextPropertyToTextList\^(\^Display *\fIdisplay\fP\^, +_Xconst XTextProperty *\fItext_prop\fP\^, char ***\fIlist_return\fP\^, int *\fIcount_return\fP\^); .HP -int XwcTextPropertyToTextList\^(\^Display *\fIdisplay\fP\^, XTextProperty +int XwcTextPropertyToTextList\^(\^Display *\fIdisplay\fP\^, +_Xconst XTextProperty *\fItext_prop\fP\^, wchar_t ***\fIlist_return\fP\^, int *\fIcount_return\fP\^); .HP -int Xutf8TextPropertyToTextList\^(\^Display *\fIdisplay\fP\^, XTextProperty +int Xutf8TextPropertyToTextList\^(\^Display *\fIdisplay\fP\^, +_Xconst XTextProperty *\fItext_prop\fP\^, char ***\fIlist_return\fP\^, int *\fIcount_return\fP\^); .HP void XwcFreeStringList\^(\^wchar_t **\fIlist\fP\^); diff --git a/lib/libX11/man/XmbTextPerCharExtents.man b/lib/libX11/man/XmbTextPerCharExtents.man index eaa771c1a..f4ecb52a7 100644 --- a/lib/libX11/man/XmbTextPerCharExtents.man +++ b/lib/libX11/man/XmbTextPerCharExtents.man @@ -51,19 +51,22 @@ XmbTextPerCharExtents, XwcTextPerCharExtents, Xutf8TextPerCharExtents \- obtain per-character information for a text string .SH SYNTAX .HP -Status XmbTextPerCharExtents\^(\^XFontSet \fIfont_set\fP\^, char +Status XmbTextPerCharExtents\^(\^XFontSet \fIfont_set\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^, XRectangle *\fIink_array_return\fP\^, XRectangle *\fIlogical_array_return\fP\^, int \fIarray_size\fP\^, int *\fInum_chars_return\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle *\fIoverall_logical_return\fP\^); .HP -Status XwcTextPerCharExtents\^(\^XFontSet \fIfont_set\fP\^, wchar_t +Status XwcTextPerCharExtents\^(\^XFontSet \fIfont_set\fP\^, +_Xconst wchar_t *\fIstring\fP\^, int \fInum_wchars\fP\^, XRectangle *\fIink_array_return\fP\^, XRectangle *\fIlogical_array_return\fP, int \fIarray_size\fP\^, int *\fInum_chars_return\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle *\fIoverall_logical_return\fP\^); .HP -Status Xutf8TextPerCharExtents\^(\^XFontSet \fIfont_set\fP\^, char +Status Xutf8TextPerCharExtents\^(\^XFontSet \fIfont_set\fP\^, +_Xconst char *\fIstring\fP\^, int \fInum_bytes\fP\^, XRectangle *\fIink_array_return\fP\^, XRectangle *\fIlogical_array_return\fP\^, int \fIarray_size\fP\^, int *\fInum_chars_return\fP\^, XRectangle *\fIoverall_ink_return\fP\^, XRectangle diff --git a/lib/libX11/man/XrmGetFileDatabase.man b/lib/libX11/man/XrmGetFileDatabase.man index 5cbad8995..dc26ac77b 100644 --- a/lib/libX11/man/XrmGetFileDatabase.man +++ b/lib/libX11/man/XrmGetFileDatabase.man @@ -64,12 +64,12 @@ XrmGetFileDatabase, XrmPutFileDatabase, XrmGetStringDatabase, XrmLocaleOfDatabas .HP XrmDatabase XrmGetFileDatabase\^(\^char *\fIfilename\fP\^); .HP -void XrmPutFileDatabase\^(\^XrmDatabase \fIdatabase\fP\^, char -*\fIstored_db\fP\^); +void XrmPutFileDatabase\^(\^XrmDatabase \fIdatabase\fP\^, +_Xconst char *\fIstored_db\fP\^); .HP -XrmDatabase XrmGetStringDatabase\^(\^char *\fIdata\fP\^); +XrmDatabase XrmGetStringDatabase\^(\^_Xconst char *\fIdata\fP\^); .HP -char *XrmLocaleOfDatabase\^(\^XrmDatabase \fIdatabase\fP\^); +const char *XrmLocaleOfDatabase\^(\^XrmDatabase \fIdatabase\fP\^); .HP XrmDatabase XrmGetDatabase\^(\^Display *\fIdisplay\fP\^); .HP diff --git a/lib/libX11/man/XrmInitialize.man b/lib/libX11/man/XrmInitialize.man index 683ae650a..d674cfef0 100644 --- a/lib/libX11/man/XrmInitialize.man +++ b/lib/libX11/man/XrmInitialize.man @@ -55,7 +55,8 @@ XrmInitialize, XrmParseCommand, XrmValue, XrmOptionKind, XrmOptionDescRec \- ini void XrmInitialize\^(void\^); .HP void XrmParseCommand\^(\^XrmDatabase *\fIdatabase\fP\^, XrmOptionDescList -\fItable\fP\^, int \fItable_count\fP\^, char *\fIname\fP\^, int +\fItable\fP\^, int \fItable_count\fP\^, +_Xconst char *\fIname\fP\^, int *\fIargc_in_out\fP\^, char **\fIargv_in_out\fP\^); .SH ARGUMENTS .IP \fIargc_in_out\fP 1i diff --git a/lib/libX11/man/XrmMergeDatabases.man b/lib/libX11/man/XrmMergeDatabases.man index 2a6ada2f0..db7442ff1 100644 --- a/lib/libX11/man/XrmMergeDatabases.man +++ b/lib/libX11/man/XrmMergeDatabases.man @@ -58,7 +58,7 @@ void XrmMergeDatabases(\^XrmDatabase \fIsource_db\fP, XrmDatabase void XrmCombineDatabase(\^XrmDatabase \fIsource_db\fP, XrmDatabase *\fItarget_db\fP, Bool \fIoverride\fP\^); .HP -Status XrmCombineFileDatabase(\^char *\fIfilename\fP, XrmDatabase +Status XrmCombineFileDatabase(\^_Xconst char *\fIfilename\fP, XrmDatabase *\fItarget_db\fP\^, Bool \fIoverride\fP); .SH ARGUMENTS .IP \fIsource_db\fP 1i diff --git a/lib/libX11/man/XrmPutResource.man b/lib/libX11/man/XrmPutResource.man index 86258f58a..caba2316c 100644 --- a/lib/libX11/man/XrmPutResource.man +++ b/lib/libX11/man/XrmPutResource.man @@ -59,13 +59,13 @@ void XrmQPutResource\^(\^XrmDatabase *\fIdatabase\fP\^, XrmBindingList \fIbindings\fP\^, XrmQuarkList \fIquarks\fP\^, XrmRepresentation \fItype\fP\^, XrmValue *\fIvalue\fP\^); .HP -void XrmPutStringResource\^(\^XrmDatabase *\fIdatabase\fP\^, char -*\fIspecifier\fP\^, char *\fIvalue\fP\^); +void XrmPutStringResource\^(\^XrmDatabase *\fIdatabase\fP\^, _Xconst char +*\fIspecifier\fP\^, _Xconst char *\fIvalue\fP\^); .HP void XrmQPutStringResource\^(\^XrmDatabase *\fIdatabase\fP\^, XrmBindingList -\fIbindings\fP\^, XrmQuarkList \fIquarks\fP\^, char *\fIvalue\fP\^); +\fIbindings\fP\^, XrmQuarkList \fIquarks\fP\^, _Xconst char *\fIvalue\fP\^); .HP -void XrmPutLineResource\^(\^XrmDatabase *\fIdatabase\fP\^, char +void XrmPutLineResource\^(\^XrmDatabase *\fIdatabase\fP\^, _Xconst char *\fIline\fP\^); .SH ARGUMENTS .IP \fIbindings\fP 1i diff --git a/lib/libX11/man/XrmUniqueQuark.man b/lib/libX11/man/XrmUniqueQuark.man index 544ffced6..0be61ea36 100644 --- a/lib/libX11/man/XrmUniqueQuark.man +++ b/lib/libX11/man/XrmUniqueQuark.man @@ -62,7 +62,7 @@ XrmQuark XrmUniqueQuark\^(void); .HP int XrmQuark XrmStringToQuark\^(\^char *\fIstring\fP\^); .HP -XrmQuark XrmPermStringToQuark\^(\^char *\fIstring\fP\^); +XrmQuark XrmPermStringToQuark\^(\^_Xconst char *\fIstring\fP\^); .LP \&#define XrmStringToName(string) XrmStringToQuark(string) .br @@ -72,7 +72,7 @@ XrmQuark XrmPermStringToQuark\^(\^char *\fIstring\fP\^); .HP XrmQuark XrmStringToQuark\^(\^char *\fIstring\fP\^); .HP -XrmQuark XrmPermStringToQuark\^(\^char *\fIstring\fP\^); +XrmQuark XrmPermStringToQuark\^(\^_Xconst char *\fIstring\fP\^); .LP \&#define XrmNameToString(name) XrmQuarkToString(name) .br @@ -90,7 +90,7 @@ char *XrmQuarkToString\^(\^XrmQuark \fIquark\fP\^); void XrmStringToQuarkList\^(\^char *\fIstring\fP\^, XrmQuarkList \fIquarks_return\fP\^); .HP -XrmStringToBindingQuarkList\^(\^char *\fIstring\fP\^, XrmBindingList +void XrmStringToBindingQuarkList\^(\^_Xconst char *\fIstring\fP\^, XrmBindingList \fIbindings_return\fP\^, XrmQuarkList \fIquarks_return\fP\^); .SH ARGUMENTS .IP \fIbindings_return\fP 1i diff --git a/lib/libX11/man/xkb/Makefile.in b/lib/libX11/man/xkb/Makefile.in index 67547df82..54bc6eb5a 100644 --- a/lib/libX11/man/xkb/Makefile.in +++ b/lib/libX11/man/xkb/Makefile.in @@ -54,9 +54,10 @@ subdir = man/xkb DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -286,6 +287,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/man/xkb/XkbAddGeomOverlayRow.man b/lib/libX11/man/xkb/XkbAddGeomOverlayRow.man index 499224e75..6970faf90 100644 --- a/lib/libX11/man/xkb/XkbAddGeomOverlayRow.man +++ b/lib/libX11/man/xkb/XkbAddGeomOverlayRow.man @@ -36,7 +36,7 @@ XkbAddGeomOverlayRow \- Add a row to an existing overlay overlay to be updated .TP .I \- row_under -row to be overlayed in the section overlay overlays +row to be overlaid in the section overlay overlays .TP .I \- sz_keys number of keys to reserve in the row diff --git a/lib/libX11/man/xkb/XkbGetAccessXTimeout.man b/lib/libX11/man/xkb/XkbGetAccessXTimeout.man index 9eb9fd4fa..7378599af 100644 --- a/lib/libX11/man/xkb/XkbGetAccessXTimeout.man +++ b/lib/libX11/man/xkb/XkbGetAccessXTimeout.man @@ -21,7 +21,7 @@ .\" .TH XkbGetAccessXTimeout __libmansuffix__ __xorgversion__ "XKB FUNCTIONS" .SH NAME -XkbGetAccessXTimeout \- Queries the current AccessXTimeout options for a +XkbGetAccessXTimeout \- Queries the current AccessXTimeout options for a keyboard device .SH SYNOPSIS .HP @@ -41,7 +41,7 @@ keyboard device unsigned short .TP .I \- device_spec -device to query, or XkbUseCoreKbd +device to query, or XkbUseCoreKbd .TP .I \- timeout_rtrn delay until AccessXTimeout, seconds @@ -59,51 +59,51 @@ backfilled with ax_options to modify backfilled with values for ax_options .SH DESCRIPTION .LP -In environments where computers are shared, features such as SlowKeys present a -problem: if -SlowKeys is on, the keyboard can appear to be unresponsive because keys are not -accepted -until they are held for a certain period of time. To help solve this problem, -Xkb provides -an AccessXTimeout control to automatically change the enabled/disabled state of -any boolean -controls and to change the value of the AccessXKeys and AccessXFeedback control -attributes +In environments where computers are shared, features such as SlowKeys present a +problem: if +SlowKeys is on, the keyboard can appear to be unresponsive because keys are not +accepted +until they are held for a certain period of time. To help solve this problem, +Xkb provides +an AccessXTimeout control to automatically change the enabled/disabled state of +any boolean +controls and to change the value of the AccessXKeys and AccessXFeedback control +attributes if the keyboard is idle for a specified period of time. -When a timeout as specified by AccessXTimeout occurs and a control is -consequently modified, +When a timeout as specified by AccessXTimeout occurs and a control is +consequently modified, Xkb generates an XkbControlsNotify event. -.I XkbGetAccessXTimeout -sends a request to the X server to obtain the current values for the -AccessXTimeout attributes, waits for a reply, and backfills the values into the -appropriate arguments. The parameters -.I options_mask_rtrn -and -.I options_values_rtrn -are backfilled with the options to modify and the values for -.I ax_options, +.I XkbGetAccessXTimeout +sends a request to the X server to obtain the current values for the +AccessXTimeout attributes, waits for a reply, and backfills the values into the +appropriate arguments. The parameters +.I options_mask_rtrn +and +.I options_values_rtrn +are backfilled with the options to modify and the values for +.I ax_options, which is a field in the XkbControlsRec structure. -.I XkbGetAccessXTimeout -returns True if successful; if a compatible version of the Xkb extension is not -available in the server, -.I XkbGetAccessXTimeout +.I XkbGetAccessXTimeout +returns True if successful; if a compatible version of the Xkb extension is not +available in the server, +.I XkbGetAccessXTimeout returns False. .SH "RETURN VALUES" .TP 15 True -The -.I XkbGetAccessXTimeout -returns True when it successfully sends a request to the X server to obtain the -current values for the AccessXTimeout attributes, waits for a reply, and +The +.I XkbGetAccessXTimeout +returns True when it successfully sends a request to the X server to obtain the +current values for the AccessXTimeout attributes, waits for a reply, and backfills the values into the appropriate arguments. .TP 15 False -The -.I XkbGetAccessXTimeout -funtion returns False if a compatible version of the Xkb extension is not -available in the +The +.I XkbGetAccessXTimeout +function returns False if a compatible version of the Xkb extension is not +available in the server. .SH STRUCTURES .LP @@ -112,7 +112,7 @@ The XkbControlsRec structure is defined as follows: \&#define XkbMaxLegalKeyCode 255 \&#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8) - + typedef struct { unsigned char mk_dflt_btn; /\(** default button for keyboard driven mouse */ unsigned char num_groups; /\(** number of keyboard groups */ diff --git a/lib/libX11/man/xkb/XkbInitCanonicalKeyTypes.man b/lib/libX11/man/xkb/XkbInitCanonicalKeyTypes.man index 6925becd8..45dde7bcc 100644 --- a/lib/libX11/man/xkb/XkbInitCanonicalKeyTypes.man +++ b/lib/libX11/man/xkb/XkbInitCanonicalKeyTypes.man @@ -22,7 +22,7 @@ .\" .TH XkbInitCanonicalKeyTypes __libmansuffix__ __xorgversion__ "XKB FUNCTIONS" .SH NAME -XkbInitCanonicalKeyTypes \- Set the definitions of the canonical key types in a +XkbInitCanonicalKeyTypes \- Set the definitions of the canonical key types in a client map to their default values .SH SYNOPSIS .HP @@ -44,39 +44,39 @@ mask of types to initialize index of NumLock virtual modifier .SH DESCRIPTION .LP -.I XkbInitCanonicalKeyTypes -initializes the first XkbNumRequiredTypes key types of the keyboard specified by -the -.I xkb -parameter to their default values. The -.I which -parameter specifies what canonical key types to initialize and is a bitwise -inclusive OR of the following masks: XkbOneLevelMask, XkbTwoLevelMask, -XkbAlphabeticMask, and XkbKeypadMask. Only those canonical types specified by -the -.I which +.I XkbInitCanonicalKeyTypes +initializes the first XkbNumRequiredTypes key types of the keyboard specified by +the +.I xkb +parameter to their default values. The +.I which +parameter specifies what canonical key types to initialize and is a bitwise +inclusive OR of the following masks: XkbOneLevelMask, XkbTwoLevelMask, +XkbAlphabeticMask, and XkbKeypadMask. Only those canonical types specified by +the +.I which mask are initialized. -If XkbKeypadMask is set in the -.I which -parameter, -.I XkbInitCanonicalKeyTypes -looks up the NumLock named virtual modifier to determine which virtual modifier -to use when initializing the KEYPAD key type. If the NumLock virtual modifier -does not exist, -.I XkbInitCanonicalKeyTypes +If XkbKeypadMask is set in the +.I which +parameter, +.I XkbInitCanonicalKeyTypes +looks up the NumLock named virtual modifier to determine which virtual modifier +to use when initializing the KEYPAD key type. If the NumLock virtual modifier +does not exist, +.I XkbInitCanonicalKeyTypes creates it. -.I XkbInitCanonicalKeyTypes -normally returns Success. It returns BadAccess if the Xkb extension has not been -properly initialized, and BadAccess if the +.I XkbInitCanonicalKeyTypes +normally returns Success. It returns BadAccess if the Xkb extension has not been +properly initialized, and BadAccess if the xkb parameter is not valid. .SH "RETURN VALUES" .TP 15 Success -The -.I XkbInitCanonicalKeyTypes -funtion return Success if the Xkb extension has been properly initialized and +The +.I XkbInitCanonicalKeyTypes +function return Success if the Xkb extension has been properly initialized and the xkb parameter is valid. .SH DIAGNOSTICS .TP 15 diff --git a/lib/libX11/man/xkb/XkbSelectEvents.man b/lib/libX11/man/xkb/XkbSelectEvents.man index 27ff98b83..09999b923 100644 --- a/lib/libX11/man/xkb/XkbSelectEvents.man +++ b/lib/libX11/man/xkb/XkbSelectEvents.man @@ -22,8 +22,8 @@ .\" .TH XkbSelectEvents __libmansuffix__ __xorgversion__ "XKB FUNCTIONS" .SH NAME -XkbSelectEvents \- Selects and / or deselects for delivery of one or more Xkb -events and has them delivered under all conditions +XkbSelectEvents \- Selects and / or deselects for delivery of one or more Xkb +events and has them delivered under all conditions .SH SYNOPSIS .HP .B Bool XkbSelectEvents @@ -36,7 +36,7 @@ events and has them delivered under all conditions .SH ARGUMENTS .TP .I display -connection to the X server +connection to the X server .TP .I device_spec device ID, or XkbUseCoreKbd @@ -48,68 +48,68 @@ determines events to be selected / deselected 1=>select, 0->deselect; for events in bits_to_change .SH DESCRIPTION .LP -Xkb events are selected using an event mask, much the same as normal core X -events are selected. However, unlike selecting core X events, where you must -specify the selection status (on or off) for all possible event types whenever -you wish to change the selection criteria for any one event, Xkb allows you to -restrict the specification to only the event types you wish to change. This -means that you do not need to remember the event selection values for all +Xkb events are selected using an event mask, much the same as normal core X +events are selected. However, unlike selecting core X events, where you must +specify the selection status (on or off) for all possible event types whenever +you wish to change the selection criteria for any one event, Xkb allows you to +restrict the specification to only the event types you wish to change. This +means that you do not need to remember the event selection values for all possible types each time you want to change one of them. -Many Xkb event types are generated under several different circumstances. When -selecting to receive an Xkb event, you may specify either that you want it -delivered under all circumstances, or that you want it delivered only for a -subset of the possible circumstances. +Many Xkb event types are generated under several different circumstances. When +selecting to receive an Xkb event, you may specify either that you want it +delivered under all circumstances, or that you want it delivered only for a +subset of the possible circumstances. -You can also deselect an event type that was previously selected for, using the +You can also deselect an event type that was previously selected for, using the same granularity. -Xkb provides two functions to select and deselect delivery of Xkb events. -.I XkbSelectEvents -allows you to select or deselect delivery of more than one Xkb -event type at once. Events selected using -.I XkbSelectEvents -are delivered to your program under all circumstances that generate the events. -To restrict delivery of an event to a subset of the conditions under which it -occurs, use -.I XkbSelectEventDetails. XkbSelectEventDetails -only allows you to change the selection conditions for a single event at a time, -but it provides a means of fine-tuning the conditions under which the event is +Xkb provides two functions to select and deselect delivery of Xkb events. +.I XkbSelectEvents +allows you to select or deselect delivery of more than one Xkb +event type at once. Events selected using +.I XkbSelectEvents +are delivered to your program under all circumstances that generate the events. +To restrict delivery of an event to a subset of the conditions under which it +occurs, use +.I XkbSelectEventDetails. XkbSelectEventDetails +only allows you to change the selection conditions for a single event at a time, +but it provides a means of fine-tuning the conditions under which the event is delivered. -This request changes the Xkb event selection mask for the keyboard specified by +This request changes the Xkb event selection mask for the keyboard specified by .I device_spec. Each Xkb event that can be selected is represented by a bit in the -.I bits_to_change -and -.I values_for_bits -masks. Only the event selection bits specified by the -.I bits_to_change -parameter are affected; any unspecified bits are left unchanged. To turn on -event selection for an event, set the bit for the event in the -.I bits_to_change -parameter and set the corresponding bit in the -.I values_for_bits -parameter. To turn off event selection for an event, set the bit for the event -in the -.I bits_to_change -parameter and do not set the corresponding bit in the -.I values_for_bits -parameter. The valid values for both of these parameters are an inclusive -bitwise OR of the masks shown in Table 1. There is no interface to return your -client's current event selection mask. Clients cannot set other clients' event +.I bits_to_change +and +.I values_for_bits +masks. Only the event selection bits specified by the +.I bits_to_change +parameter are affected; any unspecified bits are left unchanged. To turn on +event selection for an event, set the bit for the event in the +.I bits_to_change +parameter and set the corresponding bit in the +.I values_for_bits +parameter. To turn off event selection for an event, set the bit for the event +in the +.I bits_to_change +parameter and do not set the corresponding bit in the +.I values_for_bits +parameter. The valid values for both of these parameters are an inclusive +bitwise OR of the masks shown in Table 1. There is no interface to return your +client's current event selection mask. Clients cannot set other clients' event selection masks. -The X server reports the events defined by Xkb to your client application only -if you have requested them via a call to -.I XkbSelectEvents -or -.I XkbSelectEventDetails. +The X server reports the events defined by Xkb to your client application only +if you have requested them via a call to +.I XkbSelectEvents +or +.I XkbSelectEventDetails. Specify the event types in which you are interested in a mask. -Table 1 lists the event mask constants that can be specified with the -.I XkbSelectEvents +Table 1 lists the event mask constants that can be specified with the +.I XkbSelectEvents request and the circumstances in which the mask should be specified. .TS @@ -120,51 +120,51 @@ Table 1 XkbSelectEvents Mask Constants _ Event Mask Value Notification Wanted _ -XkbNewKeyboardNotifyMask (1L<<0) Keyboard geometry change -XkbMapNotifyMask (1L<<1) Keyboard mapping change -XkbStateNotifyMask (1L<<2) Keyboard state change -XkbControlsNotifyMask (1L<<3) Keyboard control change -XkbIndicatorStateNotifyMask (1L<<4) Keyboard indicator state change -XkbIndicatorMapNotifyMask (1L<<5) Keyboard indicator map change -XkbNamesNotifyMask (1L<<6) Keyboard name change -XkbCompatMapNotifyMask (1L<<7) Keyboard compat map change -XkbBellNotifyMask (1L<<8) Bell -XkbActionMessageMask (1L<<9) Action message -XkbAccessXNotifyMask (1L<<10) AccessX features -XkbExtensionDeviceNotifyMask (1L<<11) Extension device +XkbNewKeyboardNotifyMask (1L<<0) Keyboard geometry change +XkbMapNotifyMask (1L<<1) Keyboard mapping change +XkbStateNotifyMask (1L<<2) Keyboard state change +XkbControlsNotifyMask (1L<<3) Keyboard control change +XkbIndicatorStateNotifyMask (1L<<4) Keyboard indicator state change +XkbIndicatorMapNotifyMask (1L<<5) Keyboard indicator map change +XkbNamesNotifyMask (1L<<6) Keyboard name change +XkbCompatMapNotifyMask (1L<<7) Keyboard compat map change +XkbBellNotifyMask (1L<<8) Bell +XkbActionMessageMask (1L<<9) Action message +XkbAccessXNotifyMask (1L<<10) AccessX features +XkbExtensionDeviceNotifyMask (1L<<11) Extension device XkbAllEventsMask (0xFFF) All Xkb events .TE - -If a bit is not set in the -.I bits_to_change -parameter, but the corresponding bit is set in the -.I values_for_bits -parameter, a BadMatch protocol error results. If an undefined bit is set in -either the -.I bits_to_change -or the -.I values_for_bits + +If a bit is not set in the +.I bits_to_change +parameter, but the corresponding bit is set in the +.I values_for_bits +parameter, a BadMatch protocol error results. If an undefined bit is set in +either the +.I bits_to_change +or the +.I values_for_bits parameter, a BadValue protocol error results. -All event selection bits are initially zero for clients using the Xkb extension. -Once you set some bits, they remain set for your client until you clear them via -another call to -.I XkbSelectEvents. +All event selection bits are initially zero for clients using the Xkb extension. +Once you set some bits, they remain set for your client until you clear them via +another call to +.I XkbSelectEvents. -.I XkbSelectEvents -returns False if the Xkb extension has not been initilialized and True +.I XkbSelectEvents +returns False if the Xkb extension has not been initialized and True otherwise. .SH "RETURN VALUES" .TP 15 True -The -.I XkbSelectEvents -function returns True if the Xkb extension has been initilialized. +The +.I XkbSelectEvents +function returns True if the Xkb extension has been initialized. .TP 15 False -The -.I XkbSelectEvents -function returns False if the Xkb extension has not been initilialized. +The +.I XkbSelectEvents +function returns False if the Xkb extension has not been initialized. .SH "SEE ALSO" .BR XkbSelectEventDetails (__libmansuffix__), .BR XkbUseCoreKbd (__libmansuffix__) diff --git a/lib/libX11/modules/Makefile.in b/lib/libX11/modules/Makefile.in index 3bc1c0c99..cd0e867b2 100644 --- a/lib/libX11/modules/Makefile.in +++ b/lib/libX11/modules/Makefile.in @@ -53,9 +53,10 @@ subdir = modules DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -296,6 +297,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/modules/im/Makefile.in b/lib/libX11/modules/im/Makefile.in index 8a8ce8016..e423b9f2e 100644 --- a/lib/libX11/modules/im/Makefile.in +++ b/lib/libX11/modules/im/Makefile.in @@ -53,9 +53,10 @@ subdir = modules/im DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -296,6 +297,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/modules/im/ximcp/Makefile.in b/lib/libX11/modules/im/ximcp/Makefile.in index d123dbd78..098ebc17f 100644 --- a/lib/libX11/modules/im/ximcp/Makefile.in +++ b/lib/libX11/modules/im/ximcp/Makefile.in @@ -55,9 +55,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -339,6 +340,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/modules/im/ximcp/imCallbk.c b/lib/libX11/modules/im/ximcp/imCallbk.c index ead0806c6..359d9b8ca 100644 --- a/lib/libX11/modules/im/ximcp/imCallbk.c +++ b/lib/libX11/modules/im/ximcp/imCallbk.c @@ -265,7 +265,7 @@ _XimGeometryCallback(Xim im, { XICCallback* cb = &ic->core.geometry_callback; - /* invoke the callack + /* invoke the callback */ if (cb && cb->callback) { (*cb->callback)((XIC)ic, cb->client_data, (XPointer)NULL); @@ -728,7 +728,7 @@ _XimPreeditStateNotifyCallback( Xim im, Xic ic, char* proto, int len ) { XICCallback *cb = &ic->core.preedit_attr.state_notify_callback; - /* invoke the callack + /* invoke the callback */ if( cb && cb->callback ) { XIMPreeditStateNotifyCallbackStruct cbrec; diff --git a/lib/libX11/modules/im/ximcp/imDefIm.c b/lib/libX11/modules/im/ximcp/imDefIm.c index d0329b540..ccdf14c12 100644 --- a/lib/libX11/modules/im/ximcp/imDefIm.c +++ b/lib/libX11/modules/im/ximcp/imDefIm.c @@ -874,7 +874,7 @@ _XimOpen( _XimSetIMMode(im->private.proto.im_inner_resources, im->private.proto.im_num_inner_resources); - /* Transport Callbak */ + /* Transport Callback */ _XimRegProtoIntrCallback(im, XIM_SET_EVENT_MASK, 0, _XimSetEventMaskCallback, (XPointer)im); _XimRegProtoIntrCallback(im, XIM_FORWARD_EVENT, 0, @@ -1565,10 +1565,10 @@ _XimSetEncodingByName( *buf = (char *)ret; ret[0] = (BYTE)encoding_len; - (void)strncpy((char *)&ret[1], encoding, encoding_len); + memcpy(&ret[1], encoding, encoding_len); ret += (encoding_len + sizeof(BYTE)); ret[0] = (BYTE)compound_len; - (void)strncpy((char *)&ret[1], "COMPOUND_TEXT", compound_len); + memcpy(&ret[1], "COMPOUND_TEXT", compound_len); return True; } diff --git a/lib/libX11/modules/im/ximcp/imInsClbk.c b/lib/libX11/modules/im/ximcp/imInsClbk.c index 961aabaaa..95b379cba 100644 --- a/lib/libX11/modules/im/ximcp/imInsClbk.c +++ b/lib/libX11/modules/im/ximcp/imInsClbk.c @@ -162,6 +162,7 @@ _XimRegisterIMInstantiateCallback( { XimInstCallback icb, tmp; XIM xim; + char *modifiers = NULL; Window root; XWindowAttributes attr; @@ -171,11 +172,18 @@ _XimRegisterIMInstantiateCallback( icb = Xmalloc(sizeof(XimInstCallbackRec)); if( !icb ) return( False ); + if (lcd->core->modifiers) { + modifiers = strdup(lcd->core->modifiers); + if (!modifiers) { + Xfree(icb); + return( False ); + } + } icb->call = icb->destroy = False; icb->display = display; icb->lcd = lcd; MakeLocale( lcd, icb->name ); - icb->modifiers = lcd->core->modifiers; /* XXXXX */ + icb->modifiers = modifiers; icb->rdb = rdb; icb->res_name = res_name; icb->res_class = res_class; @@ -258,6 +266,7 @@ _XimUnRegisterIMInstantiateCallback( else picb->next = icb->next; _XCloseLC( icb->lcd ); + XFree( icb->modifiers ); XFree( icb ); } return( True ); diff --git a/lib/libX11/modules/im/ximcp/imLcFlt.c b/lib/libX11/modules/im/ximcp/imLcFlt.c index 4dee0461c..c9e940cc5 100644 --- a/lib/libX11/modules/im/ximcp/imLcFlt.c +++ b/lib/libX11/modules/im/ximcp/imLcFlt.c @@ -47,7 +47,8 @@ _XimLocalFilter(Display *d, Window w, XEvent *ev, XPointer client_data) unsigned currstate; DefTree *b = ic->private.local.base.tree; DTIndex t; - Bool braille = False, anymodifier = False; + Bool anymodifier = False; + unsigned char braillePattern = 0; if(ev->xkey.keycode == 0) return (False); @@ -67,10 +68,10 @@ _XimLocalFilter(Display *d, Window w, XEvent *ev, XPointer client_data) } ic->private.local.brl_pressed &= ~(1<<(keysym-XK_braille_dot_1)); if(!ic->private.local.brl_pressed && ic->private.local.brl_committing) { - /* Commited a braille pattern, let it go through compose tree */ + /* Committed a braille pattern, let it go through compose tree */ keysym = XK_braille_blank | ic->private.local.brl_committing; ev->type = KeyPress; - braille = True; + braillePattern = ic->private.local.brl_committing; ic->private.local.brl_committing = 0; } else { return(True); @@ -139,16 +140,16 @@ _XimLocalFilter(Display *d, Window w, XEvent *ev, XPointer client_data) (ev->type == KeyRelease && !anymodifier)) { goto emit_braille; } - /* Error (Sequence Unmatch occured) */ + /* Error (Sequence Unmatch occurred) */ /* initialize internal state for next key sequence */ ic->private.local.context = ((Xim)ic->core.im)->private.local.top; return (ev->type == KeyPress); } emit_braille: - if(braille) { + if(braillePattern) { /* Braille pattern is not in compose tree, emit alone */ - ic->private.local.brl_committed = ic->private.local.brl_committing; + ic->private.local.brl_committed = braillePattern; ic->private.local.composed = 0; ev->xkey.keycode = 0; _XPutBackEvent(d, ev); diff --git a/lib/libX11/modules/im/ximcp/imThaiFlt.c b/lib/libX11/modules/im/ximcp/imThaiFlt.c index f134e842e..1f963f6fd 100644 --- a/lib/libX11/modules/im/ximcp/imThaiFlt.c +++ b/lib/libX11/modules/im/ximcp/imThaiFlt.c @@ -129,7 +129,7 @@ char const tactis_chtype[TACTIS_CHARS] = { static char const write_rules_lookup[CH_CLASSES][CH_CLASSES] = { - /* Table 0: writing/outputing rules */ + /* Table 0: writing/outputting rules */ /* row: leading char, column: following char */ /* CTRL NON CONS LV FV1 FV2 FV3 BV1 BV2 BD TONE AD1 AD2 AD3 AV1 AV2 AV3 */ {XC, NC, NC, NC, NC, NC, NC, NC, NC, NC, NC, NC, NC, NC, NC, NC, NC}/*CTRL*/ @@ -821,7 +821,7 @@ XThaiTranslateKey( * 4 of the keymap. * Since we don't know whether ThaiCat keyboard or WTT keyboard is * in use, the same mapping is done for all Thai input. - * We just arbitary choose to use column 3 keysyms as the indices of + * We just arbitrarily choose to use column 3 keysyms as the indices of * this mapping. * When the control key is also hold, this mapping has no effect. */ diff --git a/lib/libX11/modules/im/ximcp/imTrX.c b/lib/libX11/modules/im/ximcp/imTrX.c index 0fcf3581e..ec2567520 100644 --- a/lib/libX11/modules/im/ximcp/imTrX.c +++ b/lib/libX11/modules/im/ximcp/imTrX.c @@ -93,6 +93,7 @@ _XimXFreeIntrCallback( Xfree(rec); rec = next; } + spec->intr_cb = NULL; return; } diff --git a/lib/libX11/modules/im/ximcp/imTrans.c b/lib/libX11/modules/im/ximcp/imTrans.c index ae644ab61..232f8165f 100644 --- a/lib/libX11/modules/im/ximcp/imTrans.c +++ b/lib/libX11/modules/im/ximcp/imTrans.c @@ -176,6 +176,7 @@ _XimFreeTransIntrCallback( Xfree(rec); rec = next; } + spec->intr_cb = NULL; return; } diff --git a/lib/libX11/modules/lc/Makefile.in b/lib/libX11/modules/lc/Makefile.in index a2a28c55f..176b6e42e 100644 --- a/lib/libX11/modules/lc/Makefile.in +++ b/lib/libX11/modules/lc/Makefile.in @@ -53,9 +53,10 @@ subdir = modules/lc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -296,6 +297,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/modules/lc/Utf8/Makefile.in b/lib/libX11/modules/lc/Utf8/Makefile.in index 31decbc48..07b4d4831 100644 --- a/lib/libX11/modules/lc/Utf8/Makefile.in +++ b/lib/libX11/modules/lc/Utf8/Makefile.in @@ -55,9 +55,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -331,6 +332,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/modules/lc/def/Makefile.in b/lib/libX11/modules/lc/def/Makefile.in index b8d644ae5..8f59016aa 100644 --- a/lib/libX11/modules/lc/def/Makefile.in +++ b/lib/libX11/modules/lc/def/Makefile.in @@ -55,9 +55,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -329,6 +330,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/modules/lc/gen/Makefile.in b/lib/libX11/modules/lc/gen/Makefile.in index c51afa9b2..255c6c567 100644 --- a/lib/libX11/modules/lc/gen/Makefile.in +++ b/lib/libX11/modules/lc/gen/Makefile.in @@ -55,9 +55,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -329,6 +330,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/modules/lc/gen/lcGenConv.c b/lib/libX11/modules/lc/gen/lcGenConv.c index eede76807..dff4269c9 100644 --- a/lib/libX11/modules/lc/gen/lcGenConv.c +++ b/lib/libX11/modules/lc/gen/lcGenConv.c @@ -940,7 +940,7 @@ wcstombs_org( if (*to_left < defstr_len) break; if (outbufptr) { - strncpy((char *)outbufptr, default_string, defstr_len); + memcpy(outbufptr, default_string, defstr_len); outbufptr += defstr_len; } (*to_left) -= defstr_len; @@ -976,7 +976,7 @@ wcstombs_org( if (*to_left < length) break; if (outbufptr) { - strncpy((char *)outbufptr, encoding, length); + memcpy(outbufptr, encoding, length); outbufptr += length; } (*to_left) -= length; @@ -1966,7 +1966,7 @@ wcstostr( if (*to_left < defstr_len) break; if (outbufptr) { - strncpy((char *)outbufptr, default_string, defstr_len); + memcpy(outbufptr, default_string, defstr_len); outbufptr += defstr_len; } (*to_left) -= defstr_len; @@ -2005,7 +2005,7 @@ wcstostr( break; if (outbufptr) { - strncpy((char *)outbufptr, encoding, length); + memcpy(outbufptr, encoding, length); outbufptr += length; } (*to_left) -= length; @@ -2462,7 +2462,7 @@ strtombs( if (*to_left < length) break; if (outbufptr) { - strncpy((char *)outbufptr, encoding, length); + memcpy(outbufptr, encoding, length); outbufptr += length; } (*to_left) -= length; diff --git a/lib/libX11/modules/om/Makefile.in b/lib/libX11/modules/om/Makefile.in index c053795f4..67b9bdbeb 100644 --- a/lib/libX11/modules/om/Makefile.in +++ b/lib/libX11/modules/om/Makefile.in @@ -53,9 +53,10 @@ subdir = modules/om DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -296,6 +297,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/modules/om/generic/Makefile.in b/lib/libX11/modules/om/generic/Makefile.in index 4b518c98c..decf5d6ea 100644 --- a/lib/libX11/modules/om/generic/Makefile.in +++ b/lib/libX11/modules/om/generic/Makefile.in @@ -55,9 +55,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -332,6 +333,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/modules/om/generic/omGeneric.c b/lib/libX11/modules/om/generic/omGeneric.c index bcfb9ab85..406cec93d 100644 --- a/lib/libX11/modules/om/generic/omGeneric.c +++ b/lib/libX11/modules/om/generic/omGeneric.c @@ -702,7 +702,7 @@ parse_omit_name( switch (num_fields) { case 12: - /* This is the best way to have specifed the fontset. In this + /* This is the best way to have specified the fontset. In this * case, there is no original encoding. E.g., * -*-*-*-*-*-*-14-*-*-*-*-* * To this, we'll append a dash: @@ -771,7 +771,7 @@ parse_omit_name( if ((font_data->xlfd_name = get_font_name(oc, buf)) != NULL) return True; - /* This may mot be needed anymore as XListFonts() takes care of this */ + /* This may not be needed anymore as XListFonts() takes care of this */ if (num_fields < 12) { if ((last - buf) > (XLFD_MAX_LEN - 2)) return -1; @@ -1113,7 +1113,7 @@ parse_fontname( goto err; } else if(ret == True) { /* - * We can't just loop thru fontset->font_data to + * We can't just loop through fontset->font_data to * find the first (ie. best) match: parse_fontdata * will try a substitute font if no primary one could * be matched. It returns the required information in @@ -2049,7 +2049,7 @@ init_om( /* directional dependent drawing */ om->core.directional_dependent = False; - /* contexual drawing */ + /* contextual drawing */ om->core.contextual_drawing = False; /* context dependent */ diff --git a/lib/libX11/nls/Makefile.in b/lib/libX11/nls/Makefile.in index fc0437037..501364c2e 100644 --- a/lib/libX11/nls/Makefile.in +++ b/lib/libX11/nls/Makefile.in @@ -59,9 +59,10 @@ DIST_COMMON = $(nobase_dist_x11locale_DATA) $(srcdir)/Makefile.am \ subdir = nls ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -297,6 +298,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -328,7 +330,8 @@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ -e '/^[ ]*XHASH/s/XHASH/\#/' \ -e 's,X11_LOCALEDATADIR,$(X11_LOCALEDATADIR),g' \ - -e '/\@\@$$/s/\@\@$$/\\/' + -e '/\@\@$$/s/\@\@$$/\\/' \ + -e '/^$$/d' @HAVE_PERL_TRUE@LOG_COMPILER = $(PERL) @HAVE_PERL_TRUE@TESTS = compose-check.pl diff --git a/lib/libX11/nls/compose.dir.pre b/lib/libX11/nls/compose.dir.pre index 70974ef5c..d91891c07 100644 --- a/lib/libX11/nls/compose.dir.pre +++ b/lib/libX11/nls/compose.dir.pre @@ -224,8 +224,6 @@ iso8859-2/Compose: sh_YU.ISO8859-2 iso8859-2/Compose: sk_SK.ISO8859-2 iso8859-2/Compose: sl_SI.ISO8859-2 iso8859-2/Compose: sq_AL.ISO8859-2 -iso8859-2/Compose: sr_CS.ISO8859-2 -iso8859-5/Compose: sr_CS.ISO8859-5 iso8859-2/Compose: sr_YU.ISO8859-2 microsoft-cp1251/Compose: sr_YU.CP1251 iso8859-5/Compose: sr_YU.ISO8859-5 @@ -440,7 +438,6 @@ en_US.UTF-8/Compose: si_LK.UTF-8 en_US.UTF-8/Compose: sk_SK.UTF-8 en_US.UTF-8/Compose: sl_SI.UTF-8 en_US.UTF-8/Compose: sq_AL.UTF-8 -sr_CS.UTF-8/Compose: sr_CS.UTF-8 en_US.UTF-8/Compose: sr_ME.UTF-8 en_US.UTF-8/Compose: sr_RS.UTF-8 en_US.UTF-8/Compose: sr_YU.UTF-8 diff --git a/lib/libX11/nls/en_US.UTF-8/Compose.pre b/lib/libX11/nls/en_US.UTF-8/Compose.pre index 0d6192241..61d5c07a6 100644 --- a/lib/libX11/nls/en_US.UTF-8/Compose.pre +++ b/lib/libX11/nls/en_US.UTF-8/Compose.pre @@ -88,6 +88,12 @@ XCOMM on some keyboards. <Multi_key> <minus> <space> : "~" asciitilde # TILDE <Multi_key> <space> <minus> : "~" asciitilde # TILDE +<Multi_key> <L> <T> : "<" less # LESS-THAN +<Multi_key> <l> <t> : "<" less # LESS-THAN + +<Multi_key> <G> <T> : ">" greater # GREATER-THAN +<Multi_key> <g> <t> : ">" greater # GREATER-THAN + XCOMM Spaces <Multi_key> <space> <space> : " " nobreakspace # NO-BREAK SPACE <Multi_key> <space> <period> : " " U2008 # PUNCTUATION SPACE @@ -876,18 +882,22 @@ XCOMM Part 3 <Multi_key> <c> <period> : "ċ" U010B # LATIN SMALL LETTER C WITH DOT ABOVE <dead_caron> <C> : "Č" U010C # LATIN CAPITAL LETTER C WITH CARON <Multi_key> <c> <C> : "Č" U010C # LATIN CAPITAL LETTER C WITH CARON +<Multi_key> <v> <C> : "Č" U010C # LATIN CAPITAL LETTER C WITH CARON <Multi_key> <less> <C> : "Č" U010C # LATIN CAPITAL LETTER C WITH CARON <Multi_key> <C> <less> : "Č" U010C # LATIN CAPITAL LETTER C WITH CARON <dead_caron> <c> : "č" U010D # LATIN SMALL LETTER C WITH CARON <Multi_key> <c> <c> : "č" U010D # LATIN SMALL LETTER C WITH CARON +<Multi_key> <v> <c> : "č" U010D # LATIN SMALL LETTER C WITH CARON <Multi_key> <less> <c> : "č" U010D # LATIN SMALL LETTER C WITH CARON <Multi_key> <c> <less> : "č" U010D # LATIN SMALL LETTER C WITH CARON <dead_caron> <D> : "Ď" U010E # LATIN CAPITAL LETTER D WITH CARON <Multi_key> <c> <D> : "Ď" U010E # LATIN CAPITAL LETTER D WITH CARON +<Multi_key> <v> <D> : "Ď" U010E # LATIN CAPITAL LETTER D WITH CARON <Multi_key> <less> <D> : "Ď" U010E # LATIN CAPITAL LETTER D WITH CARON <Multi_key> <D> <less> : "Ď" U010E # LATIN CAPITAL LETTER D WITH CARON <dead_caron> <d> : "ď" U010F # LATIN SMALL LETTER D WITH CARON <Multi_key> <c> <d> : "ď" U010F # LATIN SMALL LETTER D WITH CARON +<Multi_key> <v> <d> : "ď" U010F # LATIN SMALL LETTER D WITH CARON <Multi_key> <less> <d> : "ď" U010F # LATIN SMALL LETTER D WITH CARON <Multi_key> <d> <less> : "ď" U010F # LATIN SMALL LETTER D WITH CARON <dead_stroke> <D> : "Đ" Dstroke # LATIN CAPITAL LETTER D WITH STROKE @@ -936,10 +946,12 @@ XCOMM Part 3 <Multi_key> <e> <comma> : "ę" U0119 # LATIN SMALL LETTER E WITH OGONEK <dead_caron> <E> : "Ě" U011A # LATIN CAPITAL LETTER E WITH CARON <Multi_key> <c> <E> : "Ě" U011A # LATIN CAPITAL LETTER E WITH CARON +<Multi_key> <v> <E> : "Ě" U011A # LATIN CAPITAL LETTER E WITH CARON <Multi_key> <less> <E> : "Ě" U011A # LATIN CAPITAL LETTER E WITH CARON <Multi_key> <E> <less> : "Ě" U011A # LATIN CAPITAL LETTER E WITH CARON <dead_caron> <e> : "ě" U011B # LATIN SMALL LETTER E WITH CARON <Multi_key> <c> <e> : "ě" U011B # LATIN SMALL LETTER E WITH CARON +<Multi_key> <v> <e> : "ě" U011B # LATIN SMALL LETTER E WITH CARON <Multi_key> <less> <e> : "ě" U011B # LATIN SMALL LETTER E WITH CARON <Multi_key> <e> <less> : "ě" U011B # LATIN SMALL LETTER E WITH CARON <dead_circumflex> <G> : "Ĝ" U011C # LATIN CAPITAL LETTER G WITH CIRCUMFLEX @@ -1087,10 +1099,12 @@ XCOMM Part 3 <Multi_key> <cedilla> <n> : "ņ" U0146 # LATIN SMALL LETTER N WITH CEDILLA <dead_caron> <N> : "Ň" U0147 # LATIN CAPITAL LETTER N WITH CARON <Multi_key> <c> <N> : "Ň" U0147 # LATIN CAPITAL LETTER N WITH CARON +<Multi_key> <v> <N> : "Ň" U0147 # LATIN CAPITAL LETTER N WITH CARON <Multi_key> <less> <N> : "Ň" U0147 # LATIN CAPITAL LETTER N WITH CARON <Multi_key> <N> <less> : "Ň" U0147 # LATIN CAPITAL LETTER N WITH CARON <dead_caron> <n> : "ň" U0148 # LATIN SMALL LETTER N WITH CARON <Multi_key> <c> <n> : "ň" U0148 # LATIN SMALL LETTER N WITH CARON +<Multi_key> <v> <n> : "ň" U0148 # LATIN SMALL LETTER N WITH CARON <Multi_key> <less> <n> : "ň" U0148 # LATIN SMALL LETTER N WITH CARON <Multi_key> <n> <less> : "ň" U0148 # LATIN SMALL LETTER N WITH CARON <Multi_key> <N> <G> : "Ŋ" U014A # LATIN CAPITAL LETTER ENG @@ -1135,10 +1149,12 @@ XCOMM Part 3 <Multi_key> <cedilla> <r> : "ŗ" U0157 # LATIN SMALL LETTER R WITH CEDILLA <dead_caron> <R> : "Ř" U0158 # LATIN CAPITAL LETTER R WITH CARON <Multi_key> <c> <R> : "Ř" U0158 # LATIN CAPITAL LETTER R WITH CARON +<Multi_key> <v> <R> : "Ř" U0158 # LATIN CAPITAL LETTER R WITH CARON <Multi_key> <less> <R> : "Ř" U0158 # LATIN CAPITAL LETTER R WITH CARON <Multi_key> <R> <less> : "Ř" U0158 # LATIN CAPITAL LETTER R WITH CARON <dead_caron> <r> : "ř" U0159 # LATIN SMALL LETTER R WITH CARON <Multi_key> <c> <r> : "ř" U0159 # LATIN SMALL LETTER R WITH CARON +<Multi_key> <v> <r> : "ř" U0159 # LATIN SMALL LETTER R WITH CARON <Multi_key> <less> <r> : "ř" U0159 # LATIN SMALL LETTER R WITH CARON <Multi_key> <r> <less> : "ř" U0159 # LATIN SMALL LETTER R WITH CARON <dead_acute> <S> : "Ś" U015A # LATIN CAPITAL LETTER S WITH ACUTE @@ -1164,10 +1180,12 @@ XCOMM Part 3 <Multi_key> <s> <cedilla> : "ş" U015F # LATIN SMALL LETTER S WITH CEDILLA <dead_caron> <S> : "Š" U0160 # LATIN CAPITAL LETTER S WITH CARON <Multi_key> <c> <S> : "Š" U0160 # LATIN CAPITAL LETTER S WITH CARON +<Multi_key> <v> <S> : "Š" U0160 # LATIN CAPITAL LETTER S WITH CARON <Multi_key> <less> <S> : "Š" U0160 # LATIN CAPITAL LETTER S WITH CARON <Multi_key> <S> <less> : "Š" U0160 # LATIN CAPITAL LETTER S WITH CARON <dead_caron> <s> : "š" U0161 # LATIN SMALL LETTER S WITH CARON <Multi_key> <c> <s> : "š" U0161 # LATIN SMALL LETTER S WITH CARON +<Multi_key> <v> <s> : "š" U0161 # LATIN SMALL LETTER S WITH CARON <Multi_key> <less> <s> : "š" U0161 # LATIN SMALL LETTER S WITH CARON <Multi_key> <s> <less> : "š" U0161 # LATIN SMALL LETTER S WITH CARON <dead_cedilla> <T> : "Ţ" U0162 # LATIN CAPITAL LETTER T WITH CEDILLA @@ -1180,10 +1198,12 @@ XCOMM Part 3 <Multi_key> <cedilla> <t> : "ţ" U0163 # LATIN SMALL LETTER T WITH CEDILLA <dead_caron> <T> : "Ť" U0164 # LATIN CAPITAL LETTER T WITH CARON <Multi_key> <c> <T> : "Ť" U0164 # LATIN CAPITAL LETTER T WITH CARON +<Multi_key> <v> <T> : "Ť" U0164 # LATIN CAPITAL LETTER T WITH CARON <Multi_key> <less> <T> : "Ť" U0164 # LATIN CAPITAL LETTER T WITH CARON <Multi_key> <T> <less> : "Ť" U0164 # LATIN CAPITAL LETTER T WITH CARON <dead_caron> <t> : "ť" U0165 # LATIN SMALL LETTER T WITH CARON <Multi_key> <c> <t> : "ť" U0165 # LATIN SMALL LETTER T WITH CARON +<Multi_key> <v> <t> : "ť" U0165 # LATIN SMALL LETTER T WITH CARON <Multi_key> <less> <t> : "ť" U0165 # LATIN SMALL LETTER T WITH CARON <Multi_key> <t> <less> : "ť" U0165 # LATIN SMALL LETTER T WITH CARON <dead_stroke> <T> : "Ŧ" U0166 # LATIN CAPITAL LETTER T WITH STROKE @@ -1307,20 +1327,28 @@ XCOMM Part 3 <Multi_key> <KP_Divide> <z> : "ƶ" U01B6 # LATIN SMALL LETTER Z WITH STROKE <dead_caron> <A> : "Ǎ" U01CD # LATIN CAPITAL LETTER A WITH CARON <Multi_key> <c> <A> : "Ǎ" U01CD # LATIN CAPITAL LETTER A WITH CARON +<Multi_key> <v> <A> : "Ǎ" U01CD # LATIN CAPITAL LETTER A WITH CARON <dead_caron> <a> : "ǎ" U01CE # LATIN SMALL LETTER A WITH CARON <Multi_key> <c> <a> : "ǎ" U01CE # LATIN SMALL LETTER A WITH CARON +<Multi_key> <v> <a> : "ǎ" U01CE # LATIN SMALL LETTER A WITH CARON <dead_caron> <I> : "Ǐ" U01CF # LATIN CAPITAL LETTER I WITH CARON <Multi_key> <c> <I> : "Ǐ" U01CF # LATIN CAPITAL LETTER I WITH CARON +<Multi_key> <v> <I> : "Ǐ" U01CF # LATIN CAPITAL LETTER I WITH CARON <dead_caron> <i> : "ǐ" U01D0 # LATIN SMALL LETTER I WITH CARON <Multi_key> <c> <i> : "ǐ" U01D0 # LATIN SMALL LETTER I WITH CARON +<Multi_key> <v> <i> : "ǐ" U01D0 # LATIN SMALL LETTER I WITH CARON <dead_caron> <O> : "Ǒ" U01D1 # LATIN CAPITAL LETTER O WITH CARON <Multi_key> <c> <O> : "Ǒ" U01D1 # LATIN CAPITAL LETTER O WITH CARON +<Multi_key> <v> <O> : "Ǒ" U01D1 # LATIN CAPITAL LETTER O WITH CARON <dead_caron> <o> : "ǒ" U01D2 # LATIN SMALL LETTER O WITH CARON <Multi_key> <c> <o> : "ǒ" U01D2 # LATIN SMALL LETTER O WITH CARON +<Multi_key> <v> <o> : "ǒ" U01D2 # LATIN SMALL LETTER O WITH CARON <dead_caron> <U> : "Ǔ" U01D3 # LATIN CAPITAL LETTER U WITH CARON <Multi_key> <c> <U> : "Ǔ" U01D3 # LATIN CAPITAL LETTER U WITH CARON +<Multi_key> <v> <U> : "Ǔ" U01D3 # LATIN CAPITAL LETTER U WITH CARON <dead_caron> <u> : "ǔ" U01D4 # LATIN SMALL LETTER U WITH CARON <Multi_key> <c> <u> : "ǔ" U01D4 # LATIN SMALL LETTER U WITH CARON +<Multi_key> <v> <u> : "ǔ" U01D4 # LATIN SMALL LETTER U WITH CARON <dead_macron> <Udiaeresis> : "Ǖ" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON <Multi_key> <macron> <Udiaeresis> : "Ǖ" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON <Multi_key> <underscore> <Udiaeresis> : "Ǖ" U01D5 # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON @@ -1431,12 +1459,16 @@ XCOMM Part 3 <Multi_key> <KP_Divide> <g> : "ǥ" U01E5 # LATIN SMALL LETTER G WITH STROKE <dead_caron> <G> : "Ǧ" U01E6 # LATIN CAPITAL LETTER G WITH CARON <Multi_key> <c> <G> : "Ǧ" U01E6 # LATIN CAPITAL LETTER G WITH CARON +<Multi_key> <v> <G> : "Ǧ" U01E6 # LATIN CAPITAL LETTER G WITH CARON <dead_caron> <g> : "ǧ" U01E7 # LATIN SMALL LETTER G WITH CARON <Multi_key> <c> <g> : "ǧ" U01E7 # LATIN SMALL LETTER G WITH CARON +<Multi_key> <v> <g> : "ǧ" U01E7 # LATIN SMALL LETTER G WITH CARON <dead_caron> <K> : "Ǩ" U01E8 # LATIN CAPITAL LETTER K WITH CARON <Multi_key> <c> <K> : "Ǩ" U01E8 # LATIN CAPITAL LETTER K WITH CARON +<Multi_key> <v> <K> : "Ǩ" U01E8 # LATIN CAPITAL LETTER K WITH CARON <dead_caron> <k> : "ǩ" U01E9 # LATIN SMALL LETTER K WITH CARON <Multi_key> <c> <k> : "ǩ" U01E9 # LATIN SMALL LETTER K WITH CARON +<Multi_key> <v> <k> : "ǩ" U01E9 # LATIN SMALL LETTER K WITH CARON <dead_ogonek> <O> : "Ǫ" U01EA # LATIN CAPITAL LETTER O WITH OGONEK <Multi_key> <semicolon> <O> : "Ǫ" U01EA # LATIN CAPITAL LETTER O WITH OGONEK <Multi_key> <O> <semicolon> : "Ǫ" U01EA # LATIN CAPITAL LETTER O WITH OGONEK @@ -1467,10 +1499,13 @@ XCOMM Part 3 <Multi_key> <underscore> <semicolon> <o> : "ǭ" U01ED # LATIN SMALL LETTER O WITH OGONEK AND MACRON <dead_caron> <EZH> : "Ǯ" U01EE # LATIN CAPITAL LETTER EZH WITH CARON <Multi_key> <c> <EZH> : "Ǯ" U01EE # LATIN CAPITAL LETTER EZH WITH CARON +<Multi_key> <v> <EZH> : "Ǯ" U01EE # LATIN CAPITAL LETTER EZH WITH CARON <dead_caron> <ezh> : "ǯ" U01EF # LATIN SMALL LETTER EZH WITH CARON <Multi_key> <c> <ezh> : "ǯ" U01EF # LATIN SMALL LETTER EZH WITH CARON +<Multi_key> <v> <ezh> : "ǯ" U01EF # LATIN SMALL LETTER EZH WITH CARON <dead_caron> <j> : "ǰ" U01F0 # LATIN SMALL LETTER J WITH CARON <Multi_key> <c> <j> : "ǰ" U01F0 # LATIN SMALL LETTER J WITH CARON +<Multi_key> <v> <j> : "ǰ" U01F0 # LATIN SMALL LETTER J WITH CARON <dead_acute> <G> : "Ǵ" U01F4 # LATIN CAPITAL LETTER G WITH ACUTE <Multi_key> <acute> <G> : "Ǵ" U01F4 # LATIN CAPITAL LETTER G WITH ACUTE <Multi_key> <apostrophe> <G> : "Ǵ" U01F4 # LATIN CAPITAL LETTER G WITH ACUTE @@ -1551,8 +1586,10 @@ XCOMM Part 3 <dead_invertedbreve> <u> : "ȗ" U0217 # LATIN SMALL LETTER U WITH INVERTED BREVE <dead_caron> <H> : "Ȟ" U021E # LATIN CAPITAL LETTER H WITH CARON <Multi_key> <c> <H> : "Ȟ" U021E # LATIN CAPITAL LETTER H WITH CARON +<Multi_key> <v> <H> : "Ȟ" U021E # LATIN CAPITAL LETTER H WITH CARON <dead_caron> <h> : "ȟ" U021F # LATIN SMALL LETTER H WITH CARON <Multi_key> <c> <h> : "ȟ" U021F # LATIN SMALL LETTER H WITH CARON +<Multi_key> <v> <h> : "ȟ" U021F # LATIN SMALL LETTER H WITH CARON <dead_abovedot> <A> : "Ȧ" U0226 # LATIN CAPITAL LETTER A WITH DOT ABOVE <Multi_key> <period> <A> : "Ȧ" U0226 # LATIN CAPITAL LETTER A WITH DOT ABOVE <dead_abovedot> <a> : "ȧ" U0227 # LATIN SMALL LETTER A WITH DOT ABOVE @@ -4550,7 +4587,11 @@ XCOMM Part 3 <Multi_key> <slash> <U2194> : "↮" U21AE # LEFT RIGHT ARROW WITH STROKE <Multi_key> <KP_Divide> <U2194> : "↮" U21AE # LEFT RIGHT ARROW WITH STROKE <Multi_key> <less> <minus> : "←" U2190 # LEFTWARDS ARROW +<Multi_key> <bar> <asciicircum> : "↑" U2191 # UPWARDS ARROW +<Multi_key> <asciicircum> <bar> : "↑" U2191 # UPWARDS ARROW <Multi_key> <minus> <greater> : "→" U2192 # RIGHTWARDS ARROW +<Multi_key> <bar> <v> : "↓" U2193 # DOWNWARDS ARROW +<Multi_key> <v> <bar> : "↓" U2193 # DOWNWARDS ARROW <Multi_key> <equal> <greater> : "⇒" U21D2 # RIGHTWARDS DOUBLE ARROW <Multi_key> <U2203> <U0338> : "∄" U2204 # THERE DOES NOT EXIST <Multi_key> <braceleft> <braceright> : "∅" U2205 # EMPTY SET @@ -5851,6 +5892,39 @@ XCOMM <dead_circumflex> <Cyrillic_ER> : "Р̂" # CYRILLIC CAPITAL LETTER ER WITH COMBINING CIRCUMFLEX ACCENT <Multi_key> <asciicircum> <Cyrillic_ER> : "Р̂" # CYRILLIC CAPITAL LETTER ER WITH COMBINING CIRCUMFLEX ACCENT +<dead_acute> <Cyrillic_yeru> : "ы́" # CYRILLIC SMALL LETTER YERU WITH COMBINING ACUTE ACCENT +<Multi_key> <acute> <Cyrillic_yeru> : "ы́" # CYRILLIC SMALL LETTER YERU WITH COMBINING ACUTE ACCENT +<Multi_key> <apostrophe> <Cyrillic_yeru> : "ы́" # CYRILLIC SMALL LETTER YERU WITH COMBINING ACUTE ACCENT + +<dead_acute> <Cyrillic_YERU> : "Ы́" # CYRILLIC CAPITAL LETTER YERU WITH COMBINING ACUTE ACCENT +<Multi_key> <acute> <Cyrillic_YERU> : "Ы́" # CYRILLIC CAPITAL LETTER YERU WITH COMBINING ACUTE ACCENT +<Multi_key> <apostrophe> <Cyrillic_YERU> : "Ы́" # CYRILLIC CAPITAL LETTER YERU WITH COMBINING ACUTE ACCENT + +<dead_acute> <Cyrillic_e> : "э́" # CYRILLIC SMALL LETTER E WITH COMBINING ACUTE ACCENT +<Multi_key> <acute> <Cyrillic_e> : "э́" # CYRILLIC SMALL LETTER E WITH COMBINING ACUTE ACCENT +<Multi_key> <apostrophe> <Cyrillic_e> : "э́" # CYRILLIC SMALL LETTER E WITH COMBINING ACUTE ACCENT + +<dead_acute> <Cyrillic_E> : "Э́" # CYRILLIC CAPITAL LETTER E WITH COMBINING ACUTE ACCENT +<Multi_key> <acute> <Cyrillic_E> : "Э́" # CYRILLIC CAPITAL LETTER E WITH COMBINING ACUTE ACCENT +<Multi_key> <apostrophe> <Cyrillic_E> : "Э́" # CYRILLIC CAPITAL LETTER E WITH COMBINING ACUTE ACCENT + +<dead_acute> <Cyrillic_yu> : "ю́" # CYRILLIC SMALL LETTER YU WITH COMBINING ACUTE ACCENT +<Multi_key> <acute> <Cyrillic_yu> : "ю́" # CYRILLIC SMALL LETTER YU WITH COMBINING ACUTE ACCENT +<Multi_key> <apostrophe> <Cyrillic_yu> : "ю́" # CYRILLIC SMALL LETTER YU WITH COMBINING ACUTE ACCENT + +<dead_acute> <Cyrillic_YU> : "Ю́́" # CYRILLIC CAPITAL LETTER YU WITH COMBINING ACUTE ACCENT +<Multi_key> <acute> <Cyrillic_YU> : "Ю́́" # CYRILLIC CAPITAL LETTER YU WITH COMBINING ACUTE ACCENT +<Multi_key> <apostrophe> <Cyrillic_YU> : "Ю́́" # CYRILLIC CAPITAL LETTER YU WITH COMBINING ACUTE ACCENT + +<dead_acute> <Cyrillic_ya> : "я́" # CYRILLIC SMALL LETTER YA WITH COMBINING ACUTE ACCENT +<Multi_key> <acute> <Cyrillic_ya> : "я́" # CYRILLIC SMALL LETTER YA WITH COMBINING ACUTE ACCENT +<Multi_key> <apostrophe> <Cyrillic_ya> : "я́" # CYRILLIC SMALL LETTER YA WITH COMBINING ACUTE ACCENT + +<dead_acute> <Cyrillic_YA> : "Я́" # CYRILLIC CAPITAL LETTER YA WITH COMBINING ACUTE ACCENT +<Multi_key> <acute> <Cyrillic_YA> : "Я́" # CYRILLIC CAPITAL LETTER YA WITH COMBINING ACUTE ACCENT +<Multi_key> <apostrophe> <Cyrillic_YA> : "Я́" # CYRILLIC CAPITAL LETTER YA WITH COMBINING ACUTE ACCENT + + XCOMM APL support Geoff Streeter 2012-01-04 XCOMM APL was initially an overstruck language. The original APL terminal was an IBM golfball @@ -5866,6 +5940,7 @@ XCOMM Characters from "Mathematical Operators" <Multi_key> <v> <slash> : "√" U221a # v / SQUARE ROOT <Multi_key> <slash> <v> : "√" U221a # / v SQUARE ROOT <Multi_key> <8> <8> : "∞" U221e # 8 8 INFINITY +<Multi_key> <asciitilde> <asciitilde> : "≈" U2248 # ~ ~ ALMOST EQUAL TO <Multi_key> <equal> <underscore> : "≡" U2261 # = _ IDENTICAL TO <Multi_key> <underscore> <U2260> : "≢" U2262 # _ ≠ NOT IDENTICAL TO <Multi_key> <U2260> <underscore> : "≢" U2262 # ≠ _ NOT IDENTICAL TO diff --git a/lib/libX11/nls/fi_FI.UTF-8/Compose.pre b/lib/libX11/nls/fi_FI.UTF-8/Compose.pre index f4d6a4a83..bebab219d 100644 --- a/lib/libX11/nls/fi_FI.UTF-8/Compose.pre +++ b/lib/libX11/nls/fi_FI.UTF-8/Compose.pre @@ -1,5 +1,5 @@ XCOMM -XCOMM Official compose sequences for Finland based on SFS 5966 standard +XCOMM Official compose sequences for Finland based on SFS 5966:2019 standard XCOMM XCOMM This compose sequence map implements all the functionality of Annex 3 XCOMM and Annex 4 of the standard and additionally defines the sequences @@ -153,6 +153,12 @@ XCOMM Sequences with COMBINING CIRCUMFLEX ACCENT / <dead_circumflex> <dead_circumflex> <y> : "ŷ" U0177 # LATIN SMALL LETTER Y WITH CIRCUMFLEX <dead_circumflex> <Y> : "Ŷ" U0176 # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX +XCOMM Sequences with COMBINING COMMA BELOW / <dead_belowcomma> +<dead_belowcomma> <s> : "ș" U0219 # LATIN SMALL LETTER S WITH COMMA BELOW +<dead_belowcomma> <S> : "Ș" U0218 # LATIN CAPITAL LETTER S WITH COMMA BELOW +<dead_belowcomma> <t> : "ț" U021B # LATIN SMALL LETTER T WITH COMMA BELOW +<dead_belowcomma> <T> : "Ț" U021A # LATIN CAPITAL LETTER T WITH COMMA BELOW + XCOMM Sequences with COMBINING DIAERESIS / <dead_diaeresis> <dead_diaeresis> <space> : "¨" U00A8 # DIAERESIS <dead_diaeresis> <a> : "ä" U00E4 # LATIN SMALL LETTER A WITH DIAERESIS @@ -333,7 +339,7 @@ XCOMM Sequences with COMBINING CIRCUMFLEX ACCENT / <dead_circumflex> <dead_grave> <dead_circumflex> <e> : "ề" U1EC1 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE <dead_hook> <dead_circumflex> <e> : "ể" U1EC3 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE <dead_tilde> <dead_circumflex> <e> : "ễ" U1EC5 # LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE -<dead_acute> <dead_circumflex> <E> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE +<dead_acute> <dead_circumflex> <E> : "Ế" U1EBE # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE <dead_belowdot> <dead_circumflex> <E> : "Ệ" U1EC6 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW <dead_grave> <dead_circumflex> <E> : "Ề" U1EC0 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE <dead_hook> <dead_circumflex> <E> : "Ể" U1EC2 # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE @@ -421,7 +427,3 @@ XCOMM (Multilingual European Subset No. 2 in ISO/IEC 10646, Collection 282) <Multi_key> <f> <s> : "ſ" U017F # LATIN SMALL LETTER LONG S <dead_abovedot> <Multi_key> <f> <s> : "ẛ" U1E9B # LATIN SMALL LETTER LONG S WITH DOT ABOVE <Multi_key> <dead_abovedot> <f> <s> : "ẛ" U1E9B # LATIN SMALL LETTER LONG S WITH DOT ABOVE -<dead_belowcomma> <s> : "ș" U0219 # LATIN SMALL LETTER S WITH COMMA BELOW -<dead_belowcomma> <S> : "Ș" U0218 # LATIN CAPITAL LETTER S WITH COMMA BELOW -<dead_belowcomma> <t> : "ț" U021B # LATIN SMALL LETTER T WITH COMMA BELOW -<dead_belowcomma> <T> : "Ț" U021A # LATIN CAPITAL LETTER T WITH COMMA BELOW diff --git a/lib/libX11/nls/locale.alias.pre b/lib/libX11/nls/locale.alias.pre index ee4b9e073..1ed0a6ea9 100644 --- a/lib/libX11/nls/locale.alias.pre +++ b/lib/libX11/nls/locale.alias.pre @@ -1,8 +1,8 @@ XCOMM -XCOMM This file contains alias name of locale. +XCOMM This file contains alias names of locales. XCOMM Each alias name is described within one line. -XCOMM The first word is the alias name (simplified locale name) -XCOMM the second word is full locale name. +XCOMM The first word is the alias name (simplified locale name), +XCOMM the second word is the full locale name. XCOMM XCOMM @@ -26,7 +26,7 @@ af: af_ZA.ISO8859-1 af_ZA: af_ZA.ISO8859-1 af_ZA.iso88591: af_ZA.ISO8859-1 af_ZA.ISO-8859-1: af_ZA.ISO8859-1 -af_ZA.utf8: af_ZA.UTF-8 +af_ZA.utf8: af_ZA.UTF-8 am: am_ET.UTF-8 am_ET: am_ET.UTF-8 ar: ar_AA.ISO8859-6 @@ -194,15 +194,10 @@ cs_CS: cs_CZ.ISO8859-2 cs_CS.ISO8859-2: cs_CZ.ISO8859-2 cs_CZ: cs_CZ.ISO8859-2 cs_CZ.iso88592: cs_CZ.ISO8859-2 -cs_CS.iso8859-2: cs_CZ.ISO8859-2 +cs_CS.iso8859-2: cs_CZ.ISO8859-2 cs_CZ.ISO-8859-2: cs_CZ.ISO8859-2 cs_CZ.ISO_8859-2: cs_CZ.ISO8859-2 cs_CZ.utf8: cs_CZ.UTF-8 -XCOMM cz is an old name for Czech (now cs), and should be deleted in the future. -cz: cs_CZ.ISO8859-2 -cz_CZ: cs_CZ.ISO8859-2 -cz_CZ.utf8: cs_CZ.UTF-8 -cz_CZ.UTF-8: cs_CZ.UTF-8 cy: cy_GB.ISO8859-1 cy_GB: cy_GB.ISO8859-1 cy_GB.iso88591: cy_GB.ISO8859-1 @@ -337,7 +332,7 @@ ENG_GB.8859.in: en_GB.ISO8859-1 en_HK: en_HK.ISO8859-1 en_HK.iso88591: en_HK.ISO8859-1 en_HK.ISO-8859-1: en_HK.ISO8859-1 -en_HK.utf8: en_HK.UTF-8 +en_HK.utf8: en_HK.UTF-8 en_IE: en_IE.ISO8859-1 en_IE.iso88591: en_IE.ISO8859-1 en_IE.ISO-8859-1: en_IE.ISO8859-1 @@ -389,9 +384,7 @@ en_ZW.iso88591: en_ZW.ISO8859-1 en_ZW.ISO-8859-1: en_ZW.ISO8859-1 eo: eo_XX.ISO8859-3 eo_EO: eo_EO.ISO8859-3 -eo_EO.ISO8859-3: eo_EO.ISO8859-3 eo_XX: eo_XX.ISO8859-3 -eo_XX.ISO8859-3: eo_XX.ISO8859-3 es: es_ES.ISO8859-1 es.UTF-8: es_ES.UTF-8 es_AR: es_AR.ISO8859-1 @@ -666,10 +659,10 @@ hu_HU: hu_HU.ISO8859-2 hu_HU.iso88592: hu_HU.ISO8859-2 hu_HU.ISO-8859-2: hu_HU.ISO8859-2 hu_HU.utf8: hu_HU.UTF-8 -XCOMM in was the old ISO code for Indonesian (now id). These lines should be -XCOMM deleted in the future. -in: id_ID.ISO8859-1 -in_ID: id_ID.ISO8859-1 +ia: ia.UTF-8 +ia.utf8: ia.UTF-8 +ie: ie.UTF-8 +ie.utf8: ie.UTF-8 is: is_IS.ISO8859-1 is_IS: is_IS.ISO8859-1 is_IS.iso88591: is_IS.ISO8859-1 @@ -704,13 +697,6 @@ XCOMM we have little else on this encoding. iu: iu_CA.NUNACOM-8 iu_CA: iu_CA.NUNACOM-8 iu_CA.nunacom8: iu_CA.NUNACOM-8 -XCOMM iw was the old ISO code for Hebrew (now he). These lines should be -XCOMM deleted in the future. -iw: he_IL.ISO8859-8 -iw_IL: he_IL.ISO8859-8 -Iw_IL: he_IL.ISO8859-8 -iw_IL.iso88598: he_IL.ISO8859-8 -iw_IL.ISO-8859-8: he_IL.ISO8859-8 ja_JP: ja_JP.eucJP ja: ja_JP.eucJP ja.JIS: ja_JP.JIS7 @@ -727,7 +713,6 @@ ja_JP.JIS: ja_JP.JIS7 ja_JP.jis7: ja_JP.JIS7 ja_JP.mscode: ja_JP.SJIS ja_JP.PCK: ja_JP.SJIS -ja_JP.SJIS: ja_JP.SJIS ja_JP.sjis: ja_JP.SJIS ja_JP.utf8: ja_JP.UTF-8 JA_JP.utf8: ja_JP.UTF-8 @@ -772,7 +757,6 @@ kw_GB.iso885915: kw_GB.ISO8859-15 kw_GB.ISO-8859-15: kw_GB.ISO8859-15 ky: ky_KG.UTF-8 ky_KG: ky_KG.UTF-8 -ky_KG.UTF-8: ky_KG.UTF-8 ky_KG.utf8: ky_KG.UTF-8 lo: lo_LA.MULELAO-1 lo_LA: lo_LA.MULELAO-1 @@ -886,14 +870,14 @@ no_NO.ISO8859-1@nynorsk: no_NO.ISO8859-1 no_NO.iso885915: no_NO.ISO8859-15 no_NO.ISO-8859-15: no_NO.ISO8859-15 no_NO.utf8: no_NO.UTF-8 -nr: nr_ZA.ISO8859-1 +nr: nr_ZA.ISO8859-1 nr_ZA: nr_ZA.ISO8859-1 -nr_ZA.iso88591: nr_ZA.ISO8859-1 +nr_ZA.iso88591: nr_ZA.ISO8859-1 nr_ZA.utf8: nr_ZA.UTF-8 nso: nso_ZA.ISO8859-15 nso_ZA: nso_ZA.ISO8859-15 -nso_ZA.iso885915: nso_ZA.ISO8859-15 -nso_ZA.utf8: nso_ZA.UTF-8 +nso_ZA.iso885915: nso_ZA.ISO8859-15 +nso_ZA.utf8: nso_ZA.UTF-8 ny: ny_NO.ISO8859-1 ny_NO: ny_NO.ISO8859-1 ny_NO.88591: ny_NO.ISO8859-1 @@ -985,11 +969,11 @@ ru_UA.cp1251: ru_UA.CP1251 ru_UA.microsoftcp1251: ru_UA.CP1251 ru_UA.microsoft-cp1251: ru_UA.CP1251 ru_UA.MICROSOFT-CP1251: ru_UA.CP1251 -rw: rw_RW.ISO8859-1 -rw_RW: rw_RW.ISO8859-1 -rw_RW.iso8859-1: rw_RW.ISO8859-1 -rw_RW.ISO-8859-1: rw_RW.ISO8859-1 -rw_RW.utf8: rw_RW.UTF-8 +rw: rw_RW.ISO8859-1 +rw_RW: rw_RW.ISO8859-1 +rw_RW.iso8859-1: rw_RW.ISO8859-1 +rw_RW.ISO-8859-1: rw_RW.ISO8859-1 +rw_RW.utf8: rw_RW.UTF-8 sd: sd_IN.UTF-8 sd_IN.utf8: sd_IN.UTF-8 sd@devanagari: sd_IN.UTF-8@devanagari @@ -997,15 +981,6 @@ sd_IN@devanagari: sd_IN.UTF-8@devanagari sd_IN.utf8@devanagari: sd_IN.UTF-8@devanagari se_NO: se_NO.UTF-8 se_NO.utf8: se_NO.UTF-8 -XCOMM sh was the old ISO code for Serbo-Croatian (now individual sr and hr). -XCOMM YU was the old ISO code for Yugoslavia (later CS for Serbia&Montenegro). -XCOMM CS was the old ISO code for Serbia&Montenegro (now separate RS and ME). -XCOMM These lines should be deleted in the future. -sh: sr_RS.UTF-8@latin -sh_BA.ISO8859-2@bosnia: sr_CS.ISO8859-2 -sh_HR.iso88592: hr_HR.ISO8859-2 -sh_YU: sr_RS.UTF-8@latin -sh_YU.utf8: sr_RS.UTF-8@latin si: si_LK.UTF-8 si_LK: si_LK.UTF-8 sk: sk_SK.ISO8859-2 @@ -1023,35 +998,24 @@ sq_AL: sq_AL.ISO8859-2 sq_AL.iso88592: sq_AL.ISO8859-2 sq_AL.ISO-8859-2: sq_AL.ISO8859-2 sq_AL.utf8: sq_AL.UTF-8 -XCOMM YU was the old ISO code for Yugoslavia (later CS for Serbia&Montenegro). -XCOMM CS was the old ISO code for Serbia&Montenegro (now separate RS and ME). -XCOMM Some of these lines should be deleted in the future. sr: sr_RS.UTF-8 -sr_YU: sr_RS.UTF-8@latin sr@cyrillic: sr_RS.UTF-8 -sr_YU@cyrillic: sr_RS.UTF-8 -sr_YU.utf8: sr_RS.UTF-8 -sr_YU.UTF-8@cyrillic: sr_RS.UTF-8 -sr_CS: sr_CS.UTF-8 -sr@Latn: sr_CS.UTF-8@latin -sr_CS@Latn: sr_CS.UTF-8@latin -sr_CS.utf8: sr_CS.UTF-8 -sr_CS.UTF-8@Latn: sr_CS.UTF-8@latin -sr_RS: sr_RS.UTF-8 sr@latin: sr_RS.UTF-8@latin -sr_RS@latin: sr_RS.UTF-8@latin -sr_RS@Latn: sr_RS.UTF-8@latin +sr@Latn: sr_RS.UTF-8@latin +sr_RS: sr_RS.UTF-8 +sr_RS@latin: sr_RS.UTF-8@latin +sr_RS@Latn: sr_RS.UTF-8@latin sr_RS.UTF-8@Latn: sr_RS.UTF-8@latin sr_RS.utf8: sr_RS.UTF-8 sr_ME: sr_ME.UTF-8 sr_ME.utf8: sr_ME.UTF-8 -ss: ss_ZA.ISO8859-1 +ss: ss_ZA.ISO8859-1 ss_ZA: ss_ZA.ISO8859-1 -ss_ZA.iso88591: ss_ZA.ISO8859-1 +ss_ZA.iso88591: ss_ZA.ISO8859-1 ss_ZA.utf8: ss_ZA.UTF-8 -st: st_ZA.ISO8859-1 +st: st_ZA.ISO8859-1 st_ZA: st_ZA.ISO8859-1 -st_ZA.iso88591: st_ZA.ISO8859-1 +st_ZA.iso88591: st_ZA.ISO8859-1 st_ZA.utf8: st_ZA.UTF-8 sv: sv_SE.ISO8859-1 sv.ISO8859-15: sv_SE.ISO8859-15 @@ -1097,9 +1061,9 @@ tl_PH: tl_PH.ISO8859-1 tl_PH.iso88591: tl_PH.ISO8859-1 tl_PH.ISO-8859-1: tl_PH.ISO8859-1 tn: tn_ZA.ISO8859-15 -tn_ZA: tn_ZA.ISO8859-15 -tn_ZA.iso8859-15: tn_ZA.ISO8859-15 -tn_ZA.utf8: tn_ZA.UTF-8 +tn_ZA: tn_ZA.ISO8859-15 +tn_ZA.iso8859-15: tn_ZA.ISO8859-15 +tn_ZA.utf8: tn_ZA.UTF-8 tr: tr_TR.ISO8859-9 tr_TR: tr_TR.ISO8859-9 TR_TR: tr_TR.ISO8859-9 @@ -1107,9 +1071,9 @@ tr_TR.iso88599: tr_TR.ISO8859-9 tr_TR.ISO-8859-9: tr_TR.ISO8859-9 tr_TR.utf8: tr_TR.UTF-8 TR_TR.utf8: tr_TR.UTF-8 -ts: ts_ZA.ISO8859-1 +ts: ts_ZA.ISO8859-1 ts_ZA: ts_ZA.ISO8859-1 -ts_ZA.iso88591: ts_ZA.ISO8859-1 +ts_ZA.iso88591: ts_ZA.ISO8859-1 ts_ZA.utf8: ts_ZA.UTF-8 tt: tt_RU.TATAR-CYR tt_RU: tt_RU.TATAR-CYR @@ -1139,8 +1103,8 @@ uz_UZ.ISO-8859-1: uz_UZ.ISO8859-1 uz_UZ@cyrillic: uz_UZ.UTF-8 uz_UZ.UTF-8@cyrillic: uz_UZ.UTF-8 ve: ve_ZA.UTF-8 -ve_ZA: ve_ZA.UTF-8 -ve_ZA.utf8: ve_ZA.UTF-8 +ve_ZA: ve_ZA.UTF-8 +ve_ZA.utf8: ve_ZA.UTF-8 vi: vi_VN.TCVN vi_VN: vi_VN.TCVN Vi_VN: vi_VN.TCVN @@ -1159,9 +1123,9 @@ wa_BE.iso885915: wa_BE.ISO8859-15 wa_BE.ISO-8859-15: wa_BE.ISO8859-15 wa_BE.ISO-8859-15@euro: wa_BE.ISO8859-15 wa_BE@euro: wa_BE.ISO8859-15 -xh: xh_ZA.ISO8859-1 +xh: xh_ZA.ISO8859-1 xh_ZA: xh_ZA.ISO8859-1 -xh_ZA.iso88591: xh_ZA.ISO8859-1 +xh_ZA.iso88591: xh_ZA.ISO8859-1 xh_ZA.utf8: xh_ZA.UTF-8 yi: yi_US.CP1255 yi_US: yi_US.CP1255 @@ -1203,9 +1167,9 @@ zh_TW.EUC: zh_TW.eucTW zh_TW.EUC-TW: zh_TW.eucTW zh_TW.utf8: zh_TW.UTF-8 ZH_TW.UTF-8: zh_TW.UTF-8 -zu: zu_ZA.ISO8859-1 +zu: zu_ZA.ISO8859-1 zu_ZA: zu_ZA.ISO8859-1 -zu_ZA.iso88591: zu_ZA.ISO8859-1 +zu_ZA.iso88591: zu_ZA.ISO8859-1 zu_ZA.utf8: zu_ZA.UTF-8 XCOMM The following locale names are used in SCO 3.0 diff --git a/lib/libX11/nls/locale.dir.pre b/lib/libX11/nls/locale.dir.pre index a8158cd21..5fb5a55f8 100644 --- a/lib/libX11/nls/locale.dir.pre +++ b/lib/libX11/nls/locale.dir.pre @@ -225,8 +225,6 @@ iso8859-2/XLC_LOCALE: sh_YU.ISO8859-2 iso8859-2/XLC_LOCALE: sk_SK.ISO8859-2 iso8859-2/XLC_LOCALE: sl_SI.ISO8859-2 iso8859-2/XLC_LOCALE: sq_AL.ISO8859-2 -iso8859-2/XLC_LOCALE: sr_CS.ISO8859-2 -iso8859-5/XLC_LOCALE: sr_CS.ISO8859-5 iso8859-2/XLC_LOCALE: sr_YU.ISO8859-2 iso8859-5/XLC_LOCALE: sr_YU.ISO8859-5 microsoft-cp1251/XLC_LOCALE: sr_YU.CP1251 @@ -379,7 +377,9 @@ en_US.UTF-8/XLC_LOCALE: hne_IN.UTF-8 en_US.UTF-8/XLC_LOCALE: hr_HR.UTF-8 en_US.UTF-8/XLC_LOCALE: hu_HU.UTF-8 en_US.UTF-8/XLC_LOCALE: hy_AM.UTF-8 +en_US.UTF-8/XLC_LOCALE: ia.UTF-8 en_US.UTF-8/XLC_LOCALE: id_ID.UTF-8 +en_US.UTF-8/XLC_LOCALE: ie.UTF-8 en_US.UTF-8/XLC_LOCALE: is_IS.UTF-8 en_US.UTF-8/XLC_LOCALE: it_CH.UTF-8 en_US.UTF-8/XLC_LOCALE: it_IT.UTF-8 @@ -439,7 +439,6 @@ en_US.UTF-8/XLC_LOCALE: si_LK.UTF-8 en_US.UTF-8/XLC_LOCALE: sk_SK.UTF-8 en_US.UTF-8/XLC_LOCALE: sl_SI.UTF-8 en_US.UTF-8/XLC_LOCALE: sq_AL.UTF-8 -en_US.UTF-8/XLC_LOCALE: sr_CS.UTF-8 en_US.UTF-8/XLC_LOCALE: sr_ME.UTF-8 en_US.UTF-8/XLC_LOCALE: sr_RS.UTF-8 en_US.UTF-8/XLC_LOCALE: sr_RS.UTF-8@latin diff --git a/lib/libX11/nls/sr_CS.UTF-8/Compose.pre b/lib/libX11/nls/sr_RS.UTF-8/Compose.pre index b2397f7b3..68699325c 100644 --- a/lib/libX11/nls/sr_CS.UTF-8/Compose.pre +++ b/lib/libX11/nls/sr_RS.UTF-8/Compose.pre @@ -1,89 +1,73 @@ include "X11_LOCALEDATADIR/en_US.UTF-8/Compose" -XCOMM Serbian accented Cyrillic +XCOMM Serbian accentable Cyrillic letters: XCOMM а А - U+0430, U+0410 Cyrillic_a, Cyrillic_A XCOMM е Е - U+0435, U+0415 Cyrillic_e, Cyrillic_E XCOMM о О - U+043E, U+041E Cyrillic_o, Cyrillic_O XCOMM у У - U+0443, U+0423 Cyrillic_u, Cyrillic_U XCOMM и И - U+0438, U+0418 Cyrillic_i, Cyrillic_I XCOMM -XCOMM ̀ - U+0300 <dead_grave>, <combining_grave>, <Multi_key> <grave> -XCOMM ́ - U+0301 <dead_acute>, <Multi_key> <acute>, <Multi_key> <apostrophe>, <combining_acute> -XCOMM ̂ - U+0302 <dead_circumflex>, <Multi_key> <asciicircum> -XCOMM ̏ - U+030F <dead_diaeresis>, <dead_doubleacute> -XCOMM ̀ - kratkouzlazni, U+0300 <dead_grave>, <combining_grave>, <Multi_key> <grave> +XCOMM Possible accents: +XCOMM ̀ - U+0300 combining grave +XCOMM ́ - U+0301 combining acute +XCOMM ̂ - U+0302 combining circumflex +XCOMM ̏ - U+030F combining doublegrave +XCOMM +XCOMM ̀ - kratkouzlazni, U+0300 combining grave <dead_grave> <Cyrillic_a> : "а̀" -<combining_grave> <Cyrillic_a> : "а̀" <Multi_key> <grave> <Cyrillic_a> : "а̀" <dead_grave> <Cyrillic_A> : "А̀" -<combining_grave> <Cyrillic_A> : "А̀" <Multi_key> <grave> <Cyrillic_A> : "А̀" <dead_grave> <Cyrillic_e> : "ѐ" -<combining_grave> <Cyrillic_e> : "ѐ" <Multi_key> <grave> <Cyrillic_e> : "ѐ" <dead_grave> <Cyrillic_E> : "Ѐ" -<combining_grave> <Cyrillic_E> : "Ѐ" <Multi_key> <grave> <Cyrillic_E> : "Ѐ" <dead_grave> <Cyrillic_i> : "ѝ" -<combining_grave> <Cyrillic_i> : "ѝ" <Multi_key> <grave> <Cyrillic_i> : "ѝ" <dead_grave> <Cyrillic_I> : "Ѝ" -<combining_grave> <Cyrillic_I> : "Ѝ" <Multi_key> <grave> <Cyrillic_I> : "Ѝ" <dead_grave> <Cyrillic_o> : "о̀" -<combining_grave> <Cyrillic_o> : "о̀" <Multi_key> <grave> <Cyrillic_o> : "о̀" <dead_grave> <Cyrillic_O> : "О̀" -<combining_grave> <Cyrillic_O> : "О̀" <Multi_key> <grave> <Cyrillic_O> : "О̀" <dead_grave> <Cyrillic_u> : "у̀" -<combining_grave> <Cyrillic_u> : "у̀" <Multi_key> <grave> <Cyrillic_u> : "у̀" <dead_grave> <Cyrillic_U> : "У̀" -<combining_grave> <Cyrillic_U> : "У̀" <Multi_key> <grave> <Cyrillic_U> : "У̀" -XCOMM ́ - dugouzlazni, U+0301 <dead_acute>, <Multi_key> <acute>, <Multi_key> <apostrophe>, <combining_acute> +XCOMM +XCOMM ́ - dugouzlazni, U+0301 combining acute <dead_acute> <Cyrillic_a> : "а́" -<combining_acute> <Cyrillic_a> : "а́" <Multi_key> <acute> <Cyrillic_a> : "а́" <Multi_key> <apostrophe> <Cyrillic_a> : "а́" <dead_acute> <Cyrillic_A> : "А́" -<combining_acute> <Cyrillic_A> : "А́" <Multi_key> <acute> <Cyrillic_A> : "А́" <Multi_key> <apostrophe> <Cyrillic_A> : "А́" <dead_acute> <Cyrillic_e> : "е́" -<combining_acute> <Cyrillic_e> : "е́" <Multi_key> <acute> <Cyrillic_e> : "е́" <Multi_key> <apostrophe> <Cyrillic_e> : "е́" <dead_acute> <Cyrillic_E> : "Е́" -<combining_acute> <Cyrillic_E> : "Е́" <Multi_key> <acute> <Cyrillic_E> : "Е́" <Multi_key> <apostrophe> <Cyrillic_E> : "Е́" <dead_acute> <Cyrillic_i> : "и́" -<combining_acute> <Cyrillic_i> : "и́" <Multi_key> <acute> <Cyrillic_i> : "и́" <Multi_key> <apostrophe> <Cyrillic_i> : "и́" <dead_acute> <Cyrillic_I> : "И́" -<combining_acute> <Cyrillic_I> : "И́" <Multi_key> <acute> <Cyrillic_I> : "И́" <Multi_key> <apostrophe> <Cyrillic_I> : "И́" <dead_acute> <Cyrillic_o> : "о́" -<combining_acute> <Cyrillic_o> : "о́" <Multi_key> <acute> <Cyrillic_o> : "о́" <Multi_key> <apostrophe> <Cyrillic_o> : "о́" <dead_acute> <Cyrillic_O> : "О́" -<combining_acute> <Cyrillic_O> : "О́" <Multi_key> <acute> <Cyrillic_O> : "О́" <Multi_key> <apostrophe> <Cyrillic_O> : "О́" <dead_acute> <Cyrillic_u> : "у́" -<combining_acute> <Cyrillic_u> : "у́" <Multi_key> <acute> <Cyrillic_u> : "у́" <Multi_key> <apostrophe> <Cyrillic_u> : "у́" <dead_acute> <Cyrillic_U> : "У́" -<combining_acute> <Cyrillic_U> : "У́" <Multi_key> <acute> <Cyrillic_U> : "У́" <Multi_key> <apostrophe> <Cyrillic_U> : "У́" -XCOMM ̂ - dugosilazni, U+0302 <dead_circumflex>, <Multi_key> <asciicircum> +XCOMM +XCOMM ̂ - dugosilazni, U+0302 combining circumflex <dead_circumflex> <Cyrillic_a> : "а̂" <Multi_key> <asciicircum> <Cyrillic_a> : "а̂" <dead_circumflex> <Cyrillic_A> : "А̂" @@ -104,8 +88,9 @@ XCOMM ̂ - dugosilazni, U+0302 <dead_circumflex>, <Multi_key> <asciicircum> <Multi_key> <asciicircum> <Cyrillic_u> : "у̂" <dead_circumflex> <Cyrillic_U> : "У̂" <Multi_key> <asciicircum> <Cyrillic_U> : "У̂" -XCOMM ̏ - kratkosilazni, U+030F <dead_diaeresis>, <dead_doubleacute> -XCOMM there's no appropriate dead_doublegrave, so we use these two dead keys +XCOMM +XCOMM ̏ - kratkosilazni, U+030F combining doublegrave +XCOMM there's no dead_doublegrave, so we use two vaguely similar dead keys <dead_diaeresis> <Cyrillic_a> : "а̏" <dead_doubleacute> <Cyrillic_a> : "а̏" <dead_diaeresis> <Cyrillic_A> : "А̏" diff --git a/lib/libX11/nls/sr_CS.UTF-8/XI18N_OBJS b/lib/libX11/nls/sr_RS.UTF-8/XI18N_OBJS index f201bf435..f201bf435 100644 --- a/lib/libX11/nls/sr_CS.UTF-8/XI18N_OBJS +++ b/lib/libX11/nls/sr_RS.UTF-8/XI18N_OBJS diff --git a/lib/libX11/nls/sr_CS.UTF-8/XLC_LOCALE.pre b/lib/libX11/nls/sr_RS.UTF-8/XLC_LOCALE.pre index e69de29bb..e69de29bb 100644 --- a/lib/libX11/nls/sr_CS.UTF-8/XLC_LOCALE.pre +++ b/lib/libX11/nls/sr_RS.UTF-8/XLC_LOCALE.pre diff --git a/lib/libX11/nls/th_TH.UTF-8/XLC_LOCALE.pre b/lib/libX11/nls/th_TH.UTF-8/XLC_LOCALE.pre index f79091ad5..6f766430c 100644 --- a/lib/libX11/nls/th_TH.UTF-8/XLC_LOCALE.pre +++ b/lib/libX11/nls/th_TH.UTF-8/XLC_LOCALE.pre @@ -1,7 +1,7 @@ XCOMM XLocale Database Sample for th_TH XCOMM XCOMM -XCOMM Modified from origial th_TH.TACTIS +XCOMM Modified from original th_TH.TACTIS XCOMM XCOMM XLC_FONTSET category diff --git a/lib/libX11/nls/th_TH/XLC_LOCALE.pre b/lib/libX11/nls/th_TH/XLC_LOCALE.pre index 3508c28ee..b2de63344 100644 --- a/lib/libX11/nls/th_TH/XLC_LOCALE.pre +++ b/lib/libX11/nls/th_TH/XLC_LOCALE.pre @@ -1,7 +1,7 @@ XCOMM XLocale Database Sample for th_TH XCOMM XCOMM -XCOMM Modified from origial th_TH.TACTIS +XCOMM Modified from original th_TH.TACTIS XCOMM XCOMM XLC_FONTSET category diff --git a/lib/libX11/specs/Makefile.in b/lib/libX11/specs/Makefile.in index 93af375a9..2c61e9abc 100644 --- a/lib/libX11/specs/Makefile.in +++ b/lib/libX11/specs/Makefile.in @@ -76,9 +76,10 @@ subdir = specs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -319,6 +320,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/specs/XIM/Makefile.in b/lib/libX11/specs/XIM/Makefile.in index 57ccf648e..33f53e5e8 100644 --- a/lib/libX11/specs/XIM/Makefile.in +++ b/lib/libX11/specs/XIM/Makefile.in @@ -77,9 +77,10 @@ DIST_COMMON = $(am__dist_shelf_DATA_DIST) $(srcdir)/Makefile.am \ subdir = specs/XIM ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -312,6 +313,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/specs/XIM/xim.xml b/lib/libX11/specs/XIM/xim.xml index 131719704..60bf7be5e 100644 --- a/lib/libX11/specs/XIM/xim.xml +++ b/lib/libX11/specs/XIM/xim.xml @@ -31,12 +31,12 @@ <abstract> <para> -This specifies a protocol between IM library and IM (Input Method) Server for internationalized text input, which is indepedent from any specific language, any specific input method and the transport layer used in communication between the IM library and the IM Server, and uses a client-server model. This protocol allows user to use his/her favorite method for all applications within the stand-along distrubuted environment. +This specifies a protocol between IM library and IM (Input Method) Server for internationalized text input, which is independent from any specific language, any specific input method and the transport layer used in communication between the IM library and the IM Server, and uses a client-server model. This protocol allows user to use his/her favorite method for all applications within the stand-along distributed environment. </para> </abstract> <legalnotice> -<para>Permission to use,copy and distribute this documetation for any purpose +<para>Permission to use, copy and distribute this documentation for any purpose and without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. Fujitsu and Sun Microsystems make no representation about the suitability for any purpose of the information in this document. @@ -978,7 +978,7 @@ A client must send message as the first message on the connection. The list specifies the names of authentication protocols the sending IM Server is willing to perform. -(If the client need not authenticate, the list may be omited.) +(If the client need not authenticate, the list may be omitted.) </para> <para> @@ -1123,7 +1123,7 @@ If <emphasis remap='I'>client_ask</emphasis> -> <emphasis remap='I'>client_wa </para> <para> If <emphasis remap='I'>client_no_check</emphasis>, -client-auth-protocol-names may be omited -> <emphasis remap='I'>client_wait2</emphasis> +client-auth-protocol-names may be omitted -> <emphasis remap='I'>client_wait2</emphasis> </para> </listitem> </varlistentry> @@ -1569,7 +1569,7 @@ XIM_ENCODING_NEGOTIATION_REPLY (IM Server -> IM library) 2 CARD16 category of the encoding determined. #0 name #1 detailed data - 2 INT16 index of the encoding determinated. + 2 INT16 index of the encoding determined. 2 unused </literallayout> diff --git a/lib/libX11/specs/XKB/Makefile.in b/lib/libX11/specs/XKB/Makefile.in index 5d7451363..dc18eeec3 100644 --- a/lib/libX11/specs/XKB/Makefile.in +++ b/lib/libX11/specs/XKB/Makefile.in @@ -77,9 +77,10 @@ DIST_COMMON = $(am__dist_shelf_DATA_DIST) $(srcdir)/Makefile.am \ subdir = specs/XKB ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -319,6 +320,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/specs/XKB/ch13.xml b/lib/libX11/specs/XKB/ch13.xml index 458a260d6..0f65e9c66 100644 --- a/lib/libX11/specs/XKB/ch13.xml +++ b/lib/libX11/specs/XKB/ch13.xml @@ -2356,7 +2356,7 @@ To add a row to an existing overlay, use </term> <listitem> <para> - row to be overlayed in the section <parameter>overlay</parameter> + row to be overlaid in the section <parameter>overlay</parameter> overlays </para> </listitem> diff --git a/lib/libX11/specs/i18n/Makefile.in b/lib/libX11/specs/i18n/Makefile.in index eb59bce3a..903061cd0 100644 --- a/lib/libX11/specs/i18n/Makefile.in +++ b/lib/libX11/specs/i18n/Makefile.in @@ -76,9 +76,10 @@ subdir = specs/i18n DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -319,6 +320,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/specs/i18n/compose/Makefile.in b/lib/libX11/specs/i18n/compose/Makefile.in index 02c38423c..6e799c61f 100644 --- a/lib/libX11/specs/i18n/compose/Makefile.in +++ b/lib/libX11/specs/i18n/compose/Makefile.in @@ -81,9 +81,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ subdir = specs/i18n/compose ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -313,6 +314,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/specs/i18n/compose/compose-chart.pl b/lib/libX11/specs/i18n/compose/compose-chart.pl index e2ac8509f..a96dfee58 100644 --- a/lib/libX11/specs/i18n/compose/compose-chart.pl +++ b/lib/libX11/specs/i18n/compose/compose-chart.pl @@ -147,7 +147,7 @@ sub make_compose_chart { chomp($cl); if ($cl =~ m{^\s*#\s*(.*)$}) { # Comment only lines - # Combine commment blocks + # Combine comment blocks my $comment = $1; if ($in_comment) { diff --git a/lib/libX11/specs/i18n/framework/Makefile.in b/lib/libX11/specs/i18n/framework/Makefile.in index 854313d24..cba425d99 100644 --- a/lib/libX11/specs/i18n/framework/Makefile.in +++ b/lib/libX11/specs/i18n/framework/Makefile.in @@ -77,9 +77,10 @@ DIST_COMMON = $(am__dist_shelf_DATA_DIST) $(srcdir)/Makefile.am \ subdir = specs/i18n/framework ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -310,6 +311,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/specs/i18n/framework/framework.xml b/lib/libX11/specs/i18n/framework/framework.xml index c2aad8a19..eebbce60a 100644 --- a/lib/libX11/specs/i18n/framework/framework.xml +++ b/lib/libX11/specs/i18n/framework/framework.xml @@ -265,7 +265,7 @@ dependent information, handling charset, converting text, etc. </para> <para> -As a result of using these APIs instead of accessing vender private +As a result of using these APIs instead of accessing vendor private extension of the locale object, we can keep locale, IM and OM independently each other. </para> diff --git a/lib/libX11/specs/i18n/localedb/Makefile.in b/lib/libX11/specs/i18n/localedb/Makefile.in index e5707d700..cdce43e13 100644 --- a/lib/libX11/specs/i18n/localedb/Makefile.in +++ b/lib/libX11/specs/i18n/localedb/Makefile.in @@ -77,9 +77,10 @@ DIST_COMMON = $(am__dist_shelf_DATA_DIST) $(srcdir)/Makefile.am \ subdir = specs/i18n/localedb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -310,6 +311,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/specs/i18n/trans/Makefile.in b/lib/libX11/specs/i18n/trans/Makefile.in index 45da07771..c07a98095 100644 --- a/lib/libX11/specs/i18n/trans/Makefile.in +++ b/lib/libX11/specs/i18n/trans/Makefile.in @@ -77,9 +77,10 @@ DIST_COMMON = $(am__dist_shelf_DATA_DIST) $(srcdir)/Makefile.am \ subdir = specs/i18n/trans ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -310,6 +311,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/specs/libX11/AppC.xml b/lib/libX11/specs/libX11/AppC.xml index b48aa083a..c787a8f05 100644 --- a/lib/libX11/specs/libX11/AppC.xml +++ b/lib/libX11/specs/libX11/AppC.xml @@ -3218,7 +3218,7 @@ the natural alignment in the data stream. You must pad structures out to 32-bit boundaries. Pad information does not have to be zeroed unless you want to preserve such fields for future use in your protocol requests, -but it is recommended to zero it to avoid inadvertant data leakage +but it is recommended to zero it to avoid inadvertent data leakage and improve compressability. Floating point varies radically between machines and should be avoided completely if at all possible. diff --git a/lib/libX11/specs/libX11/CH01.xml b/lib/libX11/specs/libX11/CH01.xml index 26009f2fa..4e1b8a8f0 100644 --- a/lib/libX11/specs/libX11/CH01.xml +++ b/lib/libX11/specs/libX11/CH01.xml @@ -184,7 +184,7 @@ as defined in the file <indexterm><primary>Headers</primary><secondary><filename class="headerfile"><X11/X.h></filename></secondary></indexterm> These resources are created by requests and are destroyed (or freed) by requests or when connections are closed. -Most of these resources are potentially sharable between +Most of these resources are potentially shareable between applications, and in fact, windows are manipulated explicitly by window manager programs. Fonts and cursors are shared automatically across multiple screens. diff --git a/lib/libX11/specs/libX11/CH13.xml b/lib/libX11/specs/libX11/CH13.xml index 6e2fae651..5ca597907 100644 --- a/lib/libX11/specs/libX11/CH13.xml +++ b/lib/libX11/specs/libX11/CH13.xml @@ -4845,7 +4845,7 @@ convenience to the user. For example, a user tends to mistype the commit key while preediting. In that case, some input methods provide a special key sequence to request a ``reconvert'' operation on the -committed string, similiar to the undo facility provided by most +committed string, similar to the undo facility provided by most text editors. Another example is where the user is proofreading a document that has some misconversions from preediting and wants to correct @@ -6924,7 +6924,7 @@ The following keys apply to these tables. <thead> <row rowsep='1'> <entry><acronym>XIC</acronym> Value</entry> - <entry>Geometry Mangement</entry> + <entry>Geometry Management</entry> <entry>Preedit Callback</entry> <entry>Preedit Position</entry> <entry>Input Style Preedit Area</entry> diff --git a/lib/libX11/specs/libX11/CH14.xml b/lib/libX11/specs/libX11/CH14.xml index ce1ada087..03bb85c26 100644 --- a/lib/libX11/specs/libX11/CH14.xml +++ b/lib/libX11/specs/libX11/CH14.xml @@ -2336,7 +2336,7 @@ structure contains: #define USPosition (1L<<0) /* user specified x,y */ #define USSize (1L<<1) /* user specified width,height */ -#define PPosition (1L<<2) /* program specified posistion */ +#define PPosition (1L<<2) /* program specified position */ #define PSize (1L<<3) /* program specified size */ #define PMinSize (1L<<4) /* program specified minimum size */ #define PMaxSize (1L<<5) /* program specified maximum size */ diff --git a/lib/libX11/specs/libX11/Makefile.in b/lib/libX11/specs/libX11/Makefile.in index cb5831a21..6f3039b60 100644 --- a/lib/libX11/specs/libX11/Makefile.in +++ b/lib/libX11/specs/libX11/Makefile.in @@ -77,9 +77,10 @@ DIST_COMMON = $(am__dist_shelf_DATA_DIST) $(srcdir)/Makefile.am \ subdir = specs/libX11 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -313,6 +314,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/src/Context.c b/lib/libX11/src/Context.c index 8a078713a..a2f9e1255 100644 --- a/lib/libX11/src/Context.c +++ b/lib/libX11/src/Context.c @@ -146,13 +146,14 @@ static void _XFreeContextDB(Display *display) Xfree(db->table); _XFreeMutex(&db->linfo); Xfree(db); + display->context_db = NULL; } } /* Public routines. */ /* Save the given value of data to correspond with the keys XID and context. - Returns nonzero error code if an error has occured, 0 otherwise. + Returns nonzero error code if an error has occurred, 0 otherwise. Possible errors are Out-of-memory. */ @@ -230,7 +231,7 @@ int XSaveContext( /* Given an XID and context, returns the associated data. Note that data here is a pointer since it is a return value. Returns nonzero error code - if an error has occured, 0 otherwise. Possible errors are Entry-not-found. + if an error has occurred, 0 otherwise. Possible errors are Entry-not-found. */ int XFindContext(Display *display, XID rid, XContext context, XPointer *data) diff --git a/lib/libX11/src/CopyCmap.c b/lib/libX11/src/CopyCmap.c index b4954b016..b37aba733 100644 --- a/lib/libX11/src/CopyCmap.c +++ b/lib/libX11/src/CopyCmap.c @@ -53,6 +53,11 @@ Colormap XCopyColormapAndFree( mid = req->mid = XAllocID(dpy); req->srcCmap = src_cmap; + /* re-lock the display to keep XID handling in sync */ + UnlockDisplay(dpy); + SyncHandle(); + LockDisplay(dpy); + #if XCMS _XcmsCopyCmapRecAndFree(dpy, src_cmap, mid); #endif diff --git a/lib/libX11/src/ErrDes.c b/lib/libX11/src/ErrDes.c index ef5edad6c..aa62e2278 100644 --- a/lib/libX11/src/ErrDes.c +++ b/lib/libX11/src/ErrDes.c @@ -204,9 +204,9 @@ XGetErrorDatabaseText( result.addr = (XPointer)NULL; if (!result.addr) { result.addr = (XPointer) defaultp; - result.size = strlen(defaultp) + 1; + result.size = (unsigned)strlen(defaultp) + 1; } - (void) strncpy (buffer, (char *) result.addr, nbytes); + (void) strncpy (buffer, (char *) result.addr, (size_t)nbytes); if (result.size > nbytes) buffer[nbytes-1] = '\0'; return 0; } diff --git a/lib/libX11/src/ErrHndlr.c b/lib/libX11/src/ErrHndlr.c index 167a68b1e..0664ea936 100644 --- a/lib/libX11/src/ErrHndlr.c +++ b/lib/libX11/src/ErrHndlr.c @@ -84,3 +84,28 @@ XSetIOErrorHandler(XIOErrorHandler handler) return (XIOErrorHandler) oldhandler; } + +/* + * XSetIOErrorExitHandler - This procedure sets the X fatal I/O error + * exit function to be the specified routine. If NULL is passed in + * the original error exit function is restored. The default routine + * calls exit(3). + */ +void +XSetIOErrorExitHandler( + Display *dpy, + XIOErrorExitHandler handler, + void *user_data) +{ + LockDisplay(dpy); + + if (handler != NULL) { + dpy->exit_handler = handler; + dpy->exit_handler_data = user_data; + } + else { + dpy->exit_handler = _XDefaultIOErrorExit; + dpy->exit_handler_data = NULL; + } + UnlockDisplay(dpy); +} diff --git a/lib/libX11/src/FSWrap.c b/lib/libX11/src/FSWrap.c index d4cdbf730..064de5021 100644 --- a/lib/libX11/src/FSWrap.c +++ b/lib/libX11/src/FSWrap.c @@ -117,7 +117,7 @@ _XParseBaseFontNameList( Xfree(psave); return (char **)NULL; } - memcpy((char *)list, (char *)plist, sizeof(char *) * (*num)); + memcpy((char *)list, (char *)plist, sizeof(char *) * (size_t) (*num)); *(list + *num) = NULL; return list; @@ -141,7 +141,7 @@ copy_string_list( list_src = string_list; count = list_count; for (length = 0; count-- > 0; list_src++) - length += strlen(*list_src) + 1; + length = length + (int) strlen(*list_src) + 1; dst = Xmalloc(length); if (dst == NULL) { diff --git a/lib/libX11/src/FetchName.c b/lib/libX11/src/FetchName.c index 160eb5bd6..d8a01b14c 100644 --- a/lib/libX11/src/FetchName.c +++ b/lib/libX11/src/FetchName.c @@ -51,7 +51,7 @@ Status XFetchName ( } if ( (actual_type == XA_STRING) && (actual_format == 8) ) { - /* The data returned by XGetWindowProperty is guarranteed to + /* The data returned by XGetWindowProperty is guaranteed to contain one extra byte that is null terminated to make retrieveing string properties easy. */ @@ -82,7 +82,7 @@ Status XGetIconName ( } if ( (actual_type == XA_STRING) && (actual_format == 8) ) { - /* The data returned by XGetWindowProperty is guarranteed to + /* The data returned by XGetWindowProperty is guaranteed to contain one extra byte that is null terminated to make retrieveing string properties easy. */ diff --git a/lib/libX11/src/Font.c b/lib/libX11/src/Font.c index 09d2ae917..d4ebdaca4 100644 --- a/lib/libX11/src/Font.c +++ b/lib/libX11/src/Font.c @@ -107,7 +107,7 @@ XFontStruct *XLoadQueryFont( LockDisplay(dpy); GetReq(OpenFont, req); seq = dpy->request; /* Can't use extended sequence number here */ - nbytes = req->nbytes = name ? strlen(name) : 0; + nbytes = req->nbytes = (CARD16) (name ? strlen(name) : 0); req->fid = fid = XAllocID(dpy); req->length += (nbytes+3)>>2; Data (dpy, name, nbytes); @@ -662,7 +662,7 @@ int _XF86LoadQueryLocaleFont( if (!name) return 0; - l = strlen(name); + l = (int) strlen(name); if (l < 2 || name[l - 1] != '*' || name[l - 2] != '-') return 0; charset = NULL; @@ -679,7 +679,7 @@ int _XF86LoadQueryLocaleFont( return 0; if (_XlcNCompareISOLatin1(name + l - 2 - (p - charset), charset, p - charset)) return 0; - if (strlen(p + 1) + l - 1 >= sizeof(buf) - 1) + if (strlen(p + 1) + (size_t) l - 1 >= sizeof(buf) - 1) return 0; strcpy(buf, name); strcpy(buf + l - 1, p + 1); diff --git a/lib/libX11/src/FontInfo.c b/lib/libX11/src/FontInfo.c index f870e4310..694efa109 100644 --- a/lib/libX11/src/FontInfo.c +++ b/lib/libX11/src/FontInfo.c @@ -61,7 +61,7 @@ XFontStruct **info) /* RETURN */ LockDisplay(dpy); GetReq(ListFontsWithInfo, req); req->maxNames = maxNames; - nbytes = req->nbytes = pattern ? strlen (pattern) : 0; + nbytes = req->nbytes = pattern ? (CARD16) strlen (pattern) : 0; req->length += (nbytes + 3) >> 2; _XSend (dpy, pattern, nbytes); /* use _XSend instead of Data, since subsequent _XReply will flush buffer */ diff --git a/lib/libX11/src/FontNames.c b/lib/libX11/src/FontNames.c index b78792d6f..30912925c 100644 --- a/lib/libX11/src/FontNames.c +++ b/lib/libX11/src/FontNames.c @@ -54,7 +54,7 @@ int *actualCount) /* RETURN */ LockDisplay(dpy); GetReq(ListFonts, req); req->maxNames = maxNames; - nbytes = req->nbytes = pattern ? strlen (pattern) : 0; + nbytes = req->nbytes = pattern ? (CARD16) strlen (pattern) : 0; req->length += (nbytes + 3) >> 2; _XSend (dpy, pattern, nbytes); /* use _XSend instead of Data, since following _XReply will flush buffer */ diff --git a/lib/libX11/src/GetColor.c b/lib/libX11/src/GetColor.c index cd0eb9f63..d088497f1 100644 --- a/lib/libX11/src/GetColor.c +++ b/lib/libX11/src/GetColor.c @@ -83,7 +83,7 @@ XColor *exact_def) /* RETURN */ GetReq(AllocNamedColor, req); req->cmap = cmap; - nbytes = req->nbytes = strlen(colorname); + nbytes = req->nbytes = (CARD16) strlen(colorname); req->length += (nbytes + 3) >> 2; /* round up to mult of 4 */ _XSend(dpy, colorname, nbytes); diff --git a/lib/libX11/src/GetDflt.c b/lib/libX11/src/GetDflt.c index 496253065..c9222a2a5 100644 --- a/lib/libX11/src/GetDflt.c +++ b/lib/libX11/src/GetDflt.c @@ -141,7 +141,7 @@ InitDefaults( if (dpy->xdefaults == NULL) { const char *slashDotXdefaults = "/.Xdefaults"; - (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaults) - 1); + (void) GetHomeDir (fname, (int) (PATH_MAX - strlen (slashDotXdefaults) - 1)); (void) strcat (fname, slashDotXdefaults); xdb = XrmGetFileDatabase (fname); } else { @@ -152,9 +152,9 @@ InitDefaults( const char *slashDotXdefaultsDash = "/.Xdefaults-"; int len; - (void) GetHomeDir (fname, PATH_MAX - strlen (slashDotXdefaultsDash) - 1); + (void) GetHomeDir (fname, (int) (PATH_MAX - strlen (slashDotXdefaultsDash) - 1)); (void) strcat (fname, slashDotXdefaultsDash); - len = strlen (fname); + len = (int) strlen (fname); (void) _XGetHostname (fname+len, PATH_MAX-len); xenv = fname; } diff --git a/lib/libX11/src/GetHints.c b/lib/libX11/src/GetHints.c index f2e1d5676..974dfc30a 100644 --- a/lib/libX11/src/GetHints.c +++ b/lib/libX11/src/GetHints.c @@ -315,14 +315,14 @@ XGetClassHint( return (0); if ( (actual_type == XA_STRING) && (actual_format == 8) ) { - len_name = strlen((char *) data); + len_name = (int) strlen((char *) data); if (! (classhint->res_name = Xmalloc(len_name + 1))) { Xfree(data); return (0); } strcpy(classhint->res_name, (char *) data); if (len_name == nitems) len_name--; - len_class = strlen((char *) (data+len_name+1)); + len_class = (int) strlen((char *) (data+len_name+1)); if (! (classhint->res_class = Xmalloc(len_class + 1))) { Xfree(classhint->res_name); classhint->res_name = (char *) NULL; diff --git a/lib/libX11/src/GetImage.c b/lib/libX11/src/GetImage.c index 44a576a1b..1a67ca6f6 100644 --- a/lib/libX11/src/GetImage.c +++ b/lib/libX11/src/GetImage.c @@ -34,15 +34,24 @@ in this Software without prior written authorization from The Open Group. #define ROUNDUP(nbytes, pad) (((((nbytes) - 1) + (pad)) / (pad)) * (pad)) -static unsigned int Ones( /* HACKMEM 169 */ - unsigned long mask) +#ifdef HAVE___BUILTIN_POPCOUNTL +# define Ones __builtin_popcountl +#else +/* + * Count the number of bits set to 1 in a 32-bit word. + * Algorithm from MIT AI Lab Memo 239: "HAKMEM", ITEM 169. + * http://dspace.mit.edu/handle/1721.1/6086 + */ +static inline unsigned int +Ones(unsigned long mask) { register unsigned long y; - y = (mask >> 1) &033333333333; + y = (mask >> 1) & 033333333333; y = mask - y - ((y >>1) & 033333333333); return ((unsigned int) (((y + (y >> 3)) & 030707070707) % 077)); } +#endif XImage *XGetImage ( register Display *dpy, diff --git a/lib/libX11/src/GetStCmap.c b/lib/libX11/src/GetStCmap.c index 1cb1e0f01..74281254c 100644 --- a/lib/libX11/src/GetStCmap.c +++ b/lib/libX11/src/GetStCmap.c @@ -1,4 +1,3 @@ - /*********************************************************** Copyright 1987, 1998 The Open Group @@ -111,7 +110,7 @@ Status XGetStandardColormap ( cmap->blue_mult = use->blue_mult; cmap->base_pixel = use->base_pixel; - Xfree (stdcmaps); /* don't need alloced memory */ + Xfree (stdcmaps); /* don't need allocated memory */ } return stat; } diff --git a/lib/libX11/src/GetWAttrs.c b/lib/libX11/src/GetWAttrs.c index 0f5f7bb89..0775eabc8 100644 --- a/lib/libX11/src/GetWAttrs.c +++ b/lib/libX11/src/GetWAttrs.c @@ -87,7 +87,7 @@ _XWAttrsHandler( Status _XGetWindowAttributes( - register Display *dpy, + Display *dpy, Window w, XWindowAttributes *attr) { diff --git a/lib/libX11/src/Host.c b/lib/libX11/src/Host.c index b07c9c312..e2b7d57d7 100644 --- a/lib/libX11/src/Host.c +++ b/lib/libX11/src/Host.c @@ -90,11 +90,11 @@ changehost (Display *dpy, XHostAddress *host, BYTE mode) req->hostLength = addrlen; if (siAddr) { char *dest = (char *) NEXTPTR(req,xChangeHostsReq); - memcpy(dest, siAddr->type, siAddr->typelength); + memcpy(dest, siAddr->type, (size_t) siAddr->typelength); dest[siAddr->typelength] = '\0'; - memcpy(dest + siAddr->typelength + 1,siAddr->value,siAddr->valuelength); + memcpy(dest + siAddr->typelength + 1,siAddr->value,(size_t) siAddr->valuelength); } else { - memcpy((char *) NEXTPTR(req,xChangeHostsReq), host->address, addrlen); + memcpy((char *) NEXTPTR(req,xChangeHostsReq), host->address, (size_t) addrlen); } UnlockDisplay(dpy); SyncHandle(); diff --git a/lib/libX11/src/ImUtil.c b/lib/libX11/src/ImUtil.c index 0d996e8ec..36f08a033 100644 --- a/lib/libX11/src/ImUtil.c +++ b/lib/libX11/src/ImUtil.c @@ -269,7 +269,7 @@ static void _putbits( * valid, and reinit the functions if not. */ void _XInitImageFuncPtrs ( - register XImage *image) + XImage *image) { image->f.create_image = XCreateImage; image->f.destroy_image = _XDestroyImage; @@ -918,9 +918,9 @@ static XImage *_XSubImage ( int _XSetImage( XImage *srcimg, - register XImage *dstimg, - register int x, - register int y) + XImage *dstimg, + int x, + int y) { register unsigned long pixel; register int row, col; diff --git a/lib/libX11/src/IntAtom.c b/lib/libX11/src/IntAtom.c index d9c6c588e..0dcb9eccc 100644 --- a/lib/libX11/src/IntAtom.c +++ b/lib/libX11/src/IntAtom.c @@ -50,6 +50,7 @@ _XFreeAtomTable(Display *dpy) Xfree(e); } Xfree(dpy->atoms); + dpy->atoms = NULL; } } diff --git a/lib/libX11/src/KeyBind.c b/lib/libX11/src/KeyBind.c index d7c78b37e..4809ff622 100644 --- a/lib/libX11/src/KeyBind.c +++ b/lib/libX11/src/KeyBind.c @@ -466,6 +466,8 @@ UCSConvertCase( register unsigned code, *upper = 0x0178; else if (code == 0x00b5) /* micro sign */ *upper = 0x039c; + else if (code == 0x00df) /* ssharp */ + *upper = 0x1e9e; return; } @@ -595,6 +597,8 @@ UCSConvertCase( register unsigned code, } else if (code == 0x1e9b) *upper = 0x1e60; + else if (code == 0x1e9e) + *lower = 0x00df; /* ssharp */ } /* Greek Extended, U+1F00 to U+1FFF */ @@ -737,8 +741,9 @@ XConvertCase( *upper -= (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent); else if (sym >= XK_Greek_ALPHA && sym <= XK_Greek_OMEGA) *lower += (XK_Greek_alpha - XK_Greek_ALPHA); - else if (sym >= XK_Greek_alpha && sym <= XK_Greek_omega && - sym != XK_Greek_finalsmallsigma) + else if (sym == XK_Greek_finalsmallsigma) + *upper = XK_Greek_SIGMA; + else if (sym >= XK_Greek_alpha && sym <= XK_Greek_omega) *upper -= (XK_Greek_alpha - XK_Greek_ALPHA); break; case 0x13: /* Latin 9 */ @@ -832,7 +837,7 @@ _XTranslateKeySym( if (((modifiers & AllMods) == p->state) && (symbol == p->key)) { length = p->len; if (length > nbytes) length = nbytes; - memcpy (buffer, p->string, length); + memcpy (buffer, p->string, (size_t) length); return length; } } @@ -906,6 +911,7 @@ _XFreeKeyBindings( Xfree(p->modifiers); Xfree(p); } + dpy->key_bindings = NULL; } int @@ -941,9 +947,9 @@ XRebindKeysym ( dpy->key_bindings = p; dpy->free_funcs->key_bindings = _XFreeKeyBindings; p->next = tmp; /* chain onto list */ - memcpy (p->string, str, nbytes); + memcpy (p->string, str, (size_t) nbytes); p->len = nbytes; - memcpy ((char *) p->modifiers, (char *) mlist, nb); + memcpy ((char *) p->modifiers, (char *) mlist, (size_t) nb); p->key = keysym; p->mlen = nm; ComputeMaskFromKeytrans(dpy, p); diff --git a/lib/libX11/src/KeysymStr.c b/lib/libX11/src/KeysymStr.c index c7c470468..8fe1bd644 100644 --- a/lib/libX11/src/KeysymStr.c +++ b/lib/libX11/src/KeysymStr.c @@ -109,7 +109,7 @@ char *XKeysymToString(KeySym ks) snprintf(buf, sizeof(buf), "%lX", ks); resval.addr = (XPointer)buf; - resval.size = strlen(buf) + 1; + resval.size = (unsigned)strlen(buf) + 1; data.name = (char *)NULL; data.type = XrmPermStringToQuark("String"); data.value = &resval; diff --git a/lib/libX11/src/LoadFont.c b/lib/libX11/src/LoadFont.c index f547976ba..0a3809a8d 100644 --- a/lib/libX11/src/LoadFont.c +++ b/lib/libX11/src/LoadFont.c @@ -43,7 +43,7 @@ XLoadFont ( LockDisplay(dpy); GetReq(OpenFont, req); - nbytes = req->nbytes = name ? strlen(name) : 0; + nbytes = req->nbytes = name ? (CARD16) strlen(name) : 0; req->fid = fid = XAllocID(dpy); req->length += (nbytes+3)>>2; Data (dpy, name, nbytes); diff --git a/lib/libX11/src/LookupCol.c b/lib/libX11/src/LookupCol.c index f7f969f56..9608d5121 100644 --- a/lib/libX11/src/LookupCol.c +++ b/lib/libX11/src/LookupCol.c @@ -78,7 +78,7 @@ XLookupColor ( * for parsing. */ - n = strlen (spec); + n = (int) strlen (spec); LockDisplay(dpy); GetReq (LookupColor, req); req->cmap = cmap; diff --git a/lib/libX11/src/Makefile.am b/lib/libX11/src/Makefile.am index 7430bf410..634b75f9b 100644 --- a/lib/libX11/src/Makefile.am +++ b/lib/libX11/src/Makefile.am @@ -364,7 +364,7 @@ if XKB USE_XKB_LIBS = $(XKB_LIBS) endif -libX11_la_LDFLAGS = -version-number 6:3:0 -no-undefined +libX11_la_LDFLAGS = -version-number 6:4:0 -no-undefined libX11_la_LIBADD = \ $(LTLIBOBJS) \ diff --git a/lib/libX11/src/Makefile.in b/lib/libX11/src/Makefile.in index dc62ad0a8..c40629e2a 100644 --- a/lib/libX11/src/Makefile.in +++ b/lib/libX11/src/Makefile.in @@ -63,9 +63,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/config.h.in $(top_srcdir)/depcomp reallocarray.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -486,6 +487,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -607,7 +609,7 @@ libX11_xcb_la_LDFLAGS = -version-number 1:0:0 -no-undefined @XLOCALE_TRUE@USE_I18N_LIBS = $(I18N_LIBS) @XCMS_TRUE@USE_XCMS_LIBS = $(XCMS_LIBS) @XKB_TRUE@USE_XKB_LIBS = $(XKB_LIBS) -libX11_la_LDFLAGS = -version-number 6:3:0 -no-undefined +libX11_la_LDFLAGS = -version-number 6:4:0 -no-undefined libX11_la_LIBADD = \ $(LTLIBOBJS) \ $(USE_I18N_LIBS) \ diff --git a/lib/libX11/src/OpenDis.c b/lib/libX11/src/OpenDis.c index 717de3390..5017b040b 100644 --- a/lib/libX11/src/OpenDis.c +++ b/lib/libX11/src/OpenDis.c @@ -188,6 +188,7 @@ XOpenDisplay ( dpy->flushes = NULL; dpy->xcmisc_opcode = 0; dpy->xkb_info = NULL; + dpy->exit_handler_data = NULL; /* * Setup other information in this display structure. @@ -201,7 +202,8 @@ XOpenDisplay ( X_DPY_SET_LAST_REQUEST_READ(dpy, 0); dpy->default_screen = iscreen; /* Value returned by ConnectDisplay */ dpy->last_req = (char *)&_dummy_request; - dpy->req_seq_syncing = False; + dpy->error_threads = NULL; + dpy->exit_handler = _XDefaultIOErrorExit; /* Initialize the display lock */ if (InitDisplayLock(dpy) != 0) { @@ -333,7 +335,7 @@ XOpenDisplay ( } u.setup = (xConnSetup *) (((char *) u.setup) + sz_xConnSetup); - (void) strncpy(dpy->vendor, u.vendor, vendorlen); + (void) strncpy(dpy->vendor, u.vendor, (size_t) vendorlen); dpy->vendor[vendorlen] = '\0'; vendorlen = (vendorlen + 3) & ~3; /* round up */ u.vendor += vendorlen; diff --git a/lib/libX11/src/ParseCol.c b/lib/libX11/src/ParseCol.c index e997b1b8c..2691df362 100644 --- a/lib/libX11/src/ParseCol.c +++ b/lib/libX11/src/ParseCol.c @@ -46,7 +46,7 @@ XParseColor ( XcmsColor cmsColor; if (!spec) return(0); - n = strlen (spec); + n = (int) strlen (spec); if (*spec == '#') { /* * RGB @@ -119,7 +119,7 @@ XParseColor ( LockDisplay(dpy); GetReq (LookupColor, req); req->cmap = cmap; - req->nbytes = n = strlen(spec); + req->nbytes = (CARD16) (n = (int) strlen(spec)); req->length += (n + 3) >> 2; Data (dpy, spec, (long)n); if (!_XReply (dpy, (xReply *) &reply, 0, xTrue)) { diff --git a/lib/libX11/src/PolyTxt.c b/lib/libX11/src/PolyTxt.c index 471383b57..5c0046614 100644 --- a/lib/libX11/src/PolyTxt.c +++ b/lib/libX11/src/PolyTxt.c @@ -197,7 +197,7 @@ XDrawText( *(tbuf+1) = 0; /* elt->delta */ } *tbuf = PartialNChars; /* elt->len */ - memcpy (tbuf+2 , CharacterOffset, PartialNChars); + memcpy (tbuf+2 , CharacterOffset, (size_t) PartialNChars); } } item++; diff --git a/lib/libX11/src/PutBEvent.c b/lib/libX11/src/PutBEvent.c index 1768e032c..0f9df3429 100644 --- a/lib/libX11/src/PutBEvent.c +++ b/lib/libX11/src/PutBEvent.c @@ -34,8 +34,8 @@ from The Open Group. int _XPutBackEvent ( - register Display *dpy, - register XEvent *event) + Display *dpy, + XEvent *event) { register _XQEvent *qelt; XEvent store = *event; diff --git a/lib/libX11/src/PutImage.c b/lib/libX11/src/PutImage.c index 1954d0863..857ee916e 100644 --- a/lib/libX11/src/PutImage.c +++ b/lib/libX11/src/PutImage.c @@ -119,8 +119,8 @@ static unsigned char const _reverse_nibs[0x100] = { int _XReverse_Bytes( - register unsigned char *bpt, - register int nb) + unsigned char *bpt, + int nb) { do { *bpt = _reverse_byte[*bpt]; diff --git a/lib/libX11/src/QuExt.c b/lib/libX11/src/QuExt.c index 4e230e776..2021dca47 100644 --- a/lib/libX11/src/QuExt.c +++ b/lib/libX11/src/QuExt.c @@ -42,7 +42,7 @@ XQueryExtension( LockDisplay(dpy); GetReq(QueryExtension, req); - req->nbytes = name ? strlen(name) : 0; + req->nbytes = name ? (CARD16) strlen(name) : 0; req->length += (req->nbytes+(unsigned)3)>>2; _XSend(dpy, name, (long)req->nbytes); (void) _XReply (dpy, (xReply *)&rep, 0, xTrue); diff --git a/lib/libX11/src/Quarks.c b/lib/libX11/src/Quarks.c index 1068a86c9..0dd919684 100644 --- a/lib/libX11/src/Quarks.c +++ b/lib/libX11/src/Quarks.c @@ -63,7 +63,7 @@ from The Open Group. #ifdef PERMQ typedef unsigned char Bits; #endif -typedef unsigned long Entry; /* dont confuse with EntryRec from Xintatom.h */ +typedef unsigned long Entry; /* don't confuse with EntryRec from Xintatom.h */ static XrmQuark nextQuark = 1; /* next available quark number */ static unsigned long quarkMask = 0; @@ -243,7 +243,6 @@ _XrmInternalStringToQuark( register XrmQuark q; register Entry entry; register int idx, rehash; - register int i; register char *s1, *s2; char *new; @@ -258,10 +257,11 @@ _XrmInternalStringToQuark( goto nomatch; q = (entry >> QUARKSHIFT) & QUARKMASK; } - for (i = len, s1 = (char *)name, s2 = NAME(q); --i >= 0; ) { - if (*s1++ != *s2++) + s2 = NAME(q); + if(memcmp((char *)name, s2, len) != 0) { goto nomatch; } + s2 += len; if (*s2) { nomatch: if (!rehash) rehash = REHASHVAL(sig); @@ -319,9 +319,9 @@ nomatch: if (!rehash) #endif if (!name) goto fail; - for (i = len, s1 = (char *)name; --i >= 0; ) - *s1++ = *s2++; - *s1++ = '\0'; + s1 = (char*)name; + memcpy(s1, s2, (size_t)len); + s1[len] = '\0'; #ifdef PERMQ CLEARPERM(q); } @@ -398,7 +398,7 @@ XrmString XrmQuarkToString(register XrmQuark quark) else { #ifdef PERMQ /* We have to mark the quark as permanent, since the caller might hold - * onto the string pointer forver. + * onto the string pointer forever. */ SETPERM(quark); #endif diff --git a/lib/libX11/src/Region.c b/lib/libX11/src/Region.c index d6d9da9de..974f4302a 100644 --- a/lib/libX11/src/Region.c +++ b/lib/libX11/src/Region.c @@ -1304,7 +1304,7 @@ miSubtractO ( else if (r2->x1 <= x1) { /* - * Subtrahend preceeds minuend: nuke left edge of minuend. + * Subtrahend precedes minuend: nuke left edge of minuend. */ x1 = r2->x2; if (x1 >= r1->x2) diff --git a/lib/libX11/src/RegstFlt.c b/lib/libX11/src/RegstFlt.c index 077ea424c..407ae667d 100644 --- a/lib/libX11/src/RegstFlt.c +++ b/lib/libX11/src/RegstFlt.c @@ -68,6 +68,7 @@ _XFreeIMFilters( display->im_filters = fl->next; Xfree(fl); } + display->im_filters = NULL; } /* diff --git a/lib/libX11/src/SetCRects.c b/lib/libX11/src/SetCRects.c index c7ad3fcf2..b18c449a6 100644 --- a/lib/libX11/src/SetCRects.c +++ b/lib/libX11/src/SetCRects.c @@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group. /* can only call when display is locked. */ void _XSetClipRectangles ( - register Display *dpy, + Display *dpy, GC gc, int clip_x_origin, int clip_y_origin, XRectangle *rectangles, diff --git a/lib/libX11/src/SetFPath.c b/lib/libX11/src/SetFPath.c index 60aaef01e..7d12f18c6 100644 --- a/lib/libX11/src/SetFPath.c +++ b/lib/libX11/src/SetFPath.c @@ -48,7 +48,7 @@ XSetFontPath ( GetReq (SetFontPath, req); req->nFonts = ndirs; for (i = 0; i < ndirs; i++) { - n += safestrlen (directories[i]) + 1; + n = (int) ((size_t) n + (safestrlen (directories[i]) + 1)); } nbytes = (n + 3) & ~3; req->length += nbytes >> 2; @@ -59,9 +59,9 @@ XSetFontPath ( char *tmp = p; for (i = 0; i < ndirs; i++) { - register int length = safestrlen (directories[i]); + register int length = (int) safestrlen (directories[i]); *p = length; - memcpy (p + 1, directories[i], length); + memcpy (p + 1, directories[i], (size_t)length); p += length + 1; } Data (dpy, tmp, nbytes); diff --git a/lib/libX11/src/SetHints.c b/lib/libX11/src/SetHints.c index bc46498a3..e81aa9d36 100644 --- a/lib/libX11/src/SetHints.c +++ b/lib/libX11/src/SetHints.c @@ -260,7 +260,7 @@ XSetStandardProperties ( XChangeProperty (dpy, w, XA_WM_ICON_NAME, XA_STRING, 8, PropModeReplace, (_Xconst unsigned char *)icon_string, - safestrlen(icon_string)); + (int)safestrlen(icon_string)); } if (icon_pixmap != None) { diff --git a/lib/libX11/src/SetLocale.c b/lib/libX11/src/SetLocale.c index 69c25c2c3..81f4a7c35 100644 --- a/lib/libX11/src/SetLocale.c +++ b/lib/libX11/src/SetLocale.c @@ -171,7 +171,7 @@ _XlcMapOSLocaleName( len = end - start; if (len >= MAXLOCALE) len = MAXLOCALE - 1; - strncpy(siname, start, len); + strncpy(siname, start, (size_t) len); *(siname + len) = '\0'; # ifdef WHITEFILL for (start = siname; start = strchr(start, ' '); ) diff --git a/lib/libX11/src/StNColor.c b/lib/libX11/src/StNColor.c index 8b821c3ef..3b50401bf 100644 --- a/lib/libX11/src/StNColor.c +++ b/lib/libX11/src/StNColor.c @@ -76,7 +76,7 @@ int flags) /* DoRed, DoGreen, DoBlue */ req->cmap = cmap; req->flags = flags; req->pixel = pixel; - req->nbytes = nbytes = strlen(name); + req->nbytes = (CARD16) (nbytes = (unsigned) strlen(name)); req->length += (nbytes + 3) >> 2; /* round up to multiple of 4 */ Data(dpy, name, (long)nbytes); UnlockDisplay(dpy); diff --git a/lib/libX11/src/StName.c b/lib/libX11/src/StName.c index b4048bff0..58b5a5a67 100644 --- a/lib/libX11/src/StName.c +++ b/lib/libX11/src/StName.c @@ -38,7 +38,7 @@ XStoreName ( { return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING, 8, PropModeReplace, (_Xconst unsigned char *)name, - name ? strlen(name) : 0); + name ? (int) strlen(name) : 0); } int @@ -49,5 +49,5 @@ XSetIconName ( { return XChangeProperty(dpy, w, XA_WM_ICON_NAME, XA_STRING, 8, PropModeReplace, (_Xconst unsigned char *)icon_name, - icon_name ? strlen(icon_name) : 0); + icon_name ? (int) strlen(icon_name) : 0); } diff --git a/lib/libX11/src/Text.c b/lib/libX11/src/Text.c index 223b1cf8b..b3cfd3393 100644 --- a/lib/libX11/src/Text.c +++ b/lib/libX11/src/Text.c @@ -104,7 +104,7 @@ XDrawString( *(tbuf+1) = 0; /* memcpy ((char *) (elt + 1), CharacterOffset, PartialNChars); */ - memcpy ((char *)tbuf+2, CharacterOffset, PartialNChars); + memcpy ((char *)tbuf+2, CharacterOffset, (size_t)PartialNChars); } } diff --git a/lib/libX11/src/WMProps.c b/lib/libX11/src/WMProps.c index 3ccb654fa..b99d35f23 100644 --- a/lib/libX11/src/WMProps.c +++ b/lib/libX11/src/WMProps.c @@ -80,7 +80,7 @@ void XSetWMProperties ( char **argv, /* command line */ int argc, /* size of command line */ XSizeHints *sizeHints, /* size hints for window in its normal state */ - XWMHints *wmHints, /* miscelaneous window manager hints */ + XWMHints *wmHints, /* miscellaneous window manager hints */ XClassHint *classHints) /* resource name and class */ { XTextProperty textprop; @@ -105,7 +105,7 @@ void XSetWMProperties ( textprop.value = (unsigned char *) hostName; textprop.encoding = XA_STRING; textprop.format = 8; - textprop.nitems = len; + textprop.nitems = (unsigned long) len; XSetWMClientMachine (dpy, w, &textprop); /* set hints about how geometry and window manager interaction */ @@ -142,6 +142,6 @@ void XSetWMProperties ( if (locale) XChangeProperty (dpy, w, XInternAtom(dpy, "WM_LOCALE_NAME", False), XA_STRING, 8, PropModeReplace, - (unsigned char *)locale, strlen(locale)); + (unsigned char *)locale, (int) strlen(locale)); } diff --git a/lib/libX11/src/Window.c b/lib/libX11/src/Window.c index 85a28f372..e643f2197 100644 --- a/lib/libX11/src/Window.c +++ b/lib/libX11/src/Window.c @@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group. #include "Xlibint.h" void _XProcessWindowAttributes ( - register Display *dpy, + Display *dpy, xChangeWindowAttributesReq *req, - register unsigned long valuemask, - register XSetWindowAttributes *attributes) + unsigned long valuemask, + XSetWindowAttributes *attributes) { unsigned long values[32]; register unsigned long *value = values; diff --git a/lib/libX11/src/XlibInt.c b/lib/libX11/src/XlibInt.c index e4fb4e5f2..297b77119 100644 --- a/lib/libX11/src/XlibInt.c +++ b/lib/libX11/src/XlibInt.c @@ -188,7 +188,7 @@ void _XPollfdCacheDel( static int sync_hazard(Display *dpy) { /* - * "span" and "hazard" need to be signed such that the ">=" comparision + * "span" and "hazard" need to be signed such that the ">=" comparison * works correctly in the case that hazard is greater than 65525 */ int64_t span = X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy); @@ -218,12 +218,10 @@ void _XSeqSyncFunction( xGetInputFocusReply rep; _X_UNUSED register xReq *req; - if ((X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy)) >= (65535 - BUFSIZE/SIZEOF(xReq)) && !dpy->req_seq_syncing) { - dpy->req_seq_syncing = True; + if ((X_DPY_GET_REQUEST(dpy) - X_DPY_GET_LAST_REQUEST_READ(dpy)) >= (65535 - BUFSIZE/SIZEOF(xReq))) { GetEmptyReq(GetInputFocus, req); (void) _XReply (dpy, (xReply *)&rep, 0, xTrue); sync_while_locked(dpy); - dpy->req_seq_syncing = False; } else if (sync_hazard(dpy)) _XSetPrivSyncFunction(dpy); } @@ -269,7 +267,7 @@ void _XSetSeqSyncFunction(Display *dpy) #ifdef LONG64 void _XRead32( Display *dpy, - register long *data, + long *data, long len) { register int *buf; @@ -652,11 +650,10 @@ _XFreeEventCookies(Display *dpy) head = (struct stored_event**)&dpy->cookiejar; DL_FOREACH_SAFE(*head, e, tmp) { - if (dpy->cookiejar == e) - dpy->cookiejar = NULL; XFree(e->ev.data); XFree(e); } + dpy->cookiejar = NULL; } /** @@ -678,6 +675,7 @@ _XStoreEventCookie(Display *dpy, XEvent *event) if (!add) { ESET(ENOMEM); _XIOError(dpy); + return; } add->ev = *cookie; DL_APPEND(*head, add); @@ -752,6 +750,7 @@ void _XEnq( /* Malloc call failed! */ ESET(ENOMEM); _XIOError(dpy); + return; } qelt->next = NULL; @@ -1271,6 +1270,14 @@ SocketBytesReadable(Display *dpy) return bytes; } +_X_NORETURN void _XDefaultIOErrorExit( + Display *dpy, + void *user_data) +{ + exit(1); + /*NOTREACHED*/ +} + /* * _XDefaultIOError - Default fatal system error reporting routine. Called * when an X internal system error is encountered. @@ -1484,6 +1491,11 @@ int _XError ( if (_XErrorFunction != NULL) { int rtn_val; #ifdef XTHREADS + struct _XErrorThreadInfo thread_info = { + .error_thread = xthread_self(), + .next = dpy->error_threads + }, **prev; + dpy->error_threads = &thread_info; if (dpy->lock) (*dpy->lock->user_lock_display)(dpy); UnlockDisplay(dpy); @@ -1493,6 +1505,11 @@ int _XError ( LockDisplay(dpy); if (dpy->lock) (*dpy->lock->user_unlock_display)(dpy); + + /* unlink thread_info from the list */ + for (prev = &dpy->error_threads; *prev != &thread_info; prev = &(*prev)->next) + ; + *prev = thread_info.next; #endif return rtn_val; } else { @@ -1507,6 +1524,9 @@ int _XIOError ( Display *dpy) { + XIOErrorExitHandler exit_handler; + void *exit_handler_data; + dpy->flags |= XlibDisplayIOError; #ifdef WIN32 errno = WSAGetLastError(); @@ -1520,14 +1540,17 @@ _XIOError ( if (dpy->lock) (*dpy->lock->user_lock_display)(dpy); #endif + exit_handler = dpy->exit_handler; + exit_handler_data = dpy->exit_handler_data; UnlockDisplay(dpy); if (_XIOErrorFunction != NULL) (*_XIOErrorFunction)(dpy); else _XDefaultIOError(dpy); - exit (1); - /*NOTREACHED*/ + + exit_handler(dpy, exit_handler_data); + return 1; } @@ -1648,7 +1671,7 @@ void Data( int _XData32( Display *dpy, - register _Xconst long *data, + _Xconst long *data, unsigned len) { register int *buf; @@ -1708,9 +1731,9 @@ int _XGetHostname ( return 0; uname (&name); - len = strlen (name.nodename); + len = (int) strlen (name.nodename); if (len >= maxlen) len = maxlen - 1; - strncpy (buf, name.nodename, len); + strncpy (buf, name.nodename, (size_t) len); buf[len] = '\0'; #else if (maxlen <= 0 || buf == NULL) @@ -1719,7 +1742,7 @@ int _XGetHostname ( buf[0] = '\0'; (void) gethostname (buf, maxlen); buf [maxlen - 1] = '\0'; - len = strlen(buf); + len = (int) strlen(buf); #endif /* NEED_UTSNAME */ return len; } diff --git a/lib/libX11/src/Xrm.c b/lib/libX11/src/Xrm.c index 74495f25f..a8ebf8832 100644 --- a/lib/libX11/src/Xrm.c +++ b/lib/libX11/src/Xrm.c @@ -81,7 +81,7 @@ information is kept on a per-level basis. (3) Sometimes the widget instance tree is structured such that you get the same class name repeated on the fully qualified widget name. This can result in the -same database level occuring multiple times on the search list. The code below +same database level occurring multiple times on the search list. The code below only checks to see if you get two identical search lists in a row, rather than look back through all database levels, but in practice this removes all duplicates I've ever observed. @@ -1047,7 +1047,7 @@ XrmQPutStringResource( if (!*pdb) *pdb = NewDatabase(); value.addr = (XPointer) str; - value.size = strlen(str)+1; + value.size = (unsigned) strlen(str) + 1; _XLockMutex(&(*pdb)->linfo); PutEntry(*pdb, bindings, quarks, XrmQString, &value); _XUnlockMutex(&(*pdb)->linfo); @@ -1307,7 +1307,7 @@ static void GetDatabase( char oldc; /* - * A parsing error has occured, toss everything on the line + * A parsing error has occurred, toss everything on the line * a new_line can still be escaped with a '\'. */ @@ -1477,7 +1477,7 @@ static void GetDatabase( /* * It is important to make sure that there is room for at least * four more characters in the buffer, since I can add that - * many characters into the buffer after a backslash has occured. + * many characters into the buffer after a backslash has occurred. */ if (ptr + len > ptr_max) { @@ -1532,7 +1532,7 @@ XrmPutStringResource( if (!*pdb) *pdb = NewDatabase(); XrmStringToBindingQuarkList(specifier, bindings, quarks); value.addr = (XPointer) str; - value.size = strlen(str)+1; + value.size = (unsigned) strlen(str)+1; _XLockMutex(&(*pdb)->linfo); PutEntry(*pdb, bindings, quarks, XrmQString, &value); _XUnlockMutex(&(*pdb)->linfo); @@ -1652,11 +1652,11 @@ GetIncludeFile( len = str - base + 1; if (len + fnamelen >= BUFSIZ) return; - strncpy(realfname, base, len); - strncpy(realfname + len, fname, fnamelen); + strncpy(realfname, base, (size_t) len); + strncpy(realfname + len, fname, (size_t) fnamelen); realfname[len + fnamelen] = '\0'; } else { - strncpy(realfname, fname, fnamelen); + strncpy(realfname, fname, (size_t) fnamelen); realfname[fnamelen] = '\0'; } if (!(str = ReadInFile(realfname))) diff --git a/lib/libX11/src/Xxcbint.h b/lib/libX11/src/Xxcbint.h index 4ef13d2ff..d82932592 100644 --- a/lib/libX11/src/Xxcbint.h +++ b/lib/libX11/src/Xxcbint.h @@ -27,6 +27,7 @@ typedef struct _X11XCBPrivate { PendingRequest *pending_requests; PendingRequest *pending_requests_tail; xcb_generic_event_t *next_event; + void *next_response; char *real_bufmax; char *reply_data; int reply_length; diff --git a/lib/libX11/src/config.h.in b/lib/libX11/src/config.h.in index aca5cff27..c9668aea1 100644 --- a/lib/libX11/src/config.h.in +++ b/lib/libX11/src/config.h.in @@ -99,6 +99,10 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if the system has the `__builtin_popcountl' built-in function + */ +#undef HAVE___BUILTIN_POPCOUNTL + /* Support IPv6 for TCP connections */ #undef IPv6 diff --git a/lib/libX11/src/globals.c b/lib/libX11/src/globals.c index 47042088c..1aaa8c670 100644 --- a/lib/libX11/src/globals.c +++ b/lib/libX11/src/globals.c @@ -89,7 +89,7 @@ ZEROINIT (Display *, _XHeadOfDisplayList, NULL); * Holds the two event type codes for this extension. The event type codes * for this extension may vary depending on how many extensions are installed * already, so the initial values given below will be added to the base event - * code that is aquired when this extension is installed. + * code that is acquired when this extension is installed. * * These two variables must be available to programs that use this extension. */ diff --git a/lib/libX11/src/imConv.c b/lib/libX11/src/imConv.c index c3c1974de..48bc79005 100644 --- a/lib/libX11/src/imConv.c +++ b/lib/libX11/src/imConv.c @@ -24,7 +24,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - Auther: Kazunori Nishihara, Fuji Xerox Co.,Ltd. + Author: Kazunori Nishihara, Fuji Xerox Co.,Ltd. kaz@ssdev.ksp.fujixerox.co.jp Modifier: Takashi Fujiwara FUJITSU LIMITED fujiwara@a80.tech.yk.fujitsu.co.jp @@ -96,7 +96,7 @@ _XimGetLocaleCode ( /* * Returns the locale dependent representation of a keysym. - * The locale's encoding is passed in form of pointer to UCS convertor. + * The locale's encoding is passed in form of pointer to UCS converter. * The resulting multi-byte sequence is placed starting at buf (a buffer * with nbytes bytes, nbytes should be >= 8) and is NUL terminated. * Returns the length of the resulting multi-byte sequence, excluding the diff --git a/lib/libX11/src/locking.c b/lib/libX11/src/locking.c index 9f4fe0677..ea5000e15 100644 --- a/lib/libX11/src/locking.c +++ b/lib/libX11/src/locking.c @@ -66,6 +66,8 @@ in this Software without prior written authorization from The Open Group. /* in lcWrap.c */ extern LockInfoPtr _Xi18n_lock; +/* in lcConv.c */ +extern LockInfoPtr _conv_lock; #ifdef WIN32 static DWORD _X_TlsIndex = (DWORD)-1; @@ -98,6 +100,7 @@ static xthread_t _Xthread_self(void) static LockInfoRec global_lock; static LockInfoRec i18n_lock; +static LockInfoRec conv_lock; static void _XLockMutex( LockInfoPtr lip @@ -130,6 +133,7 @@ static void _XFreeMutex( { xmutex_clear(lip->lock); xmutex_free(lip->lock); + lip->lock = NULL; } #ifdef XTHREADS_WARN @@ -453,6 +457,9 @@ static void _XLockDisplay( XTHREADS_FILE_LINE_ARGS ) { +#ifdef XTHREADS + struct _XErrorThreadInfo *ti; +#endif #ifdef XTHREADS_WARN _XLockDisplayWarn(dpy, file, line); #else @@ -460,6 +467,15 @@ static void _XLockDisplay( #endif if (dpy->lock->locking_level > 0) _XDisplayLockWait(dpy); +#ifdef XTHREADS + /* + * Skip the two function calls below which may generate requests + * when LockDisplay is called from within _XError. + */ + for (ti = dpy->error_threads; ti; ti = ti->next) + if (ti->error_thread == xthread_self()) + return; +#endif _XIDHandler(dpy); _XSeqSyncFunction(dpy); } @@ -594,12 +610,22 @@ Status XInitThreads(void) global_lock.lock = NULL; return 0; } + if (!(conv_lock.lock = xmutex_malloc())) { + xmutex_free(global_lock.lock); + global_lock.lock = NULL; + xmutex_free(i18n_lock.lock); + i18n_lock.lock = NULL; + return 0; + } _Xglobal_lock = &global_lock; xmutex_init(_Xglobal_lock->lock); xmutex_set_name(_Xglobal_lock->lock, "Xlib global"); _Xi18n_lock = &i18n_lock; xmutex_init(_Xi18n_lock->lock); xmutex_set_name(_Xi18n_lock->lock, "Xlib i18n"); + _conv_lock = &conv_lock; + xmutex_init(_conv_lock->lock); + xmutex_set_name(_conv_lock->lock, "Xlib conv"); _XLockMutex_fn = _XLockMutex; _XUnlockMutex_fn = _XUnlockMutex; _XCreateMutex_fn = _XCreateMutex; diff --git a/lib/libX11/src/locking.h b/lib/libX11/src/locking.h index 5251a60c1..59fc866ed 100644 --- a/lib/libX11/src/locking.h +++ b/lib/libX11/src/locking.h @@ -149,6 +149,18 @@ typedef struct _LockInfoRec { xmutex_t lock; } LockInfoRec; +/* A list of threads currently invoking error handlers on this display + * LockDisplay operates differently for these threads, avoiding + * generating any requests or reading any events as that can cause + * recursion into the error handling code, which will deadlock the + * thread. + */ +struct _XErrorThreadInfo +{ + struct _XErrorThreadInfo *next; + xthread_t error_thread; +}; + /* XOpenDis.c */ extern int (*_XInitDisplayLock_fn)(Display *dpy); extern void (*_XFreeDisplayLock_fn)(Display *dpy); diff --git a/lib/libX11/src/os2Stubs.c b/lib/libX11/src/os2Stubs.c index ee09cb5fe..3f2b9e893 100644 --- a/lib/libX11/src/os2Stubs.c +++ b/lib/libX11/src/os2Stubs.c @@ -281,7 +281,7 @@ int nfds; int i; APIRET rc; /* First we determine up to which descriptor we need to check. */ -/* No need to check up to 256 if we don't have to (and usually we dont...)*/ +/* No need to check up to 256 if we don't have to (and usually we don't...)*/ /* Note: stuff here is hardcoded for fd_sets which are int[8] as in EMX!!! */ if(nfds > sd->max_fds){ diff --git a/lib/libX11/src/reallocarray.h b/lib/libX11/src/reallocarray.h index 32f535b6a..ee38ebf8d 100644 --- a/lib/libX11/src/reallocarray.h +++ b/lib/libX11/src/reallocarray.h @@ -31,7 +31,7 @@ #ifndef HAVE_REALLOCARRAY extern _X_HIDDEN void *xreallocarray(void *optr, size_t nmemb, size_t size); -# define reallocarray(ptr, n, size) xreallocarray((ptr), (n), (size)) +# define reallocarray(ptr, n, size) xreallocarray((ptr), (size_t)(n), (size_t)(size)) #endif #if defined(MALLOC_0_RETURNS_NULL) || defined(__clang_analyzer__) diff --git a/lib/libX11/src/util/Makefile.in b/lib/libX11/src/util/Makefile.in index acaf970fb..f2f315459 100644 --- a/lib/libX11/src/util/Makefile.in +++ b/lib/libX11/src/util/Makefile.in @@ -56,9 +56,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -288,6 +289,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/src/util/makekeys.c b/lib/libX11/src/util/makekeys.c index 075633155..e847ef4c6 100644 --- a/lib/libX11/src/util/makekeys.c +++ b/lib/libX11/src/util/makekeys.c @@ -68,10 +68,10 @@ parse_line(const char *buf, char *key, KeySym *val, char *prefix) char *tmp, *tmpa; /* See if we can catch a straight XK_foo 0x1234-style definition first; - * the trickery around tmp is to account for prefices. */ + * the trickery around tmp is to account for prefixes. */ i = sscanf(buf, "#define %127s 0x%lx", key, val); if (i == 2 && (tmp = strstr(key, "XK_"))) { - memcpy(prefix, key, tmp - key); + memcpy(prefix, key, (size_t)(tmp - key)); prefix[tmp - key] = '\0'; tmp += 3; memmove(key, tmp, strlen(tmp) + 1); @@ -83,7 +83,7 @@ parse_line(const char *buf, char *key, KeySym *val, char *prefix) * canonicalise this to XF86foo before we do the lookup. */ i = sscanf(buf, "#define %127s %127s", key, alias); if (i == 2 && (tmp = strstr(key, "XK_")) && (tmpa = strstr(alias, "XK_"))) { - memcpy(prefix, key, tmp - key); + memcpy(prefix, key, (size_t)(tmp - key)); prefix[tmp - key] = '\0'; tmp += 3; memmove(key, tmp, strlen(tmp) + 1); diff --git a/lib/libX11/src/xcb_disp.c b/lib/libX11/src/xcb_disp.c index 0fa40deab..70a602f4d 100644 --- a/lib/libX11/src/xcb_disp.c +++ b/lib/libX11/src/xcb_disp.c @@ -105,4 +105,5 @@ void _XFreeX11XCBStructure(Display *dpy) xcondition_free(dpy->xcb->event_notify); xcondition_free(dpy->xcb->reply_notify); Xfree(dpy->xcb); + dpy->xcb = NULL; } diff --git a/lib/libX11/src/xcb_io.c b/lib/libX11/src/xcb_io.c index 6a12d1501..4be75408a 100644 --- a/lib/libX11/src/xcb_io.c +++ b/lib/libX11/src/xcb_io.c @@ -55,7 +55,7 @@ static void return_socket(void *closure) UnlockDisplay(dpy); } -static void require_socket(Display *dpy) +static Bool require_socket(Display *dpy) { if(dpy->bufmax == dpy->buffer) { @@ -66,12 +66,15 @@ static void require_socket(Display *dpy) if(dpy->xcb->event_owner != XlibOwnsEventQueue) flags = XCB_REQUEST_CHECKED; if(!xcb_take_socket(dpy->xcb->connection, return_socket, dpy, - flags, &sent)) + flags, &sent)) { _XIOError(dpy); + return False; + } dpy->xcb->last_flushed = sent; X_DPY_SET_REQUEST(dpy, sent); dpy->bufmax = dpy->xcb->real_bufmax; } + return True; } /* Call internal connection callbacks for any fds that are currently @@ -91,7 +94,7 @@ static void require_socket(Display *dpy) * _XEatData * _XReadPad */ -static void check_internal_connections(Display *dpy) +static Bool check_internal_connections(Display *dpy) { struct _XConnectionInfo *ilist; fd_set r_mask; @@ -100,7 +103,7 @@ static void check_internal_connections(Display *dpy) int highest_fd = -1; if(dpy->flags & XlibDisplayProcConni || !dpy->im_fd_info) - return; + return True; FD_ZERO(&r_mask); for(ilist = dpy->im_fd_info; ilist; ilist = ilist->next) @@ -118,9 +121,12 @@ static void check_internal_connections(Display *dpy) if(result == -1) { - if(errno == EINTR) - return; - _XIOError(dpy); + if(errno != EINTR) { + _XIOError(dpy); + return False; + } + + return True; } for(ilist = dpy->im_fd_info; result && ilist; ilist = ilist->next) @@ -129,6 +135,8 @@ static void check_internal_connections(Display *dpy) _XProcessInternalConnection(dpy, ilist); --result; } + + return True; } static PendingRequest *append_pending_request(Display *dpy, uint64_t sequence) @@ -233,7 +241,8 @@ static void widen(uint64_t *wide, unsigned int narrow) static xcb_generic_reply_t *poll_for_event(Display *dpy, Bool queued_only) { /* Make sure the Display's sequence numbers are valid */ - require_socket(dpy); + if (!require_socket(dpy)) + return NULL; /* Precondition: This thread can safely get events from XCB. */ assert(dpy->xcb->event_owner == XlibOwnsEventQueue && !dpy->xcb->event_waiter); @@ -273,22 +282,83 @@ static xcb_generic_reply_t *poll_for_event(Display *dpy, Bool queued_only) static xcb_generic_reply_t *poll_for_response(Display *dpy) { void *response; - xcb_generic_error_t *error; + xcb_generic_reply_t *event; PendingRequest *req; - while(!(response = poll_for_event(dpy, False)) && - (req = dpy->xcb->pending_requests) && - !req->reply_waiter) + + while(1) { + xcb_generic_error_t *error = NULL; uint64_t request; + Bool poll_queued_only = dpy->xcb->next_response != NULL; + + /* Step 1: is there an event in our queue before the next + * reply/error? Return that first. + * + * If we don't have a reply/error saved from an earlier + * invocation we check incoming events too, otherwise only + * the ones already queued. + */ + response = poll_for_event(dpy, poll_queued_only); + if(response) + break; - if(!xcb_poll_for_reply64(dpy->xcb->connection, req->sequence, - &response, &error)) { - /* xcb_poll_for_reply64 may have read events even if - * there is no reply. */ - response = poll_for_event(dpy, True); + /* Step 2: + * Response is NULL, i.e. we have no events. + * If we are not waiting for a reply or some other thread + * had dibs on the next reply, exit. + */ + req = dpy->xcb->pending_requests; + if(!req || req->reply_waiter) break; + + /* Step 3: + * We have some response (error or reply) related to req + * saved from an earlier invocation of this function. Let's + * use that one. + */ + if(dpy->xcb->next_response) + { + if (((xcb_generic_reply_t*)dpy->xcb->next_response)->response_type == X_Error) + { + error = dpy->xcb->next_response; + response = NULL; + } + else + { + response = dpy->xcb->next_response; + error = NULL; + } + dpy->xcb->next_response = NULL; + } + else + { + /* Step 4: pull down the next response from the wire. This + * should be the 99% case. + * xcb_poll_for_reply64() may also pull down events that + * happened before the reply. + */ + if(!xcb_poll_for_reply64(dpy->xcb->connection, req->sequence, + &response, &error)) { + /* if there is no reply/error, xcb_poll_for_reply64 + * may have read events. Return that. */ + response = poll_for_event(dpy, True); + break; + } + + /* Step 5: we have a new response, but we may also have some + * events that happened before that response. Return those + * first and save our reply/error for the next invocation. + */ + event = poll_for_event(dpy, True); + if(event) + { + dpy->xcb->next_response = error ? error : response; + response = event; + break; + } } + /* Step 6: actually handle the reply/error now... */ request = X_DPY_GET_REQUEST(dpy); if(XLIB_SEQUENCE_COMPARE(req->sequence, >, request)) { @@ -351,8 +421,8 @@ int _XEventsQueued(Display *dpy, int mode) if(mode == QueuedAfterFlush) _XSend(dpy, NULL, 0); - else - check_internal_connections(dpy); + else if (!check_internal_connections(dpy)) + return 0; /* If another thread is blocked waiting for events, then we must * let that thread pick up the next event. Since it blocked, we @@ -361,8 +431,10 @@ int _XEventsQueued(Display *dpy, int mode) { while((response = poll_for_response(dpy))) handle_response(dpy, response, False); - if(xcb_connection_has_error(dpy->xcb->connection)) + if(xcb_connection_has_error(dpy->xcb->connection)) { _XIOError(dpy); + return 0; + } } return dpy->qlen; } @@ -380,7 +452,8 @@ void _XReadEvents(Display *dpy) _XSend(dpy, NULL, 0); if(dpy->xcb->event_owner != XlibOwnsEventQueue) return; - check_internal_connections(dpy); + if (!check_internal_connections(dpy)) + return; serial = dpy->next_event_serial_num; while(serial == dpy->next_event_serial_num || dpy->qlen == 0) @@ -410,7 +483,10 @@ void _XReadEvents(Display *dpy) dpy->xcb->event_waiter = 0; ConditionBroadcast(dpy, dpy->xcb->event_notify); if(!event) + { _XIOError(dpy); + return; + } dpy->xcb->next_event = event; } @@ -428,7 +504,10 @@ void _XReadEvents(Display *dpy) ConditionWait(dpy, dpy->xcb->reply_notify); } else - _XIOError(dpy); + { + _XIOError(dpy); + return; + } } /* The preceding loop established that there is no @@ -496,12 +575,15 @@ void _XSend(Display *dpy, const char *data, long size) ext->before_flush(dpy, &ext->codes, vec[i].iov_base, vec[i].iov_len); } - if(xcb_writev(c, vec, 3, requests) < 0) + if(xcb_writev(c, vec, 3, requests) < 0) { _XIOError(dpy); + return; + } dpy->bufptr = dpy->buffer; dpy->last_req = (char *) &dummy_request; - check_internal_connections(dpy); + if (!check_internal_connections(dpy)) + return; _XSetSeqSyncFunction(dpy); } @@ -512,7 +594,9 @@ void _XSend(Display *dpy, const char *data, long size) */ void _XFlush(Display *dpy) { - require_socket(dpy); + if (!require_socket(dpy)) + return; + _XSend(dpy, NULL, 0); _XEventsQueued(dpy, QueuedAfterReading); @@ -657,7 +741,8 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard) else if(response) handle_response(dpy, response, True); } - check_internal_connections(dpy); + if (!check_internal_connections(dpy)) + return 0; if(dpy->xcb->next_event && dpy->xcb->next_event->response_type == X_Error) { @@ -712,8 +797,10 @@ 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) + 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/HVCGcVC.c b/lib/libX11/src/xcms/HVCGcVC.c index 7ace5f13f..e9eb3a1e9 100644 --- a/lib/libX11/src/xcms/HVCGcVC.c +++ b/lib/libX11/src/xcms/HVCGcVC.c @@ -170,7 +170,7 @@ XcmsTekHVCClipVC ( } if (pColor->spec.TekHVC.V < hvc_max.spec.TekHVC.V) { - /* return the intersection of the perpindicular line through */ + /* return the intersection of the perpendicular line through */ /* the value and chroma given and the line from 0,0 and hvc_max. */ Chroma = pColor->spec.TekHVC.C; Value = pColor->spec.TekHVC.V; diff --git a/lib/libX11/src/xcms/HVCMxC.c b/lib/libX11/src/xcms/HVCMxC.c index 074844ccc..3eb0929d9 100644 --- a/lib/libX11/src/xcms/HVCMxC.c +++ b/lib/libX11/src/xcms/HVCMxC.c @@ -39,7 +39,7 @@ * TekHVCMxC.c * * DESCRIPTION - * Source for the XcmsTekHVCQueryMaxC() gamut boudary + * Source for the XcmsTekHVCQueryMaxC() gamut boundary * querying routine. * */ diff --git a/lib/libX11/src/xcms/LRGB.c b/lib/libX11/src/xcms/LRGB.c index 380b4d17d..a9f23d581 100644 --- a/lib/libX11/src/xcms/LRGB.c +++ b/lib/libX11/src/xcms/LRGB.c @@ -795,7 +795,7 @@ LINEAR_RGB_InitSCCData( return(XcmsSuccess); -FreeBlueTblElements: +FreeBlueTblElements: _X_UNUSED Xfree(pScreenData->pBlueTbl->pBase); FreeBlueTbl: @@ -1178,7 +1178,7 @@ _XcmsTableSearch( /* * DESCRIPTION - * A binary search through the specificied table. + * A binary search through the specified table. * * RETURNS * Returns 0 if failed; otherwise non-zero. @@ -1293,7 +1293,7 @@ XcmsLRGB_RGB_ParseString( * Attempt to parse the value portion. */ spec++; - n = strlen(spec); + n = (int)strlen(spec); if (n != 3 && n != 6 && n != 9 && n != 12) { return(XcmsFailure); } @@ -1337,7 +1337,7 @@ XcmsLRGB_RGB_ParseString( /* * Check for proper prefix. */ - if (strncmp(spec, _XcmsRGB_prefix, n) != 0) { + if (strncmp(spec, _XcmsRGB_prefix, (size_t)n) != 0) { return(XcmsFailure); } diff --git a/lib/libX11/src/xcms/Lab.c b/lib/libX11/src/xcms/Lab.c index bf6ae54db..02d3ed284 100644 --- a/lib/libX11/src/xcms/Lab.c +++ b/lib/libX11/src/xcms/Lab.c @@ -149,7 +149,7 @@ CIELab_ParseString( /* * Check for proper prefix. */ - if (strncmp(spec, _XcmsCIELab_prefix, n) != 0) { + if (strncmp(spec, _XcmsCIELab_prefix, (size_t)n) != 0) { return(XcmsFailure); } diff --git a/lib/libX11/src/xcms/Luv.c b/lib/libX11/src/xcms/Luv.c index c27018a73..f9c6f96b2 100644 --- a/lib/libX11/src/xcms/Luv.c +++ b/lib/libX11/src/xcms/Luv.c @@ -152,7 +152,7 @@ CIELuv_ParseString( /* * Check for proper prefix. */ - if (strncmp(spec, _XcmsCIELuv_prefix, n) != 0) { + if (strncmp(spec, _XcmsCIELuv_prefix, (size_t)n) != 0) { return(XcmsFailure); } diff --git a/lib/libX11/src/xcms/Makefile.in b/lib/libX11/src/xcms/Makefile.in index 0b411d546..8e29cb2f3 100644 --- a/lib/libX11/src/xcms/Makefile.in +++ b/lib/libX11/src/xcms/Makefile.in @@ -56,9 +56,10 @@ DIST_COMMON = $(dist_X11_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -330,6 +331,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/src/xcms/cmsAllNCol.c b/lib/libX11/src/xcms/cmsAllNCol.c index d39de6cbd..ae6827f4c 100644 --- a/lib/libX11/src/xcms/cmsAllNCol.c +++ b/lib/libX11/src/xcms/cmsAllNCol.c @@ -152,7 +152,7 @@ PassToServer: GetReq(AllocNamedColor, req); req->cmap = cmap; - nbytes = req->nbytes = strlen(colorname); + nbytes = req->nbytes = (CARD16) strlen(colorname); req->length += (nbytes + 3) >> 2; /* round up to mult of 4 */ _XSend(dpy, colorname, nbytes); diff --git a/lib/libX11/src/xcms/cmsColNm.c b/lib/libX11/src/xcms/cmsColNm.c index 3d838a7c2..eb26b9b03 100644 --- a/lib/libX11/src/xcms/cmsColNm.c +++ b/lib/libX11/src/xcms/cmsColNm.c @@ -419,7 +419,7 @@ _XcmsLookupColorName( tmpName = *name; Retry: - if ((len = strlen(tmpName)) > 63) { + if ((len = (int)strlen(tmpName)) > 63) { name_lowered = Xmalloc(len+1); if (name_lowered == NULL) return(XcmsFailure); @@ -509,7 +509,7 @@ RemoveSpaces( /* REMOVE SPACES */ cptr = pString; - for (i = strlen(pString); i; i--, cptr++) { + for (i = (int)strlen(pString); i; i--, cptr++) { if (!isspace(*cptr)) { *pString++ = *cptr; count++; @@ -738,7 +738,7 @@ LoadColornameDB(void) pathname = __XOS2RedirRoot(pathname); #endif - length = strlen(pathname); + length = (int)strlen(pathname); if ((length == 0) || (length >= (BUFSIZ - 5))){ XcmsColorDbState = XcmsDbInitFailure; return(XcmsFailure); diff --git a/lib/libX11/src/xcms/cmsInt.c b/lib/libX11/src/xcms/cmsInt.c index 83be2627c..059b7d583 100644 --- a/lib/libX11/src/xcms/cmsInt.c +++ b/lib/libX11/src/xcms/cmsInt.c @@ -225,7 +225,7 @@ _XcmsFreeDefaultCCCs( /* * DESCRIPTION * This routine frees the default XcmsCCC's associated with - * each screen and its associated substructures as neccessary. + * each screen and its associated substructures as necessary. * * RETURNS * void @@ -297,7 +297,7 @@ _XcmsInitScrnInfo( /* * Check if the XcmsCCC's for each screen has been created. - * Really dont need to be created until some routine uses the Xcms + * Really don't need to be created until some routine uses the Xcms * API routines. */ if ((XcmsCCC)dpy->cms.defaultCCCs == NULL) { diff --git a/lib/libX11/src/xcms/cmsLkCol.c b/lib/libX11/src/xcms/cmsLkCol.c index a81c4cbf0..e93a9738b 100644 --- a/lib/libX11/src/xcms/cmsLkCol.c +++ b/lib/libX11/src/xcms/cmsLkCol.c @@ -150,7 +150,7 @@ PassToServer: LockDisplay(dpy); GetReq (LookupColor, req); req->cmap = cmap; - req->nbytes = n = strlen(colorname); + req->nbytes = (CARD16)(n = (int)strlen(colorname)); req->length += (n + 3) >> 2; Data (dpy, colorname, (long)n); if (!_XReply (dpy, (xReply *) &reply, 0, xTrue)) { diff --git a/lib/libX11/src/xcms/cmsProp.c b/lib/libX11/src/xcms/cmsProp.c index 77c072f22..4e6a46220 100644 --- a/lib/libX11/src/xcms/cmsProp.c +++ b/lib/libX11/src/xcms/cmsProp.c @@ -95,7 +95,7 @@ _XcmsGetElement( /* * NAME - * _XcmsGetProperty -- Determine the existance of a property + * _XcmsGetProperty -- Determine the existence of a property * * SYNOPSIS */ diff --git a/lib/libX11/src/xcms/xyY.c b/lib/libX11/src/xcms/xyY.c index 88206c355..ea0902955 100644 --- a/lib/libX11/src/xcms/xyY.c +++ b/lib/libX11/src/xcms/xyY.c @@ -145,7 +145,7 @@ CIExyY_ParseString( /* * Check for proper prefix. */ - if (strncmp(spec, _XcmsCIExyY_prefix, n) != 0) { + if (strncmp(spec, _XcmsCIExyY_prefix, (size_t)n) != 0) { return(XcmsFailure); } diff --git a/lib/libX11/src/xkb/Makefile.in b/lib/libX11/src/xkb/Makefile.in index 7e012b0e9..136f95e7c 100644 --- a/lib/libX11/src/xkb/Makefile.in +++ b/lib/libX11/src/xkb/Makefile.in @@ -55,9 +55,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -294,6 +295,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/src/xkb/XKB.c b/lib/libX11/src/xkb/XKB.c index 03a89d07d..055eb367e 100644 --- a/lib/libX11/src/xkb/XKB.c +++ b/lib/libX11/src/xkb/XKB.c @@ -410,7 +410,7 @@ XkbSetDebuggingFlags(Display *dpy, if (msg) { char *out; - req->msgLength = (unsigned short) strlen(msg) + 1; + req->msgLength = (CARD16) (strlen(msg) + 1); req->length += (req->msgLength + (unsigned) 3) >> 2; BufAlloc(char *, out, ((req->msgLength + (unsigned) 3) / 4) * 4); memcpy(out, msg, req->msgLength); diff --git a/lib/libX11/src/xkb/XKBBind.c b/lib/libX11/src/xkb/XKBBind.c index 24d37e346..8da18a7f1 100644 --- a/lib/libX11/src/xkb/XKBBind.c +++ b/lib/libX11/src/xkb/XKBBind.c @@ -222,7 +222,21 @@ XLookupKeysym(register XKeyEvent * event, int col) if (_XkbUnavailable(dpy)) return _XLookupKeysym(event, col); _XkbCheckPendingRefresh(dpy, dpy->xkb_info); + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif return XKeycodeToKeysym(dpy, event->keycode, col); +#ifdef __clang__ +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + } /* @@ -587,8 +601,8 @@ _XkbReloadDpy(Display *dpy) } int -XkbTranslateKeySym(register Display *dpy, - register KeySym *sym_rtrn, +XkbTranslateKeySym(Display *dpy, + KeySym *sym_rtrn, unsigned int mods, char *buffer, int nbytes, @@ -756,7 +770,7 @@ XkbLookupKeyBinding(Display *dpy, *extra_rtrn = (tmp - nbytes); tmp = nbytes; } - memcpy(buffer, p->string, tmp); + memcpy(buffer, p->string, (size_t) tmp); if (tmp < nbytes) buffer[tmp] = '\0'; return tmp; diff --git a/lib/libX11/src/xkb/XKBExtDev.c b/lib/libX11/src/xkb/XKBExtDev.c index d45460e99..a3e671dfe 100644 --- a/lib/libX11/src/xkb/XKBExtDev.c +++ b/lib/libX11/src/xkb/XKBExtDev.c @@ -651,7 +651,7 @@ _XkbWriteSetDeviceInfo(char *wire, if (changes->changed & XkbXI_ButtonActionsMask) { int size = changes->num_btns * SIZEOF(xkbActionWireDesc); - memcpy(wire, (char *) &devi->btn_acts[changes->first_btn], size); + memcpy(wire, (char *) &devi->btn_acts[changes->first_btn], (size_t) size); wire += size; } if (changes->changed & XkbXI_IndicatorsMask) { diff --git a/lib/libX11/src/xkb/XKBGAlloc.c b/lib/libX11/src/xkb/XKBGAlloc.c index 6b464d41c..3a257c04b 100644 --- a/lib/libX11/src/xkb/XKBGAlloc.c +++ b/lib/libX11/src/xkb/XKBGAlloc.c @@ -69,8 +69,8 @@ _XkbFreeGeomLeafElems(Bool freeAll, ptr = *elems; extra = ((*num_inout) - (first + count)) * elem_sz; if (extra > 0) - memmove(&ptr[first * elem_sz], &ptr[(first + count) * elem_sz], - extra); + memmove(&ptr[(unsigned) first * elem_sz], &ptr[(unsigned)(first + count) * elem_sz], + (size_t) extra); (*num_inout) -= count; } return; @@ -124,7 +124,7 @@ _XkbFreeGeomNonLeafElems(Bool freeAll, else { i = ((*num_inout) - (first + count)) * elem_sz; ptr = *elems; - memmove(&ptr[first * elem_sz], &ptr[(first + count) * elem_sz], i); + memmove(&ptr[(unsigned) first * elem_sz], &ptr[(unsigned)(first + count) * elem_sz], (size_t) i); (*num_inout) -= count; } return; diff --git a/lib/libX11/src/xkb/XKBGetByName.c b/lib/libX11/src/xkb/XKBGetByName.c index 362761cd3..95aa57e0f 100644 --- a/lib/libX11/src/xkb/XKBGetByName.c +++ b/lib/libX11/src/xkb/XKBGetByName.c @@ -109,32 +109,32 @@ XkbGetKeyboardByName(Display *dpy, *str++ = mapLen; if (mapLen > 0) { - memcpy(str, names->keymap, mapLen); + memcpy(str, names->keymap, (size_t) mapLen); str += mapLen; } *str++ = codesLen; if (codesLen > 0) { - memcpy(str, names->keycodes, codesLen); + memcpy(str, names->keycodes, (size_t) codesLen); str += codesLen; } *str++ = typesLen; if (typesLen > 0) { - memcpy(str, names->types, typesLen); + memcpy(str, names->types, (size_t) typesLen); str += typesLen; } *str++ = compatLen; if (compatLen > 0) { - memcpy(str, names->compat, compatLen); + memcpy(str, names->compat, (size_t) compatLen); str += compatLen; } *str++ = symsLen; if (symsLen > 0) { - memcpy(str, names->symbols, symsLen); + memcpy(str, names->symbols, (size_t) symsLen); str += symsLen; } *str++ = geomLen; if (geomLen > 0) { - memcpy(str, names->geometry, geomLen); + memcpy(str, names->geometry, (size_t) geomLen); str += geomLen; } if ((!_XReply(dpy, (xReply *) &rep, 0, xFalse)) || (!rep.reported)) diff --git a/lib/libX11/src/xkb/XKBList.c b/lib/libX11/src/xkb/XKBList.c index 55a37b806..26af889fd 100644 --- a/lib/libX11/src/xkb/XKBList.c +++ b/lib/libX11/src/xkb/XKBList.c @@ -82,7 +82,7 @@ _ReadListing(XkbReadBufferPtr buf, int count, Status * status_rtrn) str = (char *) _XkbGetReadBufferPtr(buf, wlen); if (!str) goto BAILOUT; - memcpy(this->name, str, slen); + memcpy(this->name, str, (size_t) slen); } return first; BAILOUT: @@ -154,32 +154,32 @@ XkbListComponents(Display *dpy, *str++ = mapLen; if (mapLen > 0) { - memcpy(str, ptrns->keymap, mapLen); + memcpy(str, ptrns->keymap, (size_t) mapLen); str += mapLen; } *str++ = codesLen; if (codesLen > 0) { - memcpy(str, ptrns->keycodes, codesLen); + memcpy(str, ptrns->keycodes, (size_t) codesLen); str += codesLen; } *str++ = typesLen; if (typesLen > 0) { - memcpy(str, ptrns->types, typesLen); + memcpy(str, ptrns->types, (size_t) typesLen); str += typesLen; } *str++ = compatLen; if (compatLen > 0) { - memcpy(str, ptrns->compat, compatLen); + memcpy(str, ptrns->compat, (size_t) compatLen); str += compatLen; } *str++ = symsLen; if (symsLen > 0) { - memcpy(str, ptrns->symbols, symsLen); + memcpy(str, ptrns->symbols, (size_t) symsLen); str += symsLen; } *str++ = geomLen; if (geomLen > 0) { - memcpy(str, ptrns->geometry, geomLen); + memcpy(str, ptrns->geometry, (size_t) geomLen); str += geomLen; } if (!_XReply(dpy, (xReply *) &rep, 0, xFalse)) diff --git a/lib/libX11/src/xkb/XKBMisc.c b/lib/libX11/src/xkb/XKBMisc.c index a6c916c3b..880a616e9 100644 --- a/lib/libX11/src/xkb/XKBMisc.c +++ b/lib/libX11/src/xkb/XKBMisc.c @@ -735,7 +735,7 @@ XkbChangeTypesOfKey(XkbDescPtr xkb, return BadAlloc; } pSyms = XkbKeySymsPtr(xkb, key); - memcpy(oldSyms, pSyms, XkbKeyNumSyms(xkb, key) * sizeof(KeySym)); + memcpy(oldSyms, pSyms, (size_t) XkbKeyNumSyms(xkb, key) * sizeof(KeySym)); pSyms = XkbResizeKeySyms(xkb, key, width * nGroups); if (pSyms == NULL) return BadAlloc; @@ -754,7 +754,7 @@ XkbChangeTypesOfKey(XkbDescPtr xkb, XkbAction oldActs[XkbMaxSymsPerKey], *pActs; pActs = XkbKeyActionsPtr(xkb, key); - memcpy(oldActs, pActs, XkbKeyNumSyms(xkb, key) * sizeof(XkbAction)); + memcpy(oldActs, pActs, (size_t) XkbKeyNumSyms(xkb, key) * sizeof(XkbAction)); pActs = XkbResizeKeyActions(xkb, key, width * nGroups); if (pActs == NULL) return BadAlloc; diff --git a/lib/libX11/src/xkb/XKBRdBuf.c b/lib/libX11/src/xkb/XKBRdBuf.c index 0a29bdca4..9a4b7299f 100644 --- a/lib/libX11/src/xkb/XKBRdBuf.c +++ b/lib/libX11/src/xkb/XKBRdBuf.c @@ -71,7 +71,7 @@ _XkbCopyFromReadBuffer(XkbReadBufferPtr from, char *to, int size) if ((from == NULL) || (from->error) || (to == NULL) || (size < 1) || (_XkbReadBufferDataLeft(from) < size)) return 0; - memcpy(to, from->data, size); + memcpy(to, from->data, (size_t)size); from->data += size; return 1; } diff --git a/lib/libX11/src/xkb/XKBSetGeom.c b/lib/libX11/src/xkb/XKBSetGeom.c index 3a24fbdfd..2400c9d0f 100644 --- a/lib/libX11/src/xkb/XKBSetGeom.c +++ b/lib/libX11/src/xkb/XKBSetGeom.c @@ -52,7 +52,7 @@ _WriteCountedString(char *wire, char *str) { CARD16 len, *pLen; - len = (str ? strlen(str) : 0); + len = (CARD16) (str ? strlen(str) : 0); pLen = (CARD16 *) wire; *pLen = len; if (len && str) @@ -69,8 +69,8 @@ _SizeGeomProperties(XkbGeometryPtr geom) for (size = i = 0, prop = geom->properties; i < geom->num_properties; i++, prop++) { - size += _SizeCountedString(prop->name); - size += _SizeCountedString(prop->value); + size = (int) ((unsigned) size + _SizeCountedString(prop->name)); + size = (int) ((unsigned) size + _SizeCountedString(prop->value)); } return size; } @@ -82,7 +82,7 @@ _SizeGeomColors(XkbGeometryPtr geom) register XkbColorPtr color; for (i = size = 0, color = geom->colors; i < geom->num_colors; i++, color++) { - size += _SizeCountedString(color->spec); + size = (int) ((unsigned) size + _SizeCountedString(color->spec)); } return size; } @@ -114,11 +114,11 @@ _SizeGeomDoodads(int num_doodads, XkbDoodadPtr doodad) for (i = size = 0; i < num_doodads; i++, doodad++) { size += SIZEOF(xkbAnyDoodadWireDesc); if (doodad->any.type == XkbTextDoodad) { - size += _SizeCountedString(doodad->text.text); - size += _SizeCountedString(doodad->text.font); + size = (int) ((unsigned) size + _SizeCountedString(doodad->text.text)); + size = (int) ((unsigned) size + _SizeCountedString(doodad->text.font)); } else if (doodad->any.type == XkbLogoDoodad) { - size += _SizeCountedString(doodad->logo.logo_name); + size = (int) ((unsigned) size + _SizeCountedString(doodad->logo.logo_name)); } } return size; @@ -389,7 +389,7 @@ _WriteGeomKeyAliases(char *wire, XkbGeometryPtr geom) sz = geom->num_key_aliases * (XkbKeyNameLength * 2); if (sz > 0) { - memcpy(wire, (char *) geom->key_aliases, sz); + memcpy(wire, (char *) geom->key_aliases, (size_t)sz); wire += sz; } return wire; @@ -404,7 +404,7 @@ _SendSetGeometry(Display *dpy, XkbGeometryPtr geom, xkbSetGeometryReq *req) char *wire, *tbuf; sz = 0; - sz += _SizeCountedString(geom->label_font); + sz = (int) ((unsigned) (sz + _SizeCountedString(geom->label_font))); sz += _SizeGeomProperties(geom); sz += _SizeGeomColors(geom); sz += _SizeGeomShapes(geom); diff --git a/lib/libX11/src/xkb/XKBUse.c b/lib/libX11/src/xkb/XKBUse.c index 3194137e3..ab5027b0f 100644 --- a/lib/libX11/src/xkb/XKBUse.c +++ b/lib/libX11/src/xkb/XKBUse.c @@ -612,6 +612,7 @@ _XkbFreeInfo(Display *dpy) if (xkbi->desc) XkbFreeKeyboard(xkbi->desc, XkbAllComponentsMask, True); Xfree(xkbi); + dpy->xkb_info = NULL; } } diff --git a/lib/libX11/src/xlibi18n/ICWrap.c b/lib/libX11/src/xlibi18n/ICWrap.c index bc53710da..f5caafb97 100644 --- a/lib/libX11/src/xlibi18n/ICWrap.c +++ b/lib/libX11/src/xlibi18n/ICWrap.c @@ -85,7 +85,7 @@ _XIMNestedListToNestedList( nlist++; } } - return ptr - list; + return (int) (ptr - list); } static void diff --git a/lib/libX11/src/xlibi18n/Makefile.in b/lib/libX11/src/xlibi18n/Makefile.in index 95f8c516d..81fe00dbf 100644 --- a/lib/libX11/src/xlibi18n/Makefile.in +++ b/lib/libX11/src/xlibi18n/Makefile.in @@ -55,9 +55,10 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_define_dir.m4 \ - $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ - $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/ax_gcc_builtin.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -322,6 +323,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff --git a/lib/libX11/src/xlibi18n/XDefaultIMIF.c b/lib/libX11/src/xlibi18n/XDefaultIMIF.c index 557aa4948..74e79759e 100644 --- a/lib/libX11/src/xlibi18n/XDefaultIMIF.c +++ b/lib/libX11/src/xlibi18n/XDefaultIMIF.c @@ -452,7 +452,7 @@ _WcLookupString( } else { *status = XLookupKeySym; } - mbstowcs(buffer, mb_buf, length); + mbstowcs(buffer, mb_buf, (size_t) length); XFree(mb_buf); return(length); } diff --git a/lib/libX11/src/xlibi18n/XDefaultOMIF.c b/lib/libX11/src/xlibi18n/XDefaultOMIF.c index 9345547c3..2946f48d2 100644 --- a/lib/libX11/src/xlibi18n/XDefaultOMIF.c +++ b/lib/libX11/src/xlibi18n/XDefaultOMIF.c @@ -164,14 +164,14 @@ check_charset( int count; ssize_t length, name_len; - name_len = strlen(font_name); + name_len = (ssize_t) strlen(font_name); last = font_name + name_len; count = font_set->font_data_count; font_data = font_set->font_data; for ( ; count-- > 0; font_data++) { - length = strlen(font_data->name); + length = (ssize_t) strlen(font_data->name); if (length > name_len) return(NULL); @@ -372,7 +372,7 @@ parse_fontname( strncpy(buf, pattern, BUFSIZ); buf[BUFSIZ-1] = '\0'; - length = strlen(buf); + length = (ssize_t) strlen(buf); last = buf + length - 1; for (num_fields = 0, base_name = buf; *base_name != '\0'; base_name++) @@ -421,7 +421,7 @@ parse_fontname( for ( ; font_data_count-- > 0; font_data++) { if (append_charset) { - strncpy(last, font_data->name, BUFSIZ - length); + strncpy(last, font_data->name, (size_t) (BUFSIZ - length)); buf[BUFSIZ-1] = '\0'; } else { @@ -1071,7 +1071,7 @@ init_om( /* directional dependent drawing */ om->core.directional_dependent = False; - /* contexual drawing */ + /* contextual drawing */ om->core.contextual_drawing = False; /* context dependent */ diff --git a/lib/libX11/src/xlibi18n/XimProto.h b/lib/libX11/src/xlibi18n/XimProto.h index 6b0096dd6..cc7eda311 100644 --- a/lib/libX11/src/xlibi18n/XimProto.h +++ b/lib/libX11/src/xlibi18n/XimProto.h @@ -188,9 +188,9 @@ PERFORMANCE OF THIS SOFTWARE. * request packet header size */ #define XIM_HEADER_SIZE \ - sizeof(CARD8) /* sizeof mejor-opcode */ \ + ( sizeof(CARD8) /* sizeof major-opcode */ \ + sizeof(CARD8) /* sizeof minor-opcode */ \ - + sizeof(INT16) /* sizeof length */ + + sizeof(INT16) ) /* sizeof length */ /* * Client Message data size diff --git a/lib/libX11/src/xlibi18n/XlcPublic.h b/lib/libX11/src/xlibi18n/XlcPublic.h index 3d94ef37d..bab7d6905 100644 --- a/lib/libX11/src/xlibi18n/XlcPublic.h +++ b/lib/libX11/src/xlibi18n/XlcPublic.h @@ -136,7 +136,7 @@ extern Bool _XlcAddCharSet( /* Retrieves a number of attributes of an XlcCharSet. Return NULL if successful, otherwise the name of the first argument - specifiying a nonexistent attribute. */ + specifying a nonexistent attribute. */ extern char *_XlcGetCSValues( XlcCharSet charset, ... diff --git a/lib/libX11/src/xlibi18n/Xlcint.h b/lib/libX11/src/xlibi18n/Xlcint.h index ebef95ba1..f058b367d 100644 --- a/lib/libX11/src/xlibi18n/Xlcint.h +++ b/lib/libX11/src/xlibi18n/Xlcint.h @@ -655,7 +655,7 @@ typedef struct { /* * An X Input Manager (IM). Implementations may need to extend this data - * structure to accomodate additional data, state information etc. + * structure to accommodate additional data, state information etc. */ typedef struct _XIM { XIMMethods methods; /* method list of this IM */ @@ -739,7 +739,7 @@ typedef struct { /* * an Input Context. Implementations may need to extend this data - * structure to accomodate additional data, state information etc. + * structure to accommodate additional data, state information etc. */ typedef struct _XIC { XICMethods methods; /* method list of this IC */ diff --git a/lib/libX11/src/xlibi18n/imKStoUCS.c b/lib/libX11/src/xlibi18n/imKStoUCS.c index 640b3516a..da843bbdc 100644 --- a/lib/libX11/src/xlibi18n/imKStoUCS.c +++ b/lib/libX11/src/xlibi18n/imKStoUCS.c @@ -131,8 +131,8 @@ static unsigned short const keysym_to_unicode_8a4_8fe[] = { static unsigned short const keysym_to_unicode_9df_9f8[] = { 0x2422, /* 0x09d8-0x09df */ 0x2666, 0x25a6, 0x2409, 0x240c, 0x240d, 0x240a, 0x0000, 0x0000, /* 0x09e0-0x09e7 */ - 0x240a, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x2500, /* 0x09e8-0x09ef */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x251c, 0x2524, 0x2534, 0x252c, /* 0x09f0-0x09f7 */ + 0x240a, 0x240b, 0x2518, 0x2510, 0x250c, 0x2514, 0x253c, 0x23ba, /* 0x09e8-0x09ef */ + 0x23bb, 0x2500, 0x23bc, 0x23bd, 0x251c, 0x2524, 0x2534, 0x252c, /* 0x09f0-0x09f7 */ 0x2502 /* 0x09f8-0x09ff */ }; diff --git a/lib/libX11/src/xlibi18n/lcCT.c b/lib/libX11/src/xlibi18n/lcCT.c index 1f413e97c..2ffb00978 100644 --- a/lib/libX11/src/xlibi18n/lcCT.c +++ b/lib/libX11/src/xlibi18n/lcCT.c @@ -323,7 +323,7 @@ _XlcParseCharSet( if (*ptr == '\0') return False; - length = strlen(ptr); + length = (int) strlen(ptr); type = _XlcParseCT(&ptr, &length, &final_byte); @@ -428,7 +428,7 @@ _XlcGetCTInfo( && (type != XctExtSeg || (text_len >= ct_info->ext_segment_len && memcmp(text, ct_info->ext_segment, - ct_info->ext_segment_len) == 0))) + (size_t) ct_info->ext_segment_len) == 0))) return ct_info; return (CTInfo) NULL; @@ -477,7 +477,7 @@ _XlcAddCT( } /* Allocate a CTinfo record. */ - length = strlen(ct_sequence); + length = (int) strlen(ct_sequence); ct_info = Xmalloc(sizeof(CTInfoRec) + length+1); if (ct_info == NULL) return charset; @@ -506,7 +506,7 @@ _XlcAddCT( /* By convention, the extended segment name is the encoding_name in lowercase. */ const char *q = charset->encoding_name; - int n = strlen(q); + int n = (int) strlen(q); char *p; /* Ensure ct_info->ext_segment_len <= 0x3fff - 6. */ @@ -802,7 +802,7 @@ cttocs( int n = (state->ext_seg_left <= buf_len ? state->ext_seg_left : (buf_len / char_size) * char_size); - memcpy(bufptr, ctptr, n); + memcpy(bufptr, ctptr, (size_t) n); ctptr += n; ctext_len -= n; bufptr += n; buf_len -= n; state->ext_seg_left -= n; @@ -834,7 +834,7 @@ cttocs( We may be splitting a character into multiple pieces. Oh well. */ int n = buf_len; - memcpy(bufptr, ctptr, n); + memcpy(bufptr, ctptr, (size_t) n); ctptr += n; ctext_len -= n; bufptr += n; buf_len -= n; state->ext_seg_left -= n; @@ -899,7 +899,7 @@ cstoct( return -1; side = charset->side; - length = strlen(ct_info->ct_sequence); + length = (int) strlen(ct_info->ct_sequence); ext_segment_start = NULL; @@ -909,7 +909,7 @@ cstoct( if (ct_len < length + 3) return -1; - memcpy(ctptr, ct_info->ct_sequence, length); + memcpy(ctptr, ct_info->ct_sequence, (size_t) length); ctptr += length; ct_len -= length + 3; } else @@ -924,7 +924,7 @@ cstoct( if (ct_len < length + 2 + ct_info->ext_segment_len) return -1; - memcpy(ctptr, ct_info->ct_sequence, length); + memcpy(ctptr, ct_info->ct_sequence, (size_t) length); ctptr += length; ct_len -= length; @@ -936,14 +936,14 @@ cstoct( if (ct_len > 0x3fff) ct_len = 0x3fff; - memcpy(ctptr, ct_info->ext_segment, ct_info->ext_segment_len); + memcpy(ctptr, ct_info->ext_segment, (size_t) ct_info->ext_segment_len); ctptr += ct_info->ext_segment_len; ct_len -= ct_info->ext_segment_len; } else { if (ct_len < length) return -1; - memcpy(ctptr, ct_info->ct_sequence, length); + memcpy(ctptr, ct_info->ct_sequence, (size_t) length); ctptr += length; ct_len -= length; } diff --git a/lib/libX11/src/xlibi18n/lcCharSet.c b/lib/libX11/src/xlibi18n/lcCharSet.c index c0380d4a0..7f1452603 100644 --- a/lib/libX11/src/xlibi18n/lcCharSet.c +++ b/lib/libX11/src/xlibi18n/lcCharSet.c @@ -121,7 +121,7 @@ static XlcResource resources[] = { /* Retrieves a number of attributes of an XlcCharSet. Return NULL if successful, otherwise the name of the first argument - specifiying a nonexistent attribute. */ + specifying a nonexistent attribute. */ static char * get_values( XlcCharSet charset, @@ -137,7 +137,7 @@ get_values( /* Retrieves a number of attributes of an XlcCharSet. Return NULL if successful, otherwise the name of the first argument - specifiying a nonexistent attribute. */ + specifying a nonexistent attribute. */ char * _XlcGetCSValues(XlcCharSet charset, ...) { diff --git a/lib/libX11/src/xlibi18n/lcConv.c b/lib/libX11/src/xlibi18n/lcConv.c index 7d9a4738c..32699746d 100644 --- a/lib/libX11/src/xlibi18n/lcConv.c +++ b/lib/libX11/src/xlibi18n/lcConv.c @@ -29,6 +29,11 @@ #include "Xlibint.h" #include "XlcPubI.h" #include <stdio.h> +#include "locking.h" + +#ifdef XTHREADS +LockInfoPtr _conv_lock; +#endif typedef struct _XlcConverterListRec { XLCd from_lcd; @@ -58,6 +63,9 @@ get_converter( XrmQuark to_type) { XlcConverterList list, prev = NULL; + XlcConv conv = NULL; + + _XLockMutex(_conv_lock); for (list = conv_list; list; list = list->next) { if (list->from_lcd == from_lcd && list->to_lcd == to_lcd @@ -69,13 +77,16 @@ get_converter( conv_list = list; } - return (*list->converter)(from_lcd, list->from, to_lcd, list->to); + conv = (*list->converter)(from_lcd, list->from, to_lcd, list->to); + break; } prev = list; } - return (XlcConv) NULL; + _XUnlockMutex(_conv_lock); + + return conv; } Bool @@ -92,18 +103,20 @@ _XlcSetConverter( from_type = XrmStringToQuark(from); to_type = XrmStringToQuark(to); + _XLockMutex(_conv_lock); + for (list = conv_list; list; list = list->next) { if (list->from_lcd == from_lcd && list->to_lcd == to_lcd && list->from_type == from_type && list->to_type == to_type) { list->converter = converter; - return True; + goto ret; } } list = Xmalloc(sizeof(XlcConverterListRec)); if (list == NULL) - return False; + goto ret; list->from_lcd = from_lcd; list->from = from; @@ -115,7 +128,9 @@ _XlcSetConverter( list->next = conv_list; conv_list = list; - return True; +ret: + _XUnlockMutex(_conv_lock); + return list != NULL; } typedef struct _ConvRec { diff --git a/lib/libX11/src/xlibi18n/lcDB.c b/lib/libX11/src/xlibi18n/lcDB.c index e04a5d89f..48a10791b 100644 --- a/lib/libX11/src/xlibi18n/lcDB.c +++ b/lib/libX11/src/xlibi18n/lcDB.c @@ -295,7 +295,7 @@ zap_comment( int pos = p - str; if (pos == 0 || (iswhite(p[-1]) && (pos == 1 || p[-2] != SYM_BACKSLASH))) { - int len = strlen(p); + int len = (int) strlen(p); if (len > 0 && (p[len - 1] == SYM_NEWLINE || p[len-1] == SYM_CR)) { /* newline is the identifier for finding end of value. therefore, it should not be removed. */ @@ -327,7 +327,7 @@ read_line( while ((p = fgets(buf, BUFSIZE, fd)) != NULL) { ++line->seq; zap_comment(p, "ed); /* remove comment line */ - len = strlen(p); + len = (int) strlen(p); if (len == 0) { if (cur > 0) { break; @@ -341,7 +341,7 @@ read_line( } str = line->str; } - strncpy(str + cur, p, len); + memcpy(str + cur, p, (size_t) len); cur += len; str[cur] = '\0'; @@ -423,7 +423,7 @@ get_word( } else if (token != T_COMMENT && token != T_DEFAULT) { break; } - strncpy(w, p, token_len); + strncpy(w, p, (size_t) token_len); p += token_len; w += token_len; } *w = '\0'; @@ -458,7 +458,7 @@ get_quoted_word( token = get_token(p); token_len = token_tbl[token].len; } - strncpy(w, p, token_len); + strncpy(w, p, (size_t) token_len); p += token_len; w += token_len; } /* error. cannot detect next double quote */ @@ -527,7 +527,7 @@ append_value_list (void) value_list[value_num] = p = &value[value_len]; value_list[value_num + 1] = NULL; - strncpy(p, str, len); + strncpy(p, str, (size_t) len); p[len] = 0; parse_info.value = value_list; @@ -561,7 +561,7 @@ construct_name( char *p = name; for (i = 0; i <= parse_info.nest_depth; ++i) { - len += strlen(parse_info.name[i]) + 1; + len = (int) ((size_t) len + (strlen(parse_info.name[i]) + 1)); } if (len >= size) return 0; @@ -665,8 +665,8 @@ check_category_end( while (iswhite(*p)) { ++p; } - len = strlen(parse_info.category); - if (strncmp(p, parse_info.category, len)) { + len = (int) strlen(parse_info.category); + if (strncmp(p, parse_info.category, (size_t) len)) { return 0; } p += len; @@ -816,7 +816,7 @@ f_double_quote( char* wordp; int len; - if ((len = strlen (str)) < sizeof word) + if ((len = (int) strlen (str)) < sizeof word) wordp = word; else wordp = Xmalloc (len + 1); @@ -835,12 +835,12 @@ f_double_quote( goto err; if ((parse_info.bufsize + (int)strlen(wordp) + 1) >= parse_info.bufMaxSize) { - if (realloc_parse_info(strlen(wordp)+1) == False) { + if (realloc_parse_info((int) strlen(wordp)+1) == False) { goto err; } } strcpy(&parse_info.buf[parse_info.bufsize], wordp); - parse_info.bufsize += strlen(wordp); + parse_info.bufsize = (int) ((size_t) parse_info.bufsize + strlen(wordp)); parse_info.pre_state = S_VALUE; break; default: @@ -877,7 +877,7 @@ f_numeric( int len; int token_len; - if ((len = strlen (str)) < sizeof word) + if ((len = (int) strlen (str)) < sizeof word) wordp = word; else wordp = Xmalloc (len + 1); @@ -897,12 +897,12 @@ f_numeric( goto err; if ((parse_info.bufsize + token_len + (int)strlen(wordp) + 1) >= parse_info.bufMaxSize) { - if (realloc_parse_info(token_len + strlen(wordp) + 1) == False) + if (realloc_parse_info((int)((size_t) token_len + strlen(wordp) + 1)) == False) goto err; } - strncpy(&parse_info.buf[parse_info.bufsize], str, token_len); + strncpy(&parse_info.buf[parse_info.bufsize], str, (size_t) token_len); strcpy(&parse_info.buf[parse_info.bufsize + token_len], wordp); - parse_info.bufsize += token_len + strlen(wordp); + parse_info.bufsize = (int) ((size_t) parse_info.bufsize + ((size_t) token_len + strlen(wordp))); parse_info.pre_state = S_VALUE; break; default: @@ -928,7 +928,7 @@ f_default( char* wordp; int len; - if ((len = strlen (str)) < sizeof word) + if ((len = (int) strlen (str)) < sizeof word) wordp = word; else wordp = Xmalloc (len + 1); @@ -955,7 +955,7 @@ f_default( /* end of category is detected. clear context and zap to end of this line */ clear_parse_info(); - len = strlen(str); + len = (int) strlen(str); break; } } @@ -972,11 +972,11 @@ f_default( case S_VALUE: if ((parse_info.bufsize + (int)strlen(wordp) + 1) >= parse_info.bufMaxSize) { - if (realloc_parse_info(strlen(wordp) + 1) == False) + if (realloc_parse_info((int) strlen(wordp) + 1) == False) goto err; } strcpy(&parse_info.buf[parse_info.bufsize], wordp); - parse_info.bufsize += strlen(wordp); + parse_info.bufsize = (int) ((size_t) parse_info.bufsize + strlen(wordp)); parse_info.pre_state = S_VALUE; break; default: @@ -1233,7 +1233,7 @@ _XlcGetLocaleDataBase( /* _XlcDestroyLocaleDataBase(lcd) */ /*----------------------------------------------------------------------*/ /* This function destroy the XLocale Database that bound to the */ -/* specified lcd. If the XLocale Database is refered from some */ +/* specified lcd. If the XLocale Database is referred from some */ /* other lcd, this function just decreases reference count of */ /* the database. If no locale refers the database, this function */ /* remove it from the cache list and free work area. */ diff --git a/lib/libX11/src/xlibi18n/lcFile.c b/lib/libX11/src/xlibi18n/lcFile.c index e43ac2c0e..2af750f77 100644 --- a/lib/libX11/src/xlibi18n/lcFile.c +++ b/lib/libX11/src/xlibi18n/lcFile.c @@ -182,7 +182,7 @@ _XlcParsePath( for (i = 0; i < n; ++i) { int len; p = argv[i]; - len = strlen(p); + len = (int) strlen(p); if (len > 0 && p[len - 1] == '/') { /* eliminate trailing slash */ p[len - 1] = '\0'; @@ -212,7 +212,7 @@ xlocaledir( if (dir) { #ifndef WIN32 /* - * Only use the user-supplied path if the process isn't priviledged. + * Only use the user-supplied path if the process isn't privileged. */ if (getuid() == geteuid() && getgid() == getegid()) { #if defined(HASSETUGID) @@ -227,7 +227,7 @@ xlocaledir( } #else /* - * If there are saved ID's the process might still be priviledged + * If there are saved ID's the process might still be privileged * even though the above test succeeded. If issetugid() and * getresgid() aren't available, test this by trying to set * euid to 0. @@ -242,7 +242,7 @@ xlocaledir( priv = 0; } else { if (seteuid(oldeuid) == -1) { - /* XXX ouch, coudn't get back to original uid + /* XXX ouch, couldn't get back to original uid what can we do ??? */ _exit(127); } @@ -254,8 +254,8 @@ xlocaledir( priv = 0; #endif if (!priv) { - len = strlen(dir); - strncpy(p, dir, buf_len); + len = (int) strlen(dir); + strncpy(p, dir, (size_t) buf_len); if (len < buf_len) { p[len++] = LC_PATHDELIM; p += len; @@ -266,7 +266,7 @@ xlocaledir( if (len < buf_len) #ifndef __UNIXOS2__ - strncpy(p, XLOCALEDIR, buf_len - len); + strncpy(p, XLOCALEDIR, (size_t) (buf_len - len)); #else strncpy(p,__XOS2RedirRoot(XLOCALEDIR), buf_len - len); #endif @@ -290,7 +290,7 @@ xlocalelibdir( if (dir) { #ifndef WIN32 /* - * Only use the user-supplied path if the process isn't priviledged. + * Only use the user-supplied path if the process isn't privileged. */ if (getuid() == geteuid() && getgid() == getegid()) { #if defined(HASSETUGID) @@ -305,7 +305,7 @@ xlocalelibdir( } #else /* - * If there are saved ID's the process might still be priviledged + * If there are saved ID's the process might still be privileged * even though the above test succeeded. If issetugid() and * getresgid() aren't available, test this by trying to set * euid to 0. @@ -320,7 +320,7 @@ xlocalelibdir( priv = 0; } else { if (seteuid(oldeuid) == -1) { - /* XXX ouch, coudn't get back to original uid + /* XXX ouch, couldn't get back to original uid what can we do ??? */ _exit(127); } @@ -332,8 +332,8 @@ xlocalelibdir( priv = 0; #endif if (!priv) { - len = strlen(dir); - strncpy(p, dir, buf_len); + len = (int) strlen(dir); + strncpy(p, dir, (size_t) buf_len); if (len < buf_len) { p[len++] = LC_PATHDELIM; p += len; @@ -344,9 +344,9 @@ xlocalelibdir( if (len < buf_len) #ifndef __UNIXOS2__ - strncpy(p, XLOCALELIBDIR, buf_len - len); + strncpy(p, XLOCALELIBDIR, (size_t) (buf_len - len)); #else - strncpy(p,__XOS2RedirRoot(XLOCALELIBDIR), buf_len - len); + strncpy(p,__XOS2RedirRoot(XLOCALELIBDIR), (size_t) (buf_len - len)); #endif buf[buf_len-1] = '\0'; } @@ -420,7 +420,7 @@ lowercase( char *t; for (s = src, t = dst; *s; ++s, ++t) - *t = c_tolower(*s); + *t = (char) c_tolower(*s); *t = '\0'; return dst; } @@ -446,7 +446,7 @@ normalize_lcname (const char *name) *p++ = *tmp++; while (*tmp) { if (*tmp != '-') - *p++ = c_tolower(*tmp); + *p++ = (char) c_tolower(*tmp); tmp++; } } @@ -563,7 +563,7 @@ _XlcResolveLocaleName( pub->siname = name; } - sinamelen = strlen (pub->siname); + sinamelen = (int) strlen (pub->siname); if (sinamelen == 1 && pub->siname[0] == 'C') { pub->language = pub->siname; pub->territory = pub->codeset = NULL; diff --git a/lib/libX11/src/xlibi18n/lcGeneric.c b/lib/libX11/src/xlibi18n/lcGeneric.c index fc17841a5..1f3f60bb0 100644 --- a/lib/libX11/src/xlibi18n/lcGeneric.c +++ b/lib/libX11/src/xlibi18n/lcGeneric.c @@ -276,16 +276,22 @@ free_charset( int num; Xfree(gen->mb_parse_table); + gen->mb_parse_table = NULL; if ((num = gen->mb_parse_list_num) > 0) { for (parse_info = gen->mb_parse_list; num-- > 0; parse_info++) { Xfree((*parse_info)->encoding); Xfree(*parse_info); } Xfree(gen->mb_parse_list); + gen->mb_parse_list = NULL; + gen->mb_parse_list_num = 0; } - if ((num = gen->codeset_num) > 0) + if ((num = gen->codeset_num) > 0) { Xfree(gen->codeset_list); + gen->codeset_list = NULL; + gen->codeset_num = 0; + } } /* For VW/UDC */ @@ -796,7 +802,7 @@ load_generic( EncodingType type = E_SS; /* for BC */ for (j = 0; shifts[j].str; j++) { if (!_XlcNCompareISOLatin1(tmp, shifts[j].str, - strlen(shifts[j].str))) { + (int) strlen(shifts[j].str))) { type = shifts[j].type; tmp += strlen(shifts[j].str); break; diff --git a/lib/libX11/src/xlibi18n/lcPrTxt.c b/lib/libX11/src/xlibi18n/lcPrTxt.c index 5ab5ad4a8..10402a3ca 100644 --- a/lib/libX11/src/xlibi18n/lcPrTxt.c +++ b/lib/libX11/src/xlibi18n/lcPrTxt.c @@ -100,7 +100,7 @@ copy_list( for (str = *str_list; count > 0; count--, str_list++) { strcpy(str, mb_text); *str_list = str; - length = strlen(str) + 1; + length = (int) strlen(str) + 1; str += length; mb_text += length; } @@ -186,7 +186,7 @@ _XTextPropertyToTextList( if (do_strcpy) { len = min(from_left, to_left); - strncpy(to, from, len); + strncpy(to, from, (size_t) len); from += len; to += len; from_left -= len; diff --git a/lib/libX11/src/xlibi18n/lcPublic.c b/lib/libX11/src/xlibi18n/lcPublic.c index f35f17a63..1cbc212dc 100644 --- a/lib/libX11/src/xlibi18n/lcPublic.c +++ b/lib/libX11/src/xlibi18n/lcPublic.c @@ -219,7 +219,7 @@ initialize( * _XlMapOSLocaleName will return the same string or a substring * of name, so strlen(name) is okay */ - if ((len = strlen(name)) < sizeof sinamebuf) + if ((len = (int) strlen(name)) < sizeof sinamebuf) siname = sinamebuf; else siname = Xmalloc (len + 1); @@ -258,6 +258,7 @@ destroy_core( if (lcd) { if (lcd->core) { Xfree(lcd->core->name); + Xfree(lcd->core->modifiers); Xfree(lcd->core); } Xfree(lcd->methods); diff --git a/lib/libX11/src/xlibi18n/lcStd.c b/lib/libX11/src/xlibi18n/lcStd.c index 9d452bcae..a8518b056 100644 --- a/lib/libX11/src/xlibi18n/lcStd.c +++ b/lib/libX11/src/xlibi18n/lcStd.c @@ -36,11 +36,11 @@ _Xlcmbtowc( char *str, int len) { - static XLCd last_lcd = NULL; - static XlcConv conv = NULL; + XlcConv conv; XPointer from, to; int from_left, to_left; wchar_t tmp_wc; + int ret; if (lcd == NULL) { lcd = _XlcCurrentLC(); @@ -50,18 +50,9 @@ _Xlcmbtowc( if (str == NULL) return XLC_PUBLIC(lcd, is_state_depend); - if (conv && lcd != last_lcd) { - _XlcCloseConverter(conv); - conv = NULL; - } - - last_lcd = lcd; - - if (conv == NULL) { - conv = _XlcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar); - if (conv == NULL) + conv = _XlcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar); + if (conv == NULL) return -1; - } from = (XPointer) str; from_left = len; @@ -69,9 +60,12 @@ _Xlcmbtowc( to_left = 1; if (_XlcConvert(conv, &from, &from_left, &to, &to_left, NULL, 0) < 0) - return -1; + ret = -1; + else + ret = len - from_left; - return (len - from_left); + _XlcCloseConverter(conv); + return ret; } int @@ -80,10 +74,10 @@ _Xlcwctomb( char *str, wchar_t wc) { - static XLCd last_lcd = NULL; - static XlcConv conv = NULL; + XlcConv conv; XPointer from, to; int from_left, to_left, length; + int ret; if (lcd == NULL) { lcd = _XlcCurrentLC(); @@ -93,18 +87,9 @@ _Xlcwctomb( if (str == NULL) return XLC_PUBLIC(lcd, is_state_depend); - if (conv && lcd != last_lcd) { - _XlcCloseConverter(conv); - conv = NULL; - } - - last_lcd = lcd; - - if (conv == NULL) { - conv = _XlcOpenConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte); - if (conv == NULL) - return -1; - } + conv = _XlcOpenConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte); + if (conv == NULL) + return -1; from = (XPointer) &wc; from_left = 1; @@ -112,9 +97,12 @@ _Xlcwctomb( length = to_left = XLC_PUBLIC(lcd, mb_cur_max); if (_XlcConvert(conv, &from, &from_left, &to, &to_left, NULL, 0) < 0) - return -1; + ret = -1; + else + ret = length - to_left; - return (length - to_left); + _XlcCloseConverter(conv); + return ret; } int @@ -139,7 +127,7 @@ _Xlcmbstowcs( return -1; from = (XPointer) str; - from_left = strlen(str); + from_left = (int) strlen(str); to = (XPointer) wstr; to_left = len; @@ -279,7 +267,7 @@ _Xwcslen( while (*wstr_ptr) wstr_ptr++; - return wstr_ptr - wstr; + return (int) (wstr_ptr - wstr); } int @@ -331,7 +319,7 @@ _Xlcmbstoutf8( return -1; from = (XPointer) str; - from_left = strlen(str); + from_left = (int) strlen(str); to = (XPointer) ustr; to_left = len; diff --git a/lib/libX11/src/xlibi18n/lcTxtPr.c b/lib/libX11/src/xlibi18n/lcTxtPr.c index 05f6a1ffe..d38d07735 100644 --- a/lib/libX11/src/xlibi18n/lcTxtPr.c +++ b/lib/libX11/src/xlibi18n/lcTxtPr.c @@ -56,7 +56,7 @@ get_buf_size( mb_list = (char **) list; for ( ; count-- > 0; mb_list++) { if (*mb_list) - length += strlen(*mb_list) + 1; + length = (int) ((size_t) length + (strlen(*mb_list) + 1)); } length *= 3; /* XXX */ } @@ -118,7 +118,7 @@ _XTextListToTextProperty( strcpy(to, *mb_list); else *to = '\0'; - from_left = (*mb_list ? strlen(*mb_list) : 0) + 1; + from_left = (int) (*mb_list ? strlen(*mb_list) : 0) + 1; nitems += from_left; to += from_left; mb_list++; @@ -161,7 +161,7 @@ retry: wc_list++; } else { from = (XPointer) *mb_list; - from_left = (*mb_list ? strlen(*mb_list) : 0); + from_left = (int) (*mb_list ? strlen(*mb_list) : 0); mb_list++; } @@ -190,7 +190,7 @@ retry: _XlcCloseConverter(conv); - nitems = to - buf; + nitems = (int) (to - buf); done: if (nitems <= 0) nitems = 1; @@ -202,14 +202,14 @@ done: if (nitems == 1) *value = 0; else - memcpy(value, buf, nitems); + memcpy(value, buf, (size_t) nitems); nitems--; Xfree(buf); text_prop->value = (unsigned char *) value; text_prop->encoding = encoding; text_prop->format = 8; - text_prop->nitems = nitems; + text_prop->nitems = (unsigned long) nitems; return unconv_num; } diff --git a/lib/libX11/src/xlibi18n/lcUTF8.c b/lib/libX11/src/xlibi18n/lcUTF8.c index 38201573e..57c8696e4 100644 --- a/lib/libX11/src/xlibi18n/lcUTF8.c +++ b/lib/libX11/src/xlibi18n/lcUTF8.c @@ -1727,7 +1727,7 @@ create_tofontcs_conv( { XlcConv conv; int i, num, k, count; - char **value, buf[20]; + char **value, buf[32]; Utf8Conv *preferred; lazy_init_all_charsets(); @@ -1934,7 +1934,7 @@ iconv_mbstocs(XlcConv conv, XPointer *from, int *from_left, /* Uses stdc iconv to convert multibyte -> widechar */ - consumed = mbtowc(&wc, (const char *)src, srcend-src); + consumed = mbtowc(&wc, (const char *)src, (size_t) (srcend - src)); if (consumed == 0) break; if (consumed == -1) { @@ -2030,7 +2030,7 @@ iconv_mbtocs(XlcConv conv, XPointer *from, int *from_left, /* Uses stdc iconv to convert multibyte -> widechar */ - consumed = mbtowc(&wc, (const char *)src, srcend-src); + consumed = mbtowc(&wc, (const char *)src, (size_t) (srcend - src)); if (consumed == 0) break; if (consumed == -1) { @@ -2120,7 +2120,7 @@ iconv_mbstostr(XlcConv conv, XPointer *from, int *from_left, /* Uses stdc iconv to convert multibyte -> widechar */ - consumed = mbtowc(&wc, (const char *)src, srcend-src); + consumed = mbtowc(&wc, (const char *)src, (size_t) (srcend - src)); if (consumed == 0) break; if (dst == dstend) @@ -2224,7 +2224,7 @@ iconv_mbstowcs(XlcConv conv, XPointer *from, int *from_left, int length, unconv_num = 0; while (src_left > 0 && dst_left > 0) { - length = mbtowc(dst, src, src_left); + length = mbtowc(dst, src, (size_t) src_left); if (length > 0) { src += length; diff --git a/lib/libX11/src/xlibi18n/lcUniConv/armscii_8.h b/lib/libX11/src/xlibi18n/lcUniConv/armscii_8.h index 567bfeac2..7f40080c8 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/armscii_8.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/armscii_8.h @@ -76,13 +76,13 @@ armscii_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0028) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x0028 && wc < 0x0030) c = armscii_8_page00[wc-0x0028]; else if (wc >= 0x0030 && wc < 0x00a0) - c = wc; + c = (unsigned char) wc; else if (wc >= 0x00a0 && wc < 0x00c0) c = armscii_8_page00_1[wc-0x00a0]; else if (wc >= 0x0530 && wc < 0x0590) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/cp1133.h b/lib/libX11/src/xlibi18n/lcUniConv/cp1133.h index cf79b7aa1..2dc18e84a 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/cp1133.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/cp1133.h @@ -74,7 +74,7 @@ cp1133_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00b0) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/cp1251.h b/lib/libX11/src/xlibi18n/lcUniConv/cp1251.h index 8c0847a0c..293931071 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/cp1251.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/cp1251.h @@ -89,7 +89,7 @@ cp1251_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00c0) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/cp1255.h b/lib/libX11/src/xlibi18n/lcUniConv/cp1255.h index 61b2b59d7..4103aef3d 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/cp1255.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/cp1255.h @@ -93,7 +93,7 @@ cp1255_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00f8) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/cp1256.h b/lib/libX11/src/xlibi18n/lcUniConv/cp1256.h index 72284f4c1..ef8ed6d55 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/cp1256.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/cp1256.h @@ -109,7 +109,7 @@ cp1256_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0100) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/georgian_academy.h b/lib/libX11/src/xlibi18n/lcUniConv/georgian_academy.h index 0e4350461..6e4c7c29b 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/georgian_academy.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/georgian_academy.h @@ -62,19 +62,19 @@ georgian_academy_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x0080 && wc < 0x00a0) c = georgian_academy_page00[wc-0x0080]; else if ((wc >= 0x00a0 && wc < 0x00c0) || (wc >= 0x00e7 && wc < 0x0100)) - c = wc; + c = (unsigned char) wc; else if (wc >= 0x0150 && wc < 0x0198) c = georgian_academy_page01[wc-0x0150]; else if (wc >= 0x02c0 && wc < 0x02e0) c = georgian_academy_page02[wc-0x02c0]; else if (wc >= 0x10d0 && wc < 0x10f7) - c = wc-0x1010; + c = (unsigned char) (wc - 0x1010); else if (wc >= 0x2010 && wc < 0x2040) c = georgian_academy_page20[wc-0x2010]; else if (wc == 0x2122) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/georgian_ps.h b/lib/libX11/src/xlibi18n/lcUniConv/georgian_ps.h index b96c491df..8efcffed6 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/georgian_ps.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/georgian_ps.h @@ -79,13 +79,13 @@ georgian_ps_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x0080 && wc < 0x00a0) c = georgian_ps_page00[wc-0x0080]; else if ((wc >= 0x00a0 && wc < 0x00c0) || (wc >= 0x00e6 && wc < 0x0100)) - c = wc; + c = (unsigned char) wc; else if (wc >= 0x0150 && wc < 0x0198) c = georgian_ps_page01[wc-0x0150]; else if (wc >= 0x02c0 && wc < 0x02e0) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_1.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_1.h index fc302bb44..a942589b2 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_1.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_1.h @@ -15,7 +15,7 @@ static int iso8859_1_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { if (wc < 0x0100) { - *r = wc; + *r = (unsigned char) wc; return 1; } return RET_ILSEQ; diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_10.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_10.h index 508db5758..40a177394 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_10.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_10.h @@ -72,7 +72,7 @@ iso8859_10_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0180) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_11.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_11.h index 5458da514..fd22020cb 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_11.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_11.h @@ -64,7 +64,7 @@ iso8859_11_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080 || wc == 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x0e00 && wc < 0x0e60) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_13.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_13.h index c041b154a..ca7d28001 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_13.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_13.h @@ -75,7 +75,7 @@ iso8859_13_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0180) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_14.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_14.h index f01581492..9a0578760 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_14.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_14.h @@ -87,7 +87,7 @@ iso8859_14_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0100) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_15.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_15.h index 631d9b5e2..bb003124d 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_15.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_15.h @@ -43,13 +43,13 @@ iso8859_15_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00c0) c = iso8859_15_page00[wc-0x00a0]; else if (wc >= 0x00c0 && wc < 0x0100) - c = wc; + c = (unsigned char) wc; else if (wc >= 0x0150 && wc < 0x0180) c = iso8859_15_page01[wc-0x0150]; else if (wc == 0x20ac) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_16.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_16.h index 99a54d98f..380a071f9 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_16.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_16.h @@ -78,7 +78,7 @@ iso8859_16_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0180) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_2.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_2.h index a63d00424..dec2c0209 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_2.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_2.h @@ -78,7 +78,7 @@ iso8859_2_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0180) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_3.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_3.h index 2282f19cf..95e2612fb 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_3.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_3.h @@ -82,7 +82,7 @@ iso8859_3_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0100) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_4.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_4.h index 878a7e44a..8a16476cb 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_4.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_4.h @@ -78,7 +78,7 @@ iso8859_4_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0180) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_5.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_5.h index cdd6c45db..131e8d0a0 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_5.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_5.h @@ -59,7 +59,7 @@ iso8859_5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00b0) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_6.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_6.h index 4c80a64f5..7ab550ec8 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_6.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_6.h @@ -64,7 +64,7 @@ iso8859_6_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00b0) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_7.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_7.h index 9b500e4b3..429ca3049 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_7.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_7.h @@ -70,7 +70,7 @@ iso8859_7_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00c0) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_8.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_8.h index 152dc3cae..e75bb872a 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_8.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_8.h @@ -71,7 +71,7 @@ iso8859_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00f8) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_9.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_9.h index b94ac9de6..73005c979 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_9.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_9.h @@ -51,7 +51,7 @@ iso8859_9_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00d0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00d0 && wc < 0x0100) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_9e.h b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_9e.h index cbab5816c..a2252c0a7 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/iso8859_9e.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/iso8859_9e.h @@ -79,7 +79,7 @@ iso8859_9e_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x0100) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/jisx0201.h b/lib/libX11/src/xlibi18n/lcUniConv/jisx0201.h index e4af9666f..bdefada1b 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/jisx0201.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/jisx0201.h @@ -28,7 +28,7 @@ static int jisx0201_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { if (wc < 0x0080 && !(wc == 0x005c || wc == 0x007e)) { - *r = wc; + *r = (unsigned char) wc; return 1; } if (wc == 0x00a5) { @@ -40,7 +40,7 @@ jisx0201_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) return 1; } if (wc >= 0xff61 && wc < 0xffa0) { - *r = wc - 0xfec0; + *r = (unsigned char) (wc - 0xfec0); return 1; } return RET_ILSEQ; diff --git a/lib/libX11/src/xlibi18n/lcUniConv/koi8_c.h b/lib/libX11/src/xlibi18n/lcUniConv/koi8_c.h index d870a01db..67b99035f 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/koi8_c.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/koi8_c.h @@ -85,7 +85,7 @@ koi8_c_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00a1) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/koi8_r.h b/lib/libX11/src/xlibi18n/lcUniConv/koi8_r.h index 37ca594f6..6704b3b1a 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/koi8_r.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/koi8_r.h @@ -113,7 +113,7 @@ koi8_r_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00f8) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/koi8_u.h b/lib/libX11/src/xlibi18n/lcUniConv/koi8_u.h index e094419bc..d7131c231 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/koi8_u.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/koi8_u.h @@ -121,7 +121,7 @@ koi8_u_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00f8) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/mulelao.h b/lib/libX11/src/xlibi18n/lcUniConv/mulelao.h index 5b8245762..c0b7eb7b1 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/mulelao.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/mulelao.h @@ -62,7 +62,7 @@ mulelao_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x00a0) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc == 0x00a0) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/tatar_cyr.h b/lib/libX11/src/xlibi18n/lcUniConv/tatar_cyr.h index 471e5a79a..c968616c5 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/tatar_cyr.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/tatar_cyr.h @@ -101,7 +101,7 @@ tatar_cyr_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x00bc) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/tcvn.h b/lib/libX11/src/xlibi18n/lcUniConv/tcvn.h index 4662683dc..cd8fa8ce2 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/tcvn.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/tcvn.h @@ -116,7 +116,7 @@ tcvn_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080 && (wc >= 0x0020 || (0x00fe0076 & (1 << wc)) == 0)) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00a0 && wc < 0x01b8) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/tis620.h b/lib/libX11/src/xlibi18n/lcUniConv/tis620.h index 4fa96ec98..129bfae50 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/tis620.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/tis620.h @@ -64,7 +64,7 @@ tis620_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x0e00 && wc < 0x0e60) diff --git a/lib/libX11/src/xlibi18n/lcUniConv/utf8.h b/lib/libX11/src/xlibi18n/lcUniConv/utf8.h index d00995ca0..0ec2d659e 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/utf8.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/utf8.h @@ -98,12 +98,12 @@ utf8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) /* n == 0 is accep if (n < count) return RET_TOOSMALL; switch (count) { /* note: code falls through cases! */ - case 6: r[5] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x4000000; - case 5: r[4] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x200000; - case 4: r[3] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x10000; - case 3: r[2] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0x800; - case 2: r[1] = 0x80 | (wc & 0x3f); wc = wc >> 6; wc |= 0xc0; - case 1: r[0] = wc; + case 6: r[5] = (unsigned char) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x4000000; + case 5: r[4] = (unsigned char) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x200000; + case 4: r[3] = (unsigned char) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x10000; + case 3: r[2] = (unsigned char) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0x800; + case 2: r[1] = (unsigned char) (0x80 | (wc & 0x3f)); wc = wc >> 6; wc |= 0xc0; + case 1: r[0] = (unsigned char) wc; } return count; } diff --git a/lib/libX11/src/xlibi18n/lcUniConv/viscii.h b/lib/libX11/src/xlibi18n/lcUniConv/viscii.h index d5147e81e..379740781 100644 --- a/lib/libX11/src/xlibi18n/lcUniConv/viscii.h +++ b/lib/libX11/src/xlibi18n/lcUniConv/viscii.h @@ -107,7 +107,7 @@ viscii_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) { unsigned char c = 0; if (wc < 0x0080 && (wc >= 0x0020 || (0x42100064 & (1 << wc)) == 0)) { - *r = wc; + *r = (unsigned char) wc; return 1; } else if (wc >= 0x00c0 && wc < 0x01b8) diff --git a/lib/libX11/src/xlibi18n/lcUtil.c b/lib/libX11/src/xlibi18n/lcUtil.c index 196bca20c..2ff86abaa 100644 --- a/lib/libX11/src/xlibi18n/lcUtil.c +++ b/lib/libX11/src/xlibi18n/lcUtil.c @@ -34,7 +34,7 @@ #define set_toupper(ch) \ if (ch >= 'a' && ch <= 'z') \ - ch = ch - 'a' + 'A'; + ch = (unsigned char) (ch - 'a' + 'A'); /* Compares two ISO 8859-1 strings, ignoring case of ASCII letters. Like strcasecmp in an ASCII locale. */ @@ -46,8 +46,8 @@ _XlcCompareISOLatin1( unsigned char ch1, ch2; for ( ; ; str1++, str2++) { - ch1 = *str1; - ch2 = *str2; + ch1 = (unsigned char) *str1; + ch2 = (unsigned char) *str2; if (ch1 == '\0' || ch2 == '\0') break; set_toupper(ch1); @@ -72,8 +72,8 @@ _XlcNCompareISOLatin1( for ( ; ; str1++, str2++, len--) { if (len == 0) return 0; - ch1 = *str1; - ch2 = *str2; + ch1 = (unsigned char) *str1; + ch2 = (unsigned char) *str2; if (ch1 == '\0' || ch2 == '\0') break; set_toupper(ch1); diff --git a/lib/libX11/src/xlibi18n/lcWrap.c b/lib/libX11/src/xlibi18n/lcWrap.c index d1fa25901..c78ae44f7 100644 --- a/lib/libX11/src/xlibi18n/lcWrap.c +++ b/lib/libX11/src/xlibi18n/lcWrap.c @@ -111,8 +111,8 @@ Bool _XlcValidModSyntax( if (*mods == '@') break; for (ptr = valid_mods; *ptr; ptr++) { - i = strlen(*ptr); - if (strncmp(mods, *ptr, i) || ((mods[i] != '=') + i = (int) strlen(*ptr); + if (strncmp(mods, *ptr, (size_t) i) || ((mods[i] != '=') #ifdef WIN32 && (mods[i] != '#') #endif @@ -141,9 +141,9 @@ _XlcDefaultMapModifiers( return (char *)NULL; if (!_XlcValidModSyntax(user_mods, im_valid)) return (char *)NULL; - i = strlen(prog_mods) + 1; + i = (int) strlen(prog_mods) + 1; if (user_mods) - i += strlen(user_mods); + i = (int) ((size_t) i + strlen(user_mods)); mods = Xmalloc(i); if (mods) { strcpy(mods, prog_mods); @@ -169,7 +169,6 @@ _XlcDefaultMapModifiers( typedef struct _XLCdListRec { struct _XLCdListRec *next; XLCd lcd; - int ref_count; } XLCdListRec, *XLCdList; static XLCdList lcd_list = NULL; @@ -262,7 +261,7 @@ _XOpenLC( * _XlMapOSLocaleName will return the same string or a substring * of name, so strlen(name) is okay */ - if ((len = strlen(name)) >= sizeof sinamebuf) { + if ((len = (int) strlen(name)) >= sizeof sinamebuf) { siname = Xmalloc (len + 1); if (siname == NULL) return NULL; @@ -279,7 +278,6 @@ _XOpenLC( for (cur = lcd_list; cur; cur = cur->next) { if (!strcmp (cur->lcd->core->name, name)) { lcd = cur->lcd; - cur->ref_count++; goto found; } } @@ -296,7 +294,6 @@ _XOpenLC( cur = Xmalloc (sizeof(XLCdListRec)); if (cur) { cur->lcd = lcd; - cur->ref_count = 1; cur->next = lcd_list; lcd_list = cur; } else { @@ -323,23 +320,7 @@ void _XCloseLC( XLCd lcd) { - XLCdList cur, *prev; - - for (prev = &lcd_list; (cur = *prev); prev = &cur->next) { - if (cur->lcd == lcd) { - if (--cur->ref_count < 1) { - _XlcDestroyLC(lcd); - *prev = cur->next; - Xfree(cur); - } - break; - } - } - - if(loader_list) { - _XlcDeInitLoader(); - loader_list = NULL; - } + (void) lcd; } /* @@ -349,17 +330,7 @@ _XCloseLC( XLCd _XlcCurrentLC(void) { - XLCd lcd; - static XLCd last_lcd = NULL; - - lcd = _XOpenLC((char *) NULL); - - if (last_lcd) - _XCloseLC(last_lcd); - - last_lcd = lcd; - - return lcd; + return _XOpenLC(NULL); } XrmMethods @@ -515,9 +486,9 @@ _XlcCopyFromArg( else if (size == sizeof(XPointer)) *((XPointer *) dst) = (XPointer) src; else if (size > sizeof(XPointer)) - memcpy(dst, (char *) src, size); + memcpy(dst, (char *) src, (size_t) size); else - memcpy(dst, (char *) &src, size); + memcpy(dst, (char *) &src, (size_t) size); } void @@ -541,7 +512,7 @@ _XlcCopyToArg( else if (size == sizeof(XPointer)) *((XPointer *) *dst) = *((XPointer *) src); else - memcpy(*dst, src, size); + memcpy(*dst, src, (size_t) size); } void |