.gear/rules | 2 + .../tags/2c2c62ada328ce3a433907569651d7df11176d16 | 23 ++ .gear/tags/list | 1 + configure.ac | 10 +- libX11.spec | 401 +++++++++++++++++++++ man/Compose.man | 2 +- modules/im/ximcp/imLcIm.c | 2 +- nls/compose.dir.pre | 1 + nls/ibm-cp866/Compose.pre | 1 + nls/ibm-cp866/Makefile.am | 3 + nls/ibm-cp866/XI18N_OBJS | 7 + nls/ibm-cp866/XLC_LOCALE.pre | 82 +++++ nls/locale.alias.pre | 2 + nls/locale.dir.pre | 1 + src/xcms/cmsColNm.c | 2 +- src/xlibi18n/Makefile.am | 1 + src/xlibi18n/lcUTF8.c | 4 + src/xlibi18n/lcUniConv/cp866.h | 113 ++++++ 18 files changed, 650 insertions(+), 8 deletions(-) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 00000000..f78a96e0 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,2 @@ +tar: @name@-@version@:. +diff: @name@-@version@:. . diff --git a/.gear/tags/2c2c62ada328ce3a433907569651d7df11176d16 b/.gear/tags/2c2c62ada328ce3a433907569651d7df11176d16 new file mode 100644 index 00000000..a6e621b7 --- /dev/null +++ b/.gear/tags/2c2c62ada328ce3a433907569651d7df11176d16 @@ -0,0 +1,23 @@ +object 695e90ad26f632feb0f58ad94882fb3a263bf114 +type commit +tag libX11-1.8.6 +tagger Alan Coopersmith 1686846729 -0700 + +libX11-1.8.6 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iQIcBAABCgAGBQJkiz0JAAoJEM/fFIgoxkKnUdQQAKGYwwjz1bIEASAVewiWmYZt +dW7qZAHT+gyCAgfkaH869ft8YPNOMbujlRmxdaSulKJI50ZWTUgqSllcvDMW4+F+ +PmX5srCiMLWmPaJSFdHSglztrqwkRpPehwPjHiLUhO275+BbSbpoiFXlcPg52cw7 +JTOwIndEfawpxyqdFY5Q6l8igulkmBj//PwlufsVQVW/V++kw5O9k8/Wz/dSDx7J +CCkaX2A1sRWxolXGUgCGFBYHPAOmgwYE7BTUR5/Bt7rhZ84N3ic8X97K4kx+ZF33 +MiMPzhDp4BZOusKGJprNrBZbyNvxhEJQSG9eDcWXDX65h8hvYAfH2W7sUGwiISnY ++7nSPnDsObWF6F39oql2pvV5tUS0T8vaK/xOzlT7WyA2zW0bh6LMqe+i1nAZjXQN +yXmVQ7AhsDqHfzZy9u6QHQo61Y9Xi0GiI7fRsnN/8n5vAQAfx2KeteP/QfYA8gOC +vg4zNHUm35o3r7eJCSBMSQlVx0bfFn+ghu8OabzE2bjBaXYfUp/o8PXmiOmLS3rY +6yjw1btyTd10Pd9C2h9QiODE/bTuAR6KiiZ9tMU0KzeqAhvnQDQlHAsoU/ccsY2D +nkvk8o9RKg3w/2vHfVEwLBKh+YhZZESe3qdkpEpt9PLUFYokJp0rF8KHINjlDc1i +PVtd8pRP+NJ9XjlXKP/O +=ijB7 +-----END PGP SIGNATURE----- diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 00000000..bf1070f3 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +2c2c62ada328ce3a433907569651d7df11176d16 libX11-1.8.6 diff --git a/configure.ac b/configure.ac index 045dbb87..cd20e4c5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ # Initialize Autoconf -AC_PREREQ([2.70]) +AC_PREREQ([2.60]) AC_INIT([libX11], [1.8.6], [https://gitlab.freedesktop.org/xorg/lib/libx11/-/issues], [libX11]) AC_CONFIG_SRCDIR([Makefile.am]) @@ -9,7 +9,7 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CANONICAL_BUILD AC_CANONICAL_HOST # Set common system defines for POSIX extensions, such as _GNU_SOURCE -# Must be called before any macros that run the compiler (like LT_INIT) +# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL) # to avoid autoconf errors. AC_USE_SYSTEM_EXTENSIONS @@ -17,7 +17,7 @@ AC_USE_SYSTEM_EXTENSIONS AM_INIT_AUTOMAKE([foreign dist-xz]) # Initialize libtool -LT_INIT +AC_PROG_LIBTOOL AC_SYS_LARGEFILE @@ -260,7 +260,7 @@ AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], ) # AC_MSG_CHECKING([keysym definitions]) AC_ARG_WITH([keysymdefdir], - [AS_HELP_STRING([--with-keysymdefdir=DIR], [The location of keysymdef.h (defaults to xproto include dir)])], + [AC_HELP_STRING([--with-keysymdefdir=DIR], [The location of keysymdef.h (defaults to xproto include dir)])], [KEYSYMDEFDIR=$withval], [KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11]) @@ -386,7 +386,7 @@ AC_SUBST(X11_LOCALEDIR) locales="\ am_ET.UTF-8 armscii-8 C cs_CZ.UTF-8 el_GR.UTF-8 en_US.UTF-8 \ - fi_FI.UTF-8 georgian-academy georgian-ps ibm-cp1133 iscii-dev \ + fi_FI.UTF-8 georgian-academy georgian-ps ibm-cp866 ibm-cp1133 iscii-dev \ isiri-3342 iso8859-1 iso8859-10 iso8859-11 iso8859-13 iso8859-14 \ iso8859-15 iso8859-2 iso8859-3 iso8859-4 iso8859-5 iso8859-6 \ iso8859-7 iso8859-8 iso8859-9 iso8859-9e ja ja.JIS \ diff --git a/libX11.spec b/libX11.spec new file mode 100644 index 00000000..9bcba044 --- /dev/null +++ b/libX11.spec @@ -0,0 +1,401 @@ +Name: libX11 +Version: 1.8.6 +Release: alt1 +Epoch: 3 +Summary: X11 Library +License: MIT/X11 +Group: System/Libraries +Url: http://xorg.freedesktop.org +Packager: Valery Inozemtsev + +PreReq: filesystem > 2.3.1-alt1 +Requires: %name-locales = %version-%release +Provides: %name-ccache = %version-%release +Obsoletes: %name-ccache < %version-%release + +Source: %name-%version.tar +Patch: %name-%version-%release.patch + +BuildRequires: libxcb-devel perl-Pod-Parser xorg-proto-devel xorg-util-macros xmlto xorg-sgml-doctools xorg-xtrans-devel + +%description +X11 Library + +%package devel +Summary: X11 Libraries and Header Files +Group: Development/C +Requires: %name = %version-%release + +%description devel +%name-devel contains the libraries and header files needed to +develop programs which make use of %name + +%package locales +Summary: Xorg locales +Group: System/Internationalization +BuildArch: noarch +Conflicts: %name <= 1.1.1-alt2 + +%description locales +This package contains set of Xorg locales + +%def_enable ipv6 +%def_disable loadable_i18n +%def_disable xlocaledir + +%prep +%setup -q + +%patch -p1 + +%build +%autoreconf +%configure \ + %{subst_enable ipv6} \ + %{subst_enable loadable_i18n} \ + %{subst_enable xlocaledir} \ + --disable-specs \ + --disable-static +%make_build + +%install +%make DESTDIR=%buildroot install + +%if_enabled loadable_i18n +rm -f %buildroot%_libdir/X11/locale/common/*.la +%endif + +%files +%doc AUTHORS COPYING README.md +%_libdir/*.so.* +%if_enabled loadable_i18n +%_libdir/X11/locale +%endif +%dir %_datadir/X11 +%_datadir/X11/X* +%_man5dir/*.5* + +%files devel +%_includedir/X11/* +%_libdir/*.so +%_pkgconfigdir/*.pc +%_man3dir/*.3* + +%files locales +%_datadir/X11/locale + +%changelog +* Thu Jun 15 2023 Valery Inozemtsev 3:1.8.6-alt1 +- 1.8.6 + +* Mon Feb 06 2023 Valery Inozemtsev 3:1.8.4-alt1 +- 1.8.4 + +* Thu Jan 12 2023 Valery Inozemtsev 3:1.8.3-alt2 +- revert d6d6cba9 + +* Fri Dec 16 2022 Valery Inozemtsev 3:1.8.3-alt1 +- 1.8.3 + +* Fri Nov 11 2022 Valery Inozemtsev 3:1.8.2-alt1 +- 1.8.2 + +* Wed May 04 2022 Valery Inozemtsev 3:1.8-alt1 +- 1.8 + +* Mon Apr 04 2022 Valery Inozemtsev 3:1.7.5-alt1 +- 1.7.5 + +* Thu Mar 31 2022 Valery Inozemtsev 3:1.7.4-alt1 +- 1.7.4 + +* Tue Dec 07 2021 Valery Inozemtsev 3:1.7.3-alt1 +- 1.7.3 + +* Tue Jun 08 2021 Valery Inozemtsev 3:1.7.2-alt1 +- 1.7.2 + +* Wed May 19 2021 Valery Inozemtsev 3:1.7.1-alt1 +- 1.7.1 (fixes: CVE-2021-31535) + +* Thu Jan 14 2021 Valery Inozemtsev 3:1.7.0-alt1 +- 1.7.0 + +* Tue Aug 25 2020 Valery Inozemtsev 3:1.6.12-alt1 +- 1.6.12 (fixes: CVE-2020-14363) + +* Thu Aug 13 2020 Valery Inozemtsev 3:1.6.11-alt1 +- 1.6.11 + +* Mon Oct 14 2019 Valery Inozemtsev 3:1.6.9-alt1 +- 1.6.9 + +* Fri Jun 21 2019 Valery Inozemtsev 3:1.6.8-alt1 +- 1.6.8 + +* Wed Oct 10 2018 Valery Inozemtsev 3:1.6.7-alt1 +- 1.6.7 + +* Mon May 28 2018 Valery Inozemtsev 3:1.6.5-alt1 +- 1.6.5 + +* Tue Nov 29 2016 Valery Inozemtsev 3:1.6.4-alt1 +- 1.6.4 + +* Mon May 18 2015 Valery Inozemtsev 3:1.6.3-alt1 +- 1.6.3 + +* Mon Sep 09 2013 Valery Inozemtsev 3:1.6.2-alt1 +- 1.6.2 + +* Tue Jul 30 2013 Valery Inozemtsev 3:1.6.1-alt1 +- 1.6.1 + +* Tue Jun 04 2013 Valery Inozemtsev 3:1.6.0-alt1 +- 1.6.0 + +* Fri May 24 2013 Valery Inozemtsev 3:1.5.99.902-alt1 +- 1.6.0 RC2 + +* Sun Mar 10 2013 Valery Inozemtsev 3:1.5.99.901-alt1 +- 1.6.0 RC1 + +* Sat Jun 02 2012 Valery Inozemtsev 3:1.5.0-alt1 +- 1.5.0 + +* Sun May 27 2012 Valery Inozemtsev 3:1.4.99.902-alt1 +- 1.5.0 RC2 + +* Fri Mar 16 2012 Valery Inozemtsev 3:1.4.99.901-alt1 +- 1.5.0 RC1 + +* Wed Mar 07 2012 Valery Inozemtsev 3:1.4.99.1-alt1 +- 1.4.99.1 + +* Fri Jul 29 2011 Valery Inozemtsev 3:1.4.4-alt1 +- 1.4.4 + +* Thu Jun 16 2011 Valery Inozemtsev 3:1.4.3-alt2 +- enabled ipv6 + +* Wed Apr 06 2011 Valery Inozemtsev 3:1.4.3-alt1 +- 1.4.3 + +* Fri Mar 18 2011 Valery Inozemtsev 3:1.4.2-alt1 +- 1.4.2 + +* Mon Feb 07 2011 Alexey Tourbin 3:1.4.1-alt2 +- rebuilt for debuginfo + +* Wed Jan 12 2011 Valery Inozemtsev 3:1.4.1-alt1 +- 1.4.1 + +* Mon Nov 22 2010 Valery Inozemtsev 3:1.4.0-alt1 +- 1.4.0 + +* Fri Nov 12 2010 Valery Inozemtsev 3:1.3.99.903-alt1 +- 1.4 RC3 + +* Sat Oct 23 2010 Valery Inozemtsev 3:1.3.6-alt2 +- rebuild + +* Wed Sep 22 2010 Valery Inozemtsev 3:1.3.6-alt1 +- 1.3.6 + +* Thu Aug 12 2010 Valery Inozemtsev 3:1.3.5-alt1 +- 1.3.5 + +* Fri Jun 04 2010 Valery Inozemtsev 3:1.3.4-alt1 +- 1.3.4 +- drop %name-ccache subpackage + +* Sun Jan 17 2010 Valery Inozemtsev 3:1.3.3-alt1 +- 1.3.3 + +* Sat Oct 24 2009 Valery Inozemtsev 3:1.3.2-alt1 +- 1.3.2 + +* Sun Oct 18 2009 Valery Inozemtsev 3:1.3.1-alt1 +- 1.3.1 + +* Fri Oct 02 2009 Valery Inozemtsev 3:1.3-alt1 +- 1.3 + +* Fri Jul 10 2009 Valery Inozemtsev 3:1.2.2-alt1 +- 1.2.2 + +* Wed Apr 08 2009 Valery Inozemtsev 3:1.2.1-alt1 +- 1.2.1 + +* Wed Apr 01 2009 Valery Inozemtsev 3:1.2-alt2 +- fixed strange font mixups, when fontsets are still used + +* Tue Feb 17 2009 Valery Inozemtsev 3:1.2-alt1 +- 1.2 + +* Tue Nov 25 2008 Valery Inozemtsev 3:1.1.5-alt5 +- reverted previous change + +* Sun Nov 23 2008 Valery Inozemtsev 3:1.1.5-alt4 +- fixed strange font mixups, when fontsets are still used + +* Sat Nov 22 2008 Valery Inozemtsev 3:1.1.5-alt3 +- removed obsolete %%post_ldconfig/%%postun_ldconfig calls + +* Mon Oct 27 2008 Valery Inozemtsev 3:1.1.5-alt2 +- added XF86Battery, XF86Bluetooth, XF86WLAN, XF86UWB to keysymdb + +* Fri Sep 05 2008 Valery Inozemtsev 3:1.1.5-alt1 +- 1.1.5 + +* Tue Jul 08 2008 Valery Inozemtsev 3:1.1.4-alt6 +- fixed unbalanced parenthesis in XKBlib.h + +* Mon Jun 16 2008 Valery Inozemtsev 3:1.1.4-alt5 +- libX11-1.1-branch 2008-06-13 +- fixed memory leak in XOpenDisplay + +* Sat May 03 2008 Valery Inozemtsev 3:1.1.4-alt4 +- new subpackage libX11-ccache + +* Sat Mar 15 2008 Valery Inozemtsev 3:1.1.4-alt3 +- disabled loadable-i18n (close #14896, #14918) + +* Mon Mar 10 2008 Valery Inozemtsev 3:1.1.4-alt2 +- enabled loadable-i18n +- drop compatibility directory /usr/X11R6/lib from ld.so.conf + +* Fri Mar 07 2008 Valery Inozemtsev 3:1.1.4-alt1 +- 1.1.4 + +* Mon Feb 25 2008 Valery Inozemtsev 3:1.1.3-alt8 +- GIT snapshot 2008-02-24 (1a1a42a3ca1dfaf42f1094936b71c140fc030fcb): + + XIM: Fix a hand when switching input context + + XErrorDB updates for Render 0.9 & XFixes 4.0 + +* Tue Dec 11 2007 Valery Inozemtsev 3:1.1.3-alt7 +- GIT snapshot 2007-12-10 (e8d4cefa0837afa149a10e981528b368485a9e38) + + additions to the Compose file for UTF-8 + + fix the keysyms in the en_US.UTF-8 Compose file + +* Mon Nov 05 2007 Valery Inozemtsev 3:1.1.3-alt6 +- GIT snapshot 2007-10-29 (2af660c2fcd15c86c66459bfc074c190ea1462e6) + + Two threads can request sequence sync and XID fetch simultaneously. + +* Mon Oct 15 2007 Valery Inozemtsev 3:1.1.3-alt5 +- GIT snapshot 2007-08-31 (11ea09745efa8de7dc82fe30ebd2393f08390957) + + Add XF86 keyboard/monitor brightness keysyms to the keysymbdb. + +* Sun Oct 14 2007 Valery Inozemtsev 3:1.1.3-alt4 +- build with xcb + +* Tue Aug 21 2007 Valery Inozemtsev 3:1.1.3-alt3 +- GIT snapshot 2007-08-20 (21ca953337fb221b85345bf35ce1a98a0dcb2bf2) + + Fix typo. The code was used where was obviously intended. + +* Sun Aug 19 2007 Valery Inozemtsev 3:1.1.3-alt2 +- GIT snapshot 2007-08-18 (eff33ae525337ce2026be135a26464c7b1237113): + + Fix a mutex reference-counting bug + + Fix SMP Compose targets + + Add some compose sequences + + Compose fix for Latin-1 (from Debian) + + Add additional Euro signs to compose + + Patch for Catalan locales + +* Thu Aug 02 2007 Valery Inozemtsev 3:1.1.3-alt1 +- 1.1.3 + +* Tue Jun 12 2007 Valery Inozemtsev 3:1.1.2-alt3 +- added libX11-1.1.2-git-XGetWindowAttributes.patch: fix locking in _XimGetWindowEventmask. + +* Mon Jun 11 2007 Valery Inozemtsev 3:1.1.2-alt2 +- added libX11-1.1.2-git-XGetMotionEvents-arg-order.patch + +* Thu Jun 07 2007 Valery Inozemtsev 3:1.1.1-alt7 +- rollback to 1.1.1 +- added libX11-1.1.1-git-el_GR.UTF-8.patch + +* Mon Jun 04 2007 Valery Inozemtsev 2:1.1.2-alt1 +- 1.1.2 + +* Tue May 22 2007 Valery Inozemtsev 2:1.1.1-alt6 +- build without xcb + +* Wed May 09 2007 Valery Inozemtsev 2:1.1.1-alt5 +- build with xcb +- added libX11-1.1.1-git-memleak-xcb.patch + +* Wed Apr 04 2007 Valery Inozemtsev 2:1.1.1-alt4 +- fixed CVE-2007-1667 +- added libX11-1.1.1-git-XSetSizeHintset-bug7703.patch: Fixed XSetSizeHints() + et al wrt use of uninitialized data. + +* Tue Apr 03 2007 Valery Inozemtsev 2:1.1.1-alt3 +- move locales to subpackage %name-locales + +* Sun Mar 18 2007 Valery Inozemtsev 2:1.1.1-alt2 +- added libX11-1.1.1-git-file-descriptor-leak.patch + +* Fri Dec 01 2006 Valery Inozemtsev 2:1.1.1-alt1 +- 1.1.1 + +* Fri Nov 24 2006 Valery Inozemtsev 2:1.1-alt1 +- 1.1 + +* Sat Nov 11 2006 Valery Inozemtsev 2:1.0.99.2-alt1 +- 1.0.99.2 + +* Sun Oct 29 2006 Valery Inozemtsev 2:1.0.3-alt5 +- added libX11-1.0.3-git-fix_leaks_in_GetKeyboardByName.patch, + libX11-1.0.3-git-bug2286.patch + +* Wed Oct 18 2006 Valery Inozemtsev 2:1.0.3-alt4 +- added libX11-1.0.3-git-double-open.patch: + + fix double open of compose file. + +* Tue Oct 17 2006 Valery Inozemtsev 2:1.0.3-alt3 +- added libX11-1.0.3-git-LockUnlockDisplay.patch + +* Wed Oct 04 2006 Valery Inozemtsev 2:1.0.3-alt2 +- rebuild with glibc-2.5 + +* Wed Sep 27 2006 Valery Inozemtsev 2:1.0.3-alt1 +- 1.0.3 + +* Mon Sep 11 2006 Valery Inozemtsev 2:1.0.1-alt1 +- 1.0.1 +- disabled XLOCALEDIR environment variable support + +* Sun Sep 03 2006 Valery Inozemtsev 1:1.0.3-alt2 +- enabled XLOCALEDIR environment variable support + +* Sun Sep 03 2006 Valery Inozemtsev 1:1.0.3-alt1 +- 1.0.3 + +* Tue May 23 2006 Valery Inozemtsev 1:1.0.0-alt6 +- added patches: + libX11-1.0.0-NULLdereferences.patch + libX11-1.0.0-memoryleak.patch + libX11-1.0.0-coverity.patch + +* Wed Feb 08 2006 Valery Inozemtsev 1:1.0.0-alt5 +- fixed compatibility directory + +* Mon Jan 23 2006 Valery Inozemtsev 1:1.0.0-alt4 +- added requires to %name-devel from buildrequires + +* Fri Jan 20 2006 Valery Inozemtsev 1:1.0.0-alt3 +- fixed requires for %name-devel + +* Sun Jan 01 2006 Valery Inozemtsev 1:1.0.0-alt2 +- added PreReq filesystem > 2.3.1-alt1 + +* Mon Dec 26 2005 Valery Inozemtsev 1:1.0.0-alt1 +- Xorg-7.0 + +* Sun Dec 04 2005 Valery Inozemtsev 1:0.99.4-alt1 +- Xorg-7.0RC3 + +* Sun Nov 20 2005 Valery Inozemtsev 1:0.99.3-alt0.1 +- initial build + diff --git a/man/Compose.man b/man/Compose.man index 4adea990..23fb4ff4 100644 --- a/man/Compose.man +++ b/man/Compose.man @@ -156,7 +156,7 @@ System default compose file for the locale, mapped via compose.dir. .I /var/cache/libx11/compose/ System-wide cache directory for compiled compose files. .TP -.I $HOME/.compose-cache/ +.I $HOME/.cache/compose/ Per-user cache directory for compiled compose files. .SH SEE ALSO .BR XLookupString (__libmansuffix__), diff --git a/modules/im/ximcp/imLcIm.c b/modules/im/ximcp/imLcIm.c index 743df77b..56bbf0a8 100644 --- a/modules/im/ximcp/imLcIm.c +++ b/modules/im/ximcp/imLcIm.c @@ -60,7 +60,7 @@ THIS SOFTWARE. /* include trailing '/' for cache directory, file prefix otherwise */ #define XIM_GLOBAL_CACHE_DIR "/var/cache/libx11/compose/" -#define XIM_HOME_CACHE_DIR "/.compose-cache/" +#define XIM_HOME_CACHE_DIR "/.cache/compose/" #define XIM_CACHE_MAGIC ('X' | 'i'<<8 | 'm'<<16 | 'C'<<24) #define XIM_CACHE_VERSION 4 #define XIM_CACHE_TREE_ALIGNMENT 4 diff --git a/nls/compose.dir.pre b/nls/compose.dir.pre index 89239453..5ae755a8 100644 --- a/nls/compose.dir.pre +++ b/nls/compose.dir.pre @@ -212,6 +212,7 @@ iso8859-1/Compose: pt_PT.ISO8859-1 iso8859-15/Compose: pt_PT.ISO8859-15 iso8859-2/Compose: ro_RO.ISO8859-2 koi8-r/Compose: ru_RU.KOI8-R +ibm-cp866/Compose: ru_RU.CP866 iso8859-5/Compose: ru_RU.ISO8859-5 microsoft-cp1251/Compose: ru_RU.CP1251 microsoft-cp1251/Compose: ru_UA.CP1251 diff --git a/nls/ibm-cp866/Compose.pre b/nls/ibm-cp866/Compose.pre new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/nls/ibm-cp866/Compose.pre @@ -0,0 +1 @@ + diff --git a/nls/ibm-cp866/Makefile.am b/nls/ibm-cp866/Makefile.am new file mode 100644 index 00000000..1d4abd1f --- /dev/null +++ b/nls/ibm-cp866/Makefile.am @@ -0,0 +1,3 @@ +x11thislocaledir = $(X11_LOCALEDATADIR)/ibm-cp866 + +include $(top_srcdir)/nls/localerules.in diff --git a/nls/ibm-cp866/XI18N_OBJS b/nls/ibm-cp866/XI18N_OBJS new file mode 100644 index 00000000..7de703b3 --- /dev/null +++ b/nls/ibm-cp866/XI18N_OBJS @@ -0,0 +1,7 @@ +# CATEGORY(XLC|XIM|OM) SHARED_LIBRARY_NAME FUNCTION_NAME +# +# XI18N objects table for ibm-cp866 locale +# +XLC common/xlcDef _XlcDefaultLoader # XLC_open +XIM common/ximcp _XimOpenIM _XimRegisterIMInstantiateCallback _XimUnRegisterIMInstantiateCallback # XIM_open XIM_register XIM_unregister +XOM common/xomGeneric _XomGenericOpenOM # XOM_open diff --git a/nls/ibm-cp866/XLC_LOCALE.pre b/nls/ibm-cp866/XLC_LOCALE.pre new file mode 100644 index 00000000..1e284315 --- /dev/null +++ b/nls/ibm-cp866/XLC_LOCALE.pre @@ -0,0 +1,82 @@ +XCOMM $Xorg: ibm-cp866,v 1.3 2000/08/17 19:47:00 cpqbld Exp $ +XCOMM XLocale Database Sample for ibm-cp866. +XCOMM +XCOMM +XCOMM $XFree86: xc/nls/XLC_LOCALE/ibm-cp866,v 3.3 2000/12/01 17:43:03 dawes Exp $ + +XCOMM +XCOMM XLC_FONTSET category +XCOMM +XLC_FONTSET +XCOMM fs0 class (7 bit ASCII) +fs0 { + charset { + name ISO8859-1:GL + } + font { + primary CP866:GL + substitute ISO8859-1:GL + } +} +XCOMM fs1 class +fs1 { + charset CP866:GR + font CP866:GR +} +END XLC_FONTSET + +XCOMM +XCOMM XLC_CHARSET_DEFINE category +XCOMM +XLC_CHARSET_DEFINE +csd0 { + charset_name CP866 + side GR + length 1 + string_encoding False + sequence \x1b%/1 +} +END XLC_CHARSET_DEFINE + +XCOMM +XCOMM XLC_XLOCALE category +XCOMM +XLC_XLOCALE + +encoding_name CP866 +mb_cur_max 1 +state_depend_encoding False +#if WCHAR32 +wc_encoding_mask \x30000000 +wc_shift_bits 7 +#else +wc_encoding_mask \x00008080 +wc_shift_bits 8 +#endif + +#ifndef X_LOCALE +use_stdc_env True +#endif + +XCOMM cs0 class +cs0 { + side GL:Default + length 1 + wc_encoding \x00000000 + ct_encoding CP866:GL; ISO8859-1:GL +} + + +XCOMM cs1 class +cs1 { + side GR:Default + length 1 +#if WCHAR32 + wc_encoding \x30000000 +#else + wc_encoding \x00008080 +#endif + ct_encoding CP866:GR +} + +END XLC_XLOCALE diff --git a/nls/locale.alias.pre b/nls/locale.alias.pre index 810067e3..68a520ee 100644 --- a/nls/locale.alias.pre +++ b/nls/locale.alias.pre @@ -925,6 +925,7 @@ ru_RU.cp1251: ru_RU.CP1251 ru_RU.microsoftcp1251: ru_RU.CP1251 ru_RU.microsoft-cp1251: ru_RU.CP1251 ru_RU.MICROSOFT-CP1251: ru_RU.CP1251 +ru_RU.cp866: ru_RU.CP866 #if defined(INCLUDE_ru_SU) XCOMM ru_SU is redundant now ru_SU: ru_RU.KOI8-R @@ -1055,6 +1056,7 @@ uk_UA.microsoftcp1251: uk_UA.CP1251 uk_UA.microsoft-cp1251: uk_UA.CP1251 uk_UA.MICROSOFT-CP1251: uk_UA.CP1251 uk_UA.utf8: uk_UA.UTF-8 +uk_UA.cp866: uk_UA.CP866 ur: ur_IN.UTF-8 ur_IN: ur_IN.UTF-8 ur_IN.utf8: ur_IN.UTF-8 diff --git a/nls/locale.dir.pre b/nls/locale.dir.pre index deaf8b2b..94c20fd6 100644 --- a/nls/locale.dir.pre +++ b/nls/locale.dir.pre @@ -217,6 +217,7 @@ microsoft-cp1251/XLC_LOCALE: ru_RU.CP1251 koi8-r/XLC_LOCALE: ru_RU.KOI8-R microsoft-cp1251/XLC_LOCALE: ru_UA.CP1251 koi8-u/XLC_LOCALE: ru_UA.KOI8-U +ibm-cp866/XLC_LOCALE: ru_RU.CP866 iso8859-1/XLC_LOCALE: rw_RW.ISO8859-1 iso8859-2/XLC_LOCALE: sk_SK.ISO8859-2 iso8859-2/XLC_LOCALE: sl_SI.ISO8859-2 diff --git a/src/xcms/cmsColNm.c b/src/xcms/cmsColNm.c index eb26b9b0..9ec6c566 100644 --- a/src/xcms/cmsColNm.c +++ b/src/xcms/cmsColNm.c @@ -54,7 +54,7 @@ static Status LoadColornameDB(void); * #define declarations local to this package. */ #ifndef XCMSDB -#define XCMSDB XCMSDIR "/Xcms.txt" +#define XCMSDB "/usr/share/X11/Xcms.txt" #endif #ifndef isgraph diff --git a/src/xlibi18n/Makefile.am b/src/xlibi18n/Makefile.am index 28b3fe3e..9b8494c4 100644 --- a/src/xlibi18n/Makefile.am +++ b/src/xlibi18n/Makefile.am @@ -97,6 +97,7 @@ libi18n_la_SOURCES = \ lcUniConv/cp1251.h\ lcUniConv/cp1255.h\ lcUniConv/cp1256.h\ + lcUniConv/cp866.h \ lcUniConv/gb2312.h\ lcUniConv/gbk.h\ lcUniConv/georgian_academy.h\ diff --git a/src/xlibi18n/lcUTF8.c b/src/xlibi18n/lcUTF8.c index 8169608a..a11936e9 100644 --- a/src/xlibi18n/lcUTF8.c +++ b/src/xlibi18n/lcUTF8.c @@ -187,6 +187,7 @@ typedef struct _Utf8ConvRec { #include "lcUniConv/koi8_r.h" #include "lcUniConv/koi8_u.h" #include "lcUniConv/koi8_c.h" +#include "lcUniConv/cp866.h" #include "lcUniConv/armscii_8.h" #include "lcUniConv/cp1133.h" #include "lcUniConv/mulelao.h" @@ -304,6 +305,9 @@ static Utf8ConvRec all_charsets[] = { { "IBM-CP1133", NULLQUARK, cp1133_mbtowc, cp1133_wctomb }, + { "CP866", NULLQUARK, + cp866_mbtowc, cp866_wctomb + }, { "MULELAO-1", NULLQUARK, mulelao_mbtowc, mulelao_wctomb }, diff --git a/src/xlibi18n/lcUniConv/cp866.h b/src/xlibi18n/lcUniConv/cp866.h new file mode 100644 index 00000000..5a7cd836 --- /dev/null +++ b/src/xlibi18n/lcUniConv/cp866.h @@ -0,0 +1,113 @@ + +/* + * CP866 + */ + +static const unsigned short cp866_2uni[128] = { + /* 0x80 */ + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, + 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f, + /* 0x90 */ + 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, + 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f, + /* 0xa0 */ + 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, + 0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f, + /* 0xb0 */ + 0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556, + 0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510, + /* 0xc0 */ + 0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f, + 0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567, + /* 0xd0 */ + 0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b, + 0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580, + /* 0xe0 */ + 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, + 0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f, + /* 0xf0 */ + 0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040e, 0x045e, + 0x00b0, 0x2219, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0, +}; + +static int +cp866_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n) +{ + unsigned char c = *s; + if (c < 0x80) + *pwc = (ucs4_t) c; + else + *pwc = (ucs4_t) cp866_2uni[c-0x80]; + return 1; +} + +static const unsigned char cp866_page00[24] = { + 0xff, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ + 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, /* 0xb0-0xb7 */ +}; +static const unsigned char cp866_page04[96] = { + 0x00, 0xf0, 0x00, 0x00, 0xf2, 0x00, 0x00, 0xf4, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x00, /* 0x08-0x0f */ + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x10-0x17 */ + 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x18-0x1f */ + 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x20-0x27 */ + 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x28-0x2f */ + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x30-0x37 */ + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0x38-0x3f */ + 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */ + 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */ + 0x00, 0xf1, 0x00, 0x00, 0xf3, 0x00, 0x00, 0xf5, /* 0x50-0x57 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf7, 0x00, /* 0x58-0x5f */ +}; +static const unsigned char cp866_page22[8] = { + 0x00, 0xf9, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */ +}; +static const unsigned char cp866_page25[168] = { + 0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */ + 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */ + 0xd9, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, /* 0x18-0x1f */ + 0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, /* 0x20-0x27 */ + 0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, /* 0x28-0x2f */ + 0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, /* 0x30-0x37 */ + 0x00, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, /* 0x38-0x3f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */ + 0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, /* 0x50-0x57 */ + 0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, /* 0x58-0x5f */ + 0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, /* 0x60-0x67 */ + 0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x00, 0x00, 0x00, /* 0x68-0x6f */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */ + 0xdf, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, /* 0x80-0x87 */ + 0xdb, 0x00, 0x00, 0x00, 0xdd, 0x00, 0x00, 0x00, /* 0x88-0x8f */ + 0xde, 0xb0, 0xb1, 0xb2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */ + 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ +}; + +static int +cp866_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) +{ + unsigned char c = 0; + if (wc < 0x0080) { + *r = wc; + return 1; + } + else if (wc >= 0x00a0 && wc < 0x00b8) + c = cp866_page00[wc-0x00a0]; + else if (wc >= 0x0400 && wc < 0x0460) + c = cp866_page04[wc-0x0400]; + else if (wc == 0x2116) + c = 0xfc; + else if (wc >= 0x2218 && wc < 0x2220) + c = cp866_page22[wc-0x2218]; + else if (wc >= 0x2500 && wc < 0x25a8) + c = cp866_page25[wc-0x2500]; + if (c != 0) { + *r = c; + return 1; + } + return RET_ILSEQ; +}