From c20468153e683f5b3411eb75b821665ee165a581 Mon Sep 17 00:00:00 2001 From: Damien Durand Date: Fri, 5 Mar 2010 12:23:25 +0000 Subject: [PATCH 001/185] Initial import --- .cvsignore | 1 + import.log | 1 + remmina.spec | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 97 insertions(+) create mode 100644 import.log create mode 100644 remmina.spec diff --git a/.cvsignore b/.cvsignore index e69de29..8e15ebb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +remmina-0.7.4.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..15d319a --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +remmina-0_7_4-1_fc12:HEAD:remmina-0.7.4-1.fc12.src.rpm:1267791750 diff --git a/remmina.spec b/remmina.spec new file mode 100644 index 0000000..8e33af2 --- /dev/null +++ b/remmina.spec @@ -0,0 +1,94 @@ +Name: remmina +Version: 0.7.4 +Release: 1%{?dist} +Summary: Remote Desktop Client + +Group: Applications/Internet +License: GPLv2+ and MIT +URL: http://remmina.sourceforge.net +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: intltool, gtk2-devel, libvncserver-devel +BuildRequires: libjpeg-devel, gnutls-devel, libssh-devel +BuildRequires: avahi-ui-devel, vte-devel, unique-devel +BuildRequires: gettext, desktop-file-utils + +Requires: rdesktop, xorg-x11-server-Xephyr + +Provides: grdc = %{version} +Obsoletes: grdc < 0.6.1 + +%description +Remmina is a remote desktop client written in GTK+, aiming to be useful +for system administrators and travellers, who need to work with lots +of remote computers in front of either large monitors or tiny netbooks. + +Remmina supports multiple network protocols in an integrated and consistant + user interface. Currently RDP, VNC, XDMCP and SSH are supported. + + +%prep +%setup -q + + +%build +%configure --enable-vnc=dl +make %{?_smp_mflags} + + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT + +desktop-file-install --vendor="" --delete-original \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop + +%find_lang %{name} + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%post +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc AUTHORS ChangeLog COPYING README +%{_bindir}/%{name} +%{_datadir}/applications/*.desktop +%{_datadir}/icons/hicolor/*/apps/%{name}.* +%{_datadir}/%{name}/ + +%changelog +* Sat Feb 27 2010 Damien Durand 0.7.4-1 +- Update to 0.7.4 +- Fix License tag + +* Sun Feb 14 2010 Damien Durand 0.7.3-1 +- Upstream release +- Add rdesktop, xorg-x11-server-Xephyr in Requires +- Add grdc in Provides/Obsoletes +- Add --enable-vnc=dl in %configure +- Remove unneeded README.LibVNCServer +- Fix "icons/hicolor" path + +* Thu Jan 07 2010 Damien Durand 0.7.2-2 +- Fix Summary +- Split BuildRequires + +* Thu Jan 07 2010 Damien Durand 0.7.2-1 +- Initial release diff --git a/sources b/sources index e69de29..b5b36cd 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +c53c9473b3730dcc8c8b5bd84e5fe01a remmina-0.7.4.tar.gz From 160ca600072a2025fe7ae0b05fa0c554180befb2 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Tue, 16 Mar 2010 01:21:26 +0000 Subject: [PATCH 002/185] - Add patch to fix DSO issue --- remmina-0.7.4-dsofix.patch | 11 +++++++++++ remmina.spec | 7 ++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 remmina-0.7.4-dsofix.patch diff --git a/remmina-0.7.4-dsofix.patch b/remmina-0.7.4-dsofix.patch new file mode 100644 index 0000000..14a444b --- /dev/null +++ b/remmina-0.7.4-dsofix.patch @@ -0,0 +1,11 @@ +--- remmina-0.7.4.orig/src/Makefile.in 2010-02-17 14:23:16.000000000 +0100 ++++ remmina-0.7.4/src/Makefile.in 2010-03-16 02:12:17.000000000 +0100 +@@ -136,7 +136,7 @@ + INTLTOOL_PERL = @INTLTOOL_PERL@ + INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ + LD = @LD@ +-LDFLAGS = @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ -lX11 + LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ + LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ + LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ diff --git a/remmina.spec b/remmina.spec index 8e33af2..ca92cf3 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,12 +1,13 @@ Name: remmina Version: 0.7.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client Group: Applications/Internet License: GPLv2+ and MIT URL: http://remmina.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: remmina-0.7.4-dsofix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: intltool, gtk2-devel, libvncserver-devel @@ -30,6 +31,7 @@ Remmina supports multiple network protocols in an integrated and consistant %prep %setup -q +%patch0 -p1 -b .dsofix %build @@ -74,6 +76,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/%{name}/ %changelog +* Tue Mar 16 2010 Christoph Wickert - 0.7.4-2 +- Add patch to fix DSO issue + * Sat Feb 27 2010 Damien Durand 0.7.4-1 - Update to 0.7.4 - Fix License tag From 5feaa001bbb9bce2162235f9e827456f112abd6f Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Tue, 16 Mar 2010 01:31:16 +0000 Subject: [PATCH 003/185] fix typos and formating --- remmina.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/remmina.spec b/remmina.spec index ca92cf3..cfaa988 100644 --- a/remmina.spec +++ b/remmina.spec @@ -15,18 +15,18 @@ BuildRequires: libjpeg-devel, gnutls-devel, libssh-devel BuildRequires: avahi-ui-devel, vte-devel, unique-devel BuildRequires: gettext, desktop-file-utils -Requires: rdesktop, xorg-x11-server-Xephyr +Requires: rdesktop, xorg-x11-server-Xephyr -Provides: grdc = %{version} -Obsoletes: grdc < 0.6.1 +Provides: grdc = %{version} +Obsoletes: grdc < 0.6.1 %description -Remmina is a remote desktop client written in GTK+, aiming to be useful -for system administrators and travellers, who need to work with lots -of remote computers in front of either large monitors or tiny netbooks. +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny netbooks. -Remmina supports multiple network protocols in an integrated and consistant - user interface. Currently RDP, VNC, XDMCP and SSH are supported. +Remmina supports multiple network protocols in an integrated and consistent +user interface. Currently RDP, VNC, XDMCP and SSH are supported. %prep From 9d66acb1d723f74c8a6a7ddfcb47d5023fdf0d93 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Tue, 16 Mar 2010 01:34:31 +0000 Subject: [PATCH 004/185] some more trivial spec file fixes --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index cfaa988..56f2508 100644 --- a/remmina.spec +++ b/remmina.spec @@ -87,7 +87,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - Upstream release - Add rdesktop, xorg-x11-server-Xephyr in Requires - Add grdc in Provides/Obsoletes -- Add --enable-vnc=dl in %configure +- Add --enable-vnc=dl in %%configure - Remove unneeded README.LibVNCServer - Fix "icons/hicolor" path From 01d2cbe8ba78c5d70d5ef7c6f6f54d031dc5d698 Mon Sep 17 00:00:00 2001 From: Damien Durand Date: Wed, 5 May 2010 12:18:51 +0000 Subject: [PATCH 005/185] Update to 0.7.5 --- .cvsignore | 2 +- remmina.spec | 10 ++++++---- sources | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 8e15ebb..0cc2e1b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -remmina-0.7.4.tar.gz +remmina-0.7.5.tar.gz diff --git a/remmina.spec b/remmina.spec index 56f2508..da497de 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,13 +1,12 @@ Name: remmina -Version: 0.7.4 -Release: 2%{?dist} +Version: 0.7.5 +Release: 1%{?dist} Summary: Remote Desktop Client Group: Applications/Internet License: GPLv2+ and MIT URL: http://remmina.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -Patch0: remmina-0.7.4-dsofix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: intltool, gtk2-devel, libvncserver-devel @@ -31,7 +30,6 @@ user interface. Currently RDP, VNC, XDMCP and SSH are supported. %prep %setup -q -%patch0 -p1 -b .dsofix %build @@ -76,6 +74,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/%{name}/ %changelog +* Wed May 05 2010 Damien Durand - 0.7.5-1 +- Upstream release, 0.7.5 +- Remove the old "DSO" patch + * Tue Mar 16 2010 Christoph Wickert - 0.7.4-2 - Add patch to fix DSO issue diff --git a/sources b/sources index b5b36cd..13b55e0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c53c9473b3730dcc8c8b5bd84e5fe01a remmina-0.7.4.tar.gz +9b787672b63c57ca9323072f1304ef10 remmina-0.7.5.tar.gz From 88193aecb266d4d0f57503ddaf115ac4eb3ddb65 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Mon, 19 Jul 2010 19:51:58 +0000 Subject: [PATCH 006/185] - Fix menu entry (#616115) --- remmina.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index da497de..ad2e8d7 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ Name: remmina Version: 0.7.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -42,7 +42,9 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT desktop-file-install --vendor="" --delete-original \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --add-category="RemoteAccess" \ + --remove-category="X-GNOME-NetworkSettings" \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop %find_lang %{name} @@ -74,6 +76,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/%{name}/ %changelog +* Mon Jun 19 2010 Christoph Wickert - 0.7.5-2 +- Fix menu entry (#616115) + * Wed May 05 2010 Damien Durand - 0.7.5-1 - Upstream release, 0.7.5 - Remove the old "DSO" patch From e292a818dd733ae00e71094f741498f47c8e30f1 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Mon, 19 Jul 2010 20:02:19 +0000 Subject: [PATCH 007/185] fix date in changelog --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index ad2e8d7..9fa8422 100644 --- a/remmina.spec +++ b/remmina.spec @@ -76,7 +76,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/%{name}/ %changelog -* Mon Jun 19 2010 Christoph Wickert - 0.7.5-2 +* Mon Jul 19 2010 Christoph Wickert - 0.7.5-2 - Fix menu entry (#616115) * Wed May 05 2010 Damien Durand - 0.7.5-1 From 8fca965e948e78ab4af154343ec4d9849f9d0062 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 11:25:49 +0000 Subject: [PATCH 008/185] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 4881f63..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: remmina -# $Id$ -NAME := remmina -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index 15d319a..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -remmina-0_7_4-1_fc12:HEAD:remmina-0.7.4-1.fc12.src.rpm:1267791750 From 01a7823b9b959dd77097c00d861e63bdd6bfc6ff Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Sat, 27 Nov 2010 22:53:08 +0100 Subject: [PATCH 009/185] - Enable 32-bit color depth (#656120) --- remmina-0.7.4-dsofix.patch | 11 ----------- remmina-0.7.5-32bpp.patch | 18 ++++++++++++++++++ remmina.spec | 7 ++++++- 3 files changed, 24 insertions(+), 12 deletions(-) delete mode 100644 remmina-0.7.4-dsofix.patch create mode 100644 remmina-0.7.5-32bpp.patch diff --git a/remmina-0.7.4-dsofix.patch b/remmina-0.7.4-dsofix.patch deleted file mode 100644 index 14a444b..0000000 --- a/remmina-0.7.4-dsofix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- remmina-0.7.4.orig/src/Makefile.in 2010-02-17 14:23:16.000000000 +0100 -+++ remmina-0.7.4/src/Makefile.in 2010-03-16 02:12:17.000000000 +0100 -@@ -136,7 +136,7 @@ - INTLTOOL_PERL = @INTLTOOL_PERL@ - INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ - LD = @LD@ --LDFLAGS = @LDFLAGS@ -+LDFLAGS = @LDFLAGS@ -lX11 - LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ - LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ - LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ diff --git a/remmina-0.7.5-32bpp.patch b/remmina-0.7.5-32bpp.patch new file mode 100644 index 0000000..3107350 --- /dev/null +++ b/remmina-0.7.5-32bpp.patch @@ -0,0 +1,18 @@ +--- remmina-0.7.5/src/remminafile.c.orig 2010-11-23 09:17:25.774867000 +0500 ++++ remmina-0.7.5/src/remminafile.c 2010-11-23 09:16:54.360867001 +0500 +@@ -37,6 +37,7 @@ + "15", N_("High Color (15 bit)"), + "16", N_("High Color (16 bit)"), + "24", N_("True Color (24 bit)"), ++ "32", N_("True Color (32 bit)"), + NULL + }; + +@@ -47,6 +48,7 @@ + "8", N_("256 Colors"), + "16", N_("High Color (16 bit)"), + "24", N_("True Color (24 bit)"), ++ "32", N_("True Color (32 bit)"), + NULL + }; + diff --git a/remmina.spec b/remmina.spec index 9fa8422..6f291b0 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,12 +1,13 @@ Name: remmina Version: 0.7.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Remote Desktop Client Group: Applications/Internet License: GPLv2+ and MIT URL: http://remmina.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: remmina-0.7.5-32bpp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: intltool, gtk2-devel, libvncserver-devel @@ -30,6 +31,7 @@ user interface. Currently RDP, VNC, XDMCP and SSH are supported. %prep %setup -q +%patch0 -p1 -b .32bpp %build @@ -76,6 +78,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/%{name}/ %changelog +* Sat Nov 27 2010 Christoph Wickert - 0.7.5-3 +- Enable 32-bit color depth (#656120) + * Mon Jul 19 2010 Christoph Wickert - 0.7.5-2 - Fix menu entry (#616115) From 9bcffd74ab067f1245cc078dc1234c5f8eff9638 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Fri, 21 Jan 2011 18:42:51 +0100 Subject: [PATCH 010/185] - Update to 0.9.3 --- .gitignore | 1 + remmina-0.7.5-32bpp.patch | 18 ------------- remmina.spec | 57 ++++++++++++++++++++++++++++++--------- sources | 2 +- 4 files changed, 47 insertions(+), 31 deletions(-) delete mode 100644 remmina-0.7.5-32bpp.patch diff --git a/.gitignore b/.gitignore index 0cc2e1b..f955bda 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ remmina-0.7.5.tar.gz +/remmina-0.9.3.tar.gz diff --git a/remmina-0.7.5-32bpp.patch b/remmina-0.7.5-32bpp.patch deleted file mode 100644 index 3107350..0000000 --- a/remmina-0.7.5-32bpp.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- remmina-0.7.5/src/remminafile.c.orig 2010-11-23 09:17:25.774867000 +0500 -+++ remmina-0.7.5/src/remminafile.c 2010-11-23 09:16:54.360867001 +0500 -@@ -37,6 +37,7 @@ - "15", N_("High Color (15 bit)"), - "16", N_("High Color (16 bit)"), - "24", N_("True Color (24 bit)"), -+ "32", N_("True Color (32 bit)"), - NULL - }; - -@@ -47,6 +48,7 @@ - "8", N_("256 Colors"), - "16", N_("High Color (16 bit)"), - "24", N_("True Color (24 bit)"), -+ "32", N_("True Color (32 bit)"), - NULL - }; - diff --git a/remmina.spec b/remmina.spec index 6f291b0..e229c37 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,25 +1,35 @@ Name: remmina -Version: 0.7.5 -Release: 3%{?dist} +Version: 0.9.3 +Release: 1%{?dist} Summary: Remote Desktop Client Group: Applications/Internet License: GPLv2+ and MIT URL: http://remmina.sourceforge.net Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz -Patch0: remmina-0.7.5-32bpp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: intltool, gtk2-devel, libvncserver-devel -BuildRequires: libjpeg-devel, gnutls-devel, libssh-devel -BuildRequires: avahi-ui-devel, vte-devel, unique-devel -BuildRequires: gettext, desktop-file-utils - -Requires: rdesktop, xorg-x11-server-Xephyr - +BuildRequires: gtk2-devel +BuildRequires: libssh-devel +BuildRequires: libgcrypt-devel +BuildRequires: avahi-ui-devel +BuildRequires: vte-devel +BuildRequires: unique-devel +BuildRequires: gettext +BuildRequires: intltool +BuildRequires: desktop-file-utils + +# Remmina used to be called grdc Provides: grdc = %{version} Obsoletes: grdc < 0.6.1 +# Remmina has a generic trayicon now +Provides: gnome-applet-remmina = %{version} +Provides: xfce4-remmina-plugin = %{version} +Obsoletes: gnome-applet-remmina < 0.7.3 +Obsoletes: xfce4-remmina-plugin < 0.7.3 + + %description Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote @@ -28,14 +38,25 @@ computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistent user interface. Currently RDP, VNC, XDMCP and SSH are supported. +Please don't forget to install the plugins for the protocols you want to use. + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +The %{name}-devel package contains header files for developing plugins for +%{name}. + %prep %setup -q -%patch0 -p1 -b .32bpp %build -%configure --enable-vnc=dl +%configure make %{?_smp_mflags} @@ -77,7 +98,19 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/icons/hicolor/*/apps/%{name}.* %{_datadir}/%{name}/ +%files devel +%defattr(-,root,root,-) +%doc +%{_includedir}/%{name}/ + %changelog +* Wed Jan 19 2011 Christoph Wickert - 0.9.3-1 +- Update to 0.9.3 + +* Sun Nov 28 2010 Christoph Wickert - 0.8.3-1 +- Update to 0.8.3 +- Plugins are in remmina-plugins now + * Sat Nov 27 2010 Christoph Wickert - 0.7.5-3 - Enable 32-bit color depth (#656120) diff --git a/sources b/sources index 13b55e0..ba957cc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9b787672b63c57ca9323072f1304ef10 remmina-0.7.5.tar.gz +c87004a70ec62acbae732e8d47f71ba7 remmina-0.9.3.tar.gz From fb99b0826c9b5df921ead2328a0c035657a4b099 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 9 Feb 2011 01:24:52 -0600 Subject: [PATCH 011/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index e229c37..9dac2f2 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ Name: remmina Version: 0.9.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -104,6 +104,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_includedir}/%{name}/ %changelog +* Wed Feb 09 2011 Fedora Release Engineering - 0.9.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Wed Jan 19 2011 Christoph Wickert - 0.9.3-1 - Update to 0.9.3 From 4f1c918907306d1963d84aaaa8a3e074ec5e364d Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Sat, 5 Mar 2011 22:20:16 +0100 Subject: [PATCH 012/185] Fix obsoletes for for gnome-applet-remmina and xfce4-remmina-plugin --- remmina.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/remmina.spec b/remmina.spec index 9dac2f2..7e634d9 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ Name: remmina Version: 0.9.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -26,8 +26,8 @@ Obsoletes: grdc < 0.6.1 # Remmina has a generic trayicon now Provides: gnome-applet-remmina = %{version} Provides: xfce4-remmina-plugin = %{version} -Obsoletes: gnome-applet-remmina < 0.7.3 -Obsoletes: xfce4-remmina-plugin < 0.7.3 +Obsoletes: gnome-applet-remmina <= 0.7.3 +Obsoletes: xfce4-remmina-plugin <= 0.7.3 %description @@ -104,6 +104,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_includedir}/%{name}/ %changelog +* Sat Mar 05 2011 Christoph Wickert - 0.9.3-3 +- Fix obsoletes for for gnome-applet-remmina and xfce4-remmina-plugin + * Wed Feb 09 2011 Fedora Release Engineering - 0.9.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From f9ca22e99252e152198351661699d7208da7640c Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 6 Dec 2011 01:01:36 -0500 Subject: [PATCH 013/185] Rebuild for new libpng --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 7e634d9..2712be1 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ Name: remmina Version: 0.9.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -104,6 +104,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_includedir}/%{name}/ %changelog +* Tue Dec 06 2011 Adam Jackson - 0.9.3-4 +- Rebuild for new libpng + * Sat Mar 05 2011 Christoph Wickert - 0.9.3-3 - Fix obsoletes for for gnome-applet-remmina and xfce4-remmina-plugin From 303c5a6cdc33bde74b051d3f1c936e3fc761f048 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 20:48:15 -0600 Subject: [PATCH 014/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 2712be1..25ede13 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ Name: remmina Version: 0.9.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -104,6 +104,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_includedir}/%{name}/ %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 0.9.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Tue Dec 06 2011 Adam Jackson - 0.9.3-4 - Rebuild for new libpng From c90ff24b6d68e72956a52b7d2c25f21f922b04aa Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Mon, 16 Apr 2012 00:00:50 +0200 Subject: [PATCH 015/185] Update to 1.0.0 - Plugins are now part of this package (again) - Fix two linker errors - Add VCS key --- .gitignore | 2 + remmina.spec | 251 +++++++++++++++++++++++++++++++++++++++++++++++---- sources | 2 +- 3 files changed, 234 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index f955bda..7332920 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ remmina-0.7.5.tar.gz /remmina-0.9.3.tar.gz +/remmina-20120330gitffba771d.tar.bz2 +/Remmina-1.0.0.tar.gz diff --git a/remmina.spec b/remmina.spec index 25ede13..64d6365 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,23 +1,38 @@ +# Review at https://bugzilla.redhat.com/show_bug.cgi?id=553402 + Name: remmina -Version: 0.9.3 -Release: 5%{?dist} +Version: 1.0.0 +Release: 1%{?dist} Summary: Remote Desktop Client Group: Applications/Internet License: GPLv2+ and MIT URL: http://remmina.sourceforge.net -Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Source0: https://github.com/downloads/FreeRDP/Remmina/Remmina-%{version}.tar.gz +#VCS: git:https://github.com/FreeRDP/Remmina.git + +# The following two patches will fix some linking errors +# https://github.com/FreeRDP/Remmina/commit/503a008e +Patch0: remmina-1.0.0-fix-library-name.patch +# https://github.com/FreeRDP/Remmina/commit/13f20367 +Patch1: remmina-1.0.0-linker-error.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: gtk2-devel -BuildRequires: libssh-devel +BuildRequires: gtk3-devel +BuildRequires: libssh-devel >= 0.4. BuildRequires: libgcrypt-devel BuildRequires: avahi-ui-devel -BuildRequires: vte-devel -BuildRequires: unique-devel +BuildRequires: vte3-devel +BuildRequires: cmake BuildRequires: gettext BuildRequires: intltool -BuildRequires: desktop-file-utils +BuildRequires: desktop-file-utils +BuildRequires: libxkbfile-devel + +BuildRequires: gnutls-devel +BuildRequires: libjpeg-devel +BuildRequires: libvncserver-devel # Remmina used to be called grdc Provides: grdc = %{version} @@ -45,36 +60,183 @@ Please don't forget to install the plugins for the protocols you want to use. Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} +Requires: pkgconfig %description devel The %{name}-devel package contains header files for developing plugins for %{name}. +%package plugins-common +Summary: Common files for Remmina Remote Desktop Client plugins +Group: Applications/System +Requires: remmina >= 0.9 + +%description plugins-common +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny netbooks. + +This package contains files shared among all plugins for the Remmina remote +desktop client. + + +%package plugins-gnome +Summary: GNOME keyring integration for Remmina Remote Desktop Client +BuildRequires: libgnome-keyring-devel +Group: Applications/System +Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} +Requires: libgnome-keyring + +%description plugins-gnome +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny netbooks. + +This package contains the plugin with GNOME keyring support for the Remmina +remote desktop client. + + +%package plugins-nx +Summary: NX plugin for Remmina Remote Desktop Client +Group: Applications/System +Requires: %{name}-common = %{version}-%{release} +Requires: nx + +%description plugins-nx +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny netbooks. + +This package contains the NX plugin for the Remmina remote desktop client. + + +%package plugins-rdp +Summary: RDP plugin for Remmina Remote Desktop Client +Group: Applications/System +BuildRequires: freerdp-devel +Requires: %{name}-common = %{version}-%{release} +Requires: freerdp + +%description plugins-rdp +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny netbooks. + +This package contains the Remote Desktop Protocol (RDP) plugin for the Remmina +remote desktop client. + + +%package plugins-telepathy +Summary: Telepathy plugin for Remmina Remote Desktop Client +Group: Applications/System +BuildRequires: telepathy-glib-devel +Requires: %{name}-common = %{version}-%{release} + +%description plugins-telepathy +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny netbooks. + +This package contains the Telepathy plugin for the Remmina remote desktop +client. + + +%package plugins-vnc +Summary: VNC plugin for Remmina Remote Desktop Client +Group: Applications/System +BuildRequires: gnutls-devel +BuildRequires: libjpeg-devel +BuildRequires: libvncserver-devel +Requires: %{name}-common = %{version}-%{release} + +%description plugins-vnc +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny netbooks. + +This package contains the VNC plugin for the Remmina remote desktop +client. + + +%package plugins-xdmcp +Summary: XDMCP plugin for Remmina Remote Desktop Client +Group: Applications/System +Requires: %{name}-common = %{version}-%{release} +Requires: xorg-x11-server-Xephyr + +%description plugins-xdmcp +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny netbooks. + +This package contains the XDMCP plugin for the Remmina remote desktop +client. + + %prep -%setup -q +%setup -qn FreeRDP-Remmina-356c033 + +%patch0 -p1 -b .fix-library-name +%patch1 -p1 -b .linker-error +# Don't hardcode libdir +sed -i "s,/lib/remmina/plugins,/%{_lib}/remmina/plugins,g" CMakeLists.txt + +# Don't build against bundled libvncserver +#grep -v libvncserver remmina-plugins/CMakeLists.txt > remmina-plugins/CMakeLists.txt.new +#mv remmina-plugins/CMakeLists.txt.new remmina-plugins/CMakeLists.txt +# +#rm -rf remmina-plugins/vnc/libvncserver/ %build -%configure -make %{?_smp_mflags} +mkdir -p build +pushd build + +LDFLAGS="-Wl,-z,relro -Wl,--no-as-needed" + +%cmake \ + -DWITH_PTHREAD=ON \ + -DWITH_GCRYPT=ON \ + -DWITH_LIBSSH=ON \ + -DWITH_VTE=ON \ + -DWITH_GETTEXT=ON \ + -DWITH_LIBSSH=ON \ + -DWITH_FREERDP=ON \ + -DWITH_TELEPATHY=ON \ + -DWITH_ZLIB=ON \ + -DWITH_GETTEXT=ON \ + -DWITH_AVAHI=ON \ + -DWITH_APPINDICATOR=OFF \ + -LIBVNCSERVER_INCLUDE_DIRS=%{_includedir} \ + .. +make %{?_smp_mflags} +popd %install -rm -rf $RPM_BUILD_ROOT -make install DESTDIR=$RPM_BUILD_ROOT +rm -rf %{buildroot} +# make install DESTDIR=%{buildroot} +make install/fast DESTDIR=%{buildroot} -C build + + +# dirty hack as desktop file does not get built. +sed 's,^_,,g' remmina/desktop/remmina.desktop.in > remmina/desktop/remmina.desktop + +# another dirty hack +mv %{buildroot}/usr/share/remmina/icons %{buildroot}/usr/share/icons desktop-file-install --vendor="" --delete-original \ --add-category="RemoteAccess" \ - --remove-category="X-GNOME-NetworkSettings" \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop + --remove-key="Actions" \ + --dir %{buildroot}%{_datadir}/applications \ + remmina/desktop/remmina.desktop %find_lang %{name} - +%find_lang %{name}-plugins %clean -rm -rf $RPM_BUILD_ROOT +rm -rf %{buildroot} %post @@ -92,18 +254,67 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang %defattr(-,root,root,-) -%doc AUTHORS ChangeLog COPYING README +# FIXME: Add NEWS if not empty +%doc remmina/AUTHORS remmina/ChangeLog remmina/COPYING README %{_bindir}/%{name} %{_datadir}/applications/*.desktop -%{_datadir}/icons/hicolor/*/apps/%{name}.* +%{_datadir}/icons/hicolor/*/*/*.* %{_datadir}/%{name}/ %files devel %defattr(-,root,root,-) %doc %{_includedir}/%{name}/ +%{_libdir}/pkgconfig/remmina.pc + +%files plugins-common -f %{name}-plugins.lang +%defattr(-,root,root,-) +# FIXME: Add docs once there are some *proper* ones +#%doc remmina-plugins/AUTHORS remmina-plugins/COPYING +%dir %{_libdir}/remmina/ +%dir %{_libdir}/remmina/plugins/ + +%files plugins-gnome +%defattr(-,root,root,-) +%{_libdir}/remmina/plugins/remmina-plugins-gnome.so + +%files plugins-nx +%defattr(-,root,root,-) +%{_libdir}/remmina/plugins/remmina-plugin-nx.so +%{_datadir}/icons/hicolor/*/emblems/remmina-nx.png + +%files plugins-rdp +%defattr(-,root,root,-) +%{_libdir}/remmina/plugins/remmina-plugin-rdp.so +%{_datadir}/icons/hicolor/*/emblems/remmina-rdp-ssh.png +%{_datadir}/icons/hicolor/*/emblems/remmina-rdp.png + +%files plugins-telepathy +%defattr(-,root,root,-) +%{_libdir}/remmina/plugins/remmina-plugin-telepathy.so +#%{_datadir}/dbus-1/services/org.freedesktop.Telepathy.Client.Remmina.service +#%{_datadir}/telepathy/clients/Remmina.client + +%files plugins-vnc +%defattr(-,root,root,-) +%{_libdir}/remmina/plugins/remmina-plugin-vnc.so +%{_datadir}/icons/hicolor/*/emblems/remmina-vnc-ssh.png +%{_datadir}/icons/hicolor/*/emblems/remmina-vnc.png + +%files plugins-xdmcp +%defattr(-,root,root,-) +%{_libdir}/remmina/plugins/remmina-plugin-xdmcp.so +%{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp-ssh.png +%{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp.png + %changelog +* Sun Apr 15 2012 Christoph Wickert - 1.0.0-1 +- Update to 1.0.0 +- Plugins are now part of this package (again) +- Fix two linker errors +- Add VCS key + * Sat Jan 14 2012 Fedora Release Engineering - 0.9.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index ba957cc..c37d06c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c87004a70ec62acbae732e8d47f71ba7 remmina-0.9.3.tar.gz +701c540acaab961bc3adf130a2ddb8b1 Remmina-1.0.0.tar.gz From 2d4e6804c2fb5cbfe5ed79f08498bfd3ebb078d3 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Mon, 16 Apr 2012 00:14:11 +0200 Subject: [PATCH 016/185] Add missing patches --- remmina-1.0.0-fix-library-name.patch | 25 +++ remmina-1.0.0-linker-error.patch | 262 +++++++++++++++++++++++++++ 2 files changed, 287 insertions(+) create mode 100644 remmina-1.0.0-fix-library-name.patch create mode 100644 remmina-1.0.0-linker-error.patch diff --git a/remmina-1.0.0-fix-library-name.patch b/remmina-1.0.0-fix-library-name.patch new file mode 100644 index 0000000..1774dd6 --- /dev/null +++ b/remmina-1.0.0-fix-library-name.patch @@ -0,0 +1,25 @@ +From 503a008e4aedc74b775c785f96292b8f5c448137 Mon Sep 17 00:00:00 2001 +From: Andrey +Date: Sat, 10 Mar 2012 01:00:32 +0400 +Subject: [PATCH] fix library name mistake + +--- + cmake/FindGTK3.cmake | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake +index c1b019e..f73b64d 100644 +--- a/cmake/FindGTK3.cmake ++++ b/cmake/FindGTK3.cmake +@@ -48,7 +48,7 @@ find_path(GDKPIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h + HINTS ${PC_GDKPIXBUF_INCLUDEDIR} ${PC_GDKPIXBUF_INCLUDE_DIRS} + PATH_SUFFIXES gdk-pixbuf-2.0) + +-find_library(GDKPIXBUF_LIBRARY NAMES gdk-3 ++find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0 + HINTS ${PC_GDKPIXBUF_LIBDIR} ${PC_GDKPIXBUF_LIBRARY_DIRS}) + + # Glib +-- +1.7.5.4 + diff --git a/remmina-1.0.0-linker-error.patch b/remmina-1.0.0-linker-error.patch new file mode 100644 index 0000000..298767c --- /dev/null +++ b/remmina-1.0.0-linker-error.patch @@ -0,0 +1,262 @@ +From 13f203672155cd52278655f03da7ff8dcff75c29 Mon Sep 17 00:00:00 2001 +From: Andrey Gankov +Date: Sat, 10 Mar 2012 02:55:32 +0400 +Subject: [PATCH] Fix Issue #9: linker error + +--- + cmake/FindGLIB2.cmake | 120 ++++++++++++++++++++++++++++++++++++++++++++++++ + cmake/FindGTK2.cmake | 21 ++------- + cmake/FindGTK3.cmake | 24 +++------- + remmina/CMakeLists.txt | 9 ++++ + 4 files changed, 140 insertions(+), 34 deletions(-) + create mode 100644 cmake/FindGLIB2.cmake + +diff --git a/cmake/FindGLIB2.cmake b/cmake/FindGLIB2.cmake +new file mode 100644 +index 0000000..8208ded +--- /dev/null ++++ b/cmake/FindGLIB2.cmake +@@ -0,0 +1,120 @@ ++# Remmina - The GTK+ Remote Desktop Client ++# ++# Copyright (C) 2012 Andrey Gankov ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, ++# Boston, MA 02111-1307, USA. ++ ++set(_GLIB_found_all true) ++ ++# Glib ++ ++pkg_check_modules(PC_GLIB2 glib-2.0) ++ ++if(NOT PC_GLIB2_FOUND) ++ set(_GLIB_found_all false) ++endif() ++ ++find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h ++ HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} ++ PATH_SUFFIXES glib-2.0) ++ ++find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h ++ HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} ++ PATH_SUFFIXES glib-2.0/include) ++ ++set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2}) ++ ++find_library(GLIB2_LIBRARY NAMES glib-2.0) ++ ++# GIO ++ ++pkg_check_modules(PC_GIO gio-2.0) ++ ++if(NOT PC_GIO_FOUND) ++ set(_GLIB_found_all false) ++endif() ++ ++find_path(GIO_INCLUDE_DIR gio/gio.h ++ HINTS ${PC_GIO_INCLUDEDIR} ${PC_GIO_INCLUDE_DIRS} ++ PATH_SUFFIXES gio-2.0) ++ ++find_library(GIO_LIBRARY NAMES gio-2.0 ++ HINTS ${PC_GIO_LIBDIR} ${PC_GIO_LIBRARY_DIRS}) ++ ++# gobject ++ ++pkg_check_modules(PC_GOBJECT gobject-2.0) ++ ++if(NOT PC_GOBJECT_FOUND) ++ set(_GLIB_found_all false) ++endif() ++ ++find_path(GOBJECT_INCLUDE_DIR gobject/gobject.h ++ HINTS ${PC_GOBJECT_INCLUDEDIR} ${PC_GOBJECT_INCLUDE_DIRS} ++ PATH_SUFFIXES gobject-2.0) ++ ++find_library(GOBJECT_LIBRARY NAMES gobject-2.0 ++ HINTS ${PC_GOBJECT_LIBDIR} ${PC_GOBJECT_LIBRARY_DIRS}) ++ ++# gmodule ++ ++pkg_check_modules(PC_GMODULE gmodule-2.0) ++ ++if(NOT PC_GMODULE_FOUND) ++ set(_GLIB_found_all false) ++endif() ++ ++find_path(GMODULE_INCLUDE_DIR gmodule.h ++ HINTS ${PC_GMODULE_INCLUDEDIR} ${PC_GMODULE_INCLUDE_DIRS} ++ PATH_SUFFIXES gmodule-2.0) ++ ++find_library(GMODULE_LIBRARY NAMES gmodule-2.0 ++ HINTS ${PC_GMODULE_LIBDIR} ${PC_GMODULE_LIBRARY_DIRS}) ++ ++# gthread ++ ++pkg_check_modules(PC_GTHREAD gthread-2.0) ++ ++if(NOT PC_GTHREAD_FOUND) ++ set(_GLIB_found_all false) ++endif() ++ ++find_path(GTHREAD_INCLUDE_DIR glib/gthread.h ++ HINTS ${PC_GTHREAD_INCLUDEDIR} ${PC_GTHREAD_INCLUDE_DIRS} ++ PATH_SUFFIXES gthread-2.0) ++ ++find_library(GTHREAD_LIBRARY NAMES gthread-2.0 ++ HINTS ${PC_GTHREAD_LIBDIR} ${PC_GTHREAD_LIBRARY_DIRS}) ++ ++# Finalize ++ ++if(_GLIB_found_all) ++ include(FindPackageHandleStandardArgs) ++ ++ find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARY GLIB2_INCLUDE_DIR) ++ ++ set(GLIB2_LIBRARIES ${GLIB2_LIBRARY} ${GIO_LIBRARY} ${GOBJECT_LIBRARY} ${GMODULE_LIBRARY} ${GTHREAD_LIBRARY}) ++ set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${GIO_INCLUDE_DIR} ${GOBJECT_INCLUDE_DIR} ${GMODULE_INCLUDE_DIR} ${GTHREAD_INCLUDE_DIR}) ++ ++ mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARY) ++ ++ set(GLIB_FOUND true) ++else() ++ unset(GLIB2_LIBRARY) ++ unset(GLIB2_INCLUDE_DIR) ++ ++ set(GLIB_FOUND false) ++endif() +diff --git a/cmake/FindGTK2.cmake b/cmake/FindGTK2.cmake +index b33966e..caf0295 100644 +--- a/cmake/FindGTK2.cmake ++++ b/cmake/FindGTK2.cmake +@@ -63,24 +63,11 @@ find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0 + + # Glib + +-pkg_check_modules(PC_GLIB2 glib-2.0) +- +-if(NOT PC_GLIB2_FOUND) ++find_required_package(GLIB2) ++if(NOT GLIB2_FOUND) + set(_GTK2_found_all false) + endif() + +-find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h +- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} +- PATH_SUFFIXES glib-2.0) +- +-find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h +- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} +- PATH_SUFFIXES glib-2.0/include) +- +-set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2}) +- +-find_library(GLIB2_LIBRARY NAMES glib-2.0) +- + # Pango + + pkg_check_modules(PC_PANGO pango) +@@ -129,8 +116,8 @@ if(_GTK2_found_all) + + find_package_handle_standard_args(GTK2 DEFAULT_MSG GTK2_LIBRARY GTK2_INCLUDE_DIR) + +- set(GTK2_LIBRARIES ${GTK2_LIBRARY} ${GDK2_LIBRARY} ${GLIB2_LIBRARY} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) +- set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIR} ${GDK2_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) ++ set(GTK2_LIBRARIES ${GTK2_LIBRARY} ${GDK2_LIBRARY} ${GLIB2_LIBRARIES} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) ++ set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIR} ${GDK2_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) + + mark_as_advanced(GTK2_INCLUDE_DIR GTK2_LIBRARY) + +diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake +index f73b64d..decb00a 100644 +--- a/cmake/FindGTK3.cmake ++++ b/cmake/FindGTK3.cmake +@@ -53,24 +53,11 @@ find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0 + + # Glib + +-pkg_check_modules(PC_GLIB2 glib-2.0) +- +-if(NOT PC_GLIB2_FOUND) ++find_required_package(GLIB2) ++if(NOT GLIB2_FOUND) + set(_GTK3_found_all false) + endif() + +-find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h +- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} +- PATH_SUFFIXES glib-2.0) +- +-find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h +- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} +- PATH_SUFFIXES glib-2.0/include) +- +-set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2}) +- +-find_library(GLIB2_LIBRARY NAMES glib-2.0) +- + # Pango + + pkg_check_modules(PC_PANGO pango) +@@ -119,14 +106,17 @@ if(_GTK3_found_all) + + find_package_handle_standard_args(GTK3 DEFAULT_MSG GTK3_LIBRARY GTK3_INCLUDE_DIR) + +- set(GTK3_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GLIB2_LIBRARY} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) +- set(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) ++ set(GTK3_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GLIB2_LIBRARIES} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) ++ set(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) + + mark_as_advanced(GTK3_INCLUDE_DIR GTK3_LIBRARY) + + set(GTK3_FOUND true) + else() + unset(GTK3_LIBRARY) ++ unset(GTK3_INCLUDE_DIR) ++ ++ unset(GDK3_LIBRARY) + unset(GDK3_INCLUDE_DIR) + + set(GTK3_FOUND false) +diff --git a/remmina/CMakeLists.txt b/remmina/CMakeLists.txt +index 0fe7bbf..9e7c982 100644 +--- a/remmina/CMakeLists.txt ++++ b/remmina/CMakeLists.txt +@@ -93,6 +93,10 @@ add_executable(remmina ${REMMINA_SRCS}) + include_directories(${GTK_INCLUDE_DIRS}) + target_link_libraries(remmina ${GTK_LIBRARIES}) + ++find_package(X11) ++include_directories(${X11_INCLUDE_DIR}) ++target_link_libraries(remmina ${X11_LIBRARIES}) ++ + find_suggested_package(LIBSSH) + if(LIBSSH_FOUND) + add_definitions(-DHAVE_LIBSSH) +@@ -100,6 +104,11 @@ if(LIBSSH_FOUND) + target_link_libraries(remmina ${LIBSSH_LIBRARIES}) + endif() + ++if(PTHREAD_FOUND) ++ include_directories(${PTHREAD_INCLUDE_DIRS}) ++ target_link_libraries(remmina ${PTHREAD_LIBRARIES}) ++endif() ++ + if(GCRYPT_FOUND) + include_directories(${GCRYPT_INCLUDE_DIRS}) + target_link_libraries(remmina ${GCRYPT_LIBRARIES}) +-- +1.7.5.4 + From 53c455b4c5f80711041b020b6c7f2e2e7373e40c Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Mon, 23 Apr 2012 00:45:12 +0200 Subject: [PATCH 017/185] Fix dependencies and libdir --- remmina.spec | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/remmina.spec b/remmina.spec index 64d6365..2b2adf3 100644 --- a/remmina.spec +++ b/remmina.spec @@ -70,7 +70,8 @@ The %{name}-devel package contains header files for developing plugins for %package plugins-common Summary: Common files for Remmina Remote Desktop Client plugins Group: Applications/System -Requires: remmina >= 0.9 +BuildArch: noarch +Requires: %{name} >= 0.9 %description plugins-common Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -85,7 +86,7 @@ desktop client. Summary: GNOME keyring integration for Remmina Remote Desktop Client BuildRequires: libgnome-keyring-devel Group: Applications/System -Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} +Requires: %{name}-plugins-common = %{version}-%{release} Requires: libgnome-keyring %description plugins-gnome @@ -100,7 +101,7 @@ remote desktop client. %package plugins-nx Summary: NX plugin for Remmina Remote Desktop Client Group: Applications/System -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-plugins-common = %{version}-%{release} Requires: nx %description plugins-nx @@ -115,7 +116,7 @@ This package contains the NX plugin for the Remmina remote desktop client. Summary: RDP plugin for Remmina Remote Desktop Client Group: Applications/System BuildRequires: freerdp-devel -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-plugins-common = %{version}-%{release} Requires: freerdp %description plugins-rdp @@ -131,7 +132,7 @@ remote desktop client. Summary: Telepathy plugin for Remmina Remote Desktop Client Group: Applications/System BuildRequires: telepathy-glib-devel -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-plugins-common = %{version}-%{release} %description plugins-telepathy Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -148,7 +149,7 @@ Group: Applications/System BuildRequires: gnutls-devel BuildRequires: libjpeg-devel BuildRequires: libvncserver-devel -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-plugins-common = %{version}-%{release} %description plugins-vnc Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -162,7 +163,7 @@ client. %package plugins-xdmcp Summary: XDMCP plugin for Remmina Remote Desktop Client Group: Applications/System -Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-plugins-common = %{version}-%{release} Requires: xorg-x11-server-Xephyr %description plugins-xdmcp @@ -209,6 +210,7 @@ LDFLAGS="-Wl,-z,relro -Wl,--no-as-needed" -DWITH_AVAHI=ON \ -DWITH_APPINDICATOR=OFF \ -LIBVNCSERVER_INCLUDE_DIRS=%{_includedir} \ + -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ .. make %{?_smp_mflags} @@ -265,7 +267,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %defattr(-,root,root,-) %doc %{_includedir}/%{name}/ -%{_libdir}/pkgconfig/remmina.pc +%{_libdir}/pkgconfig/%{name}.pc %files plugins-common -f %{name}-plugins.lang %defattr(-,root,root,-) @@ -309,7 +311,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog -* Sun Apr 15 2012 Christoph Wickert - 1.0.0-1 +* Sun Apr 22 2012 Christoph Wickert - 1.0.0-1 - Update to 1.0.0 - Plugins are now part of this package (again) - Fix two linker errors From da61475abb7ce11373ec328e2bbbbaa66f26311b Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Mon, 23 Apr 2012 01:04:10 +0200 Subject: [PATCH 018/185] D'oh, plugins-common cannot be noarch --- remmina.spec | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/remmina.spec b/remmina.spec index 2b2adf3..1c13271 100644 --- a/remmina.spec +++ b/remmina.spec @@ -70,7 +70,6 @@ The %{name}-devel package contains header files for developing plugins for %package plugins-common Summary: Common files for Remmina Remote Desktop Client plugins Group: Applications/System -BuildArch: noarch Requires: %{name} >= 0.9 %description plugins-common @@ -86,7 +85,7 @@ desktop client. Summary: GNOME keyring integration for Remmina Remote Desktop Client BuildRequires: libgnome-keyring-devel Group: Applications/System -Requires: %{name}-plugins-common = %{version}-%{release} +Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} Requires: libgnome-keyring %description plugins-gnome @@ -101,7 +100,7 @@ remote desktop client. %package plugins-nx Summary: NX plugin for Remmina Remote Desktop Client Group: Applications/System -Requires: %{name}-plugins-common = %{version}-%{release} +Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} Requires: nx %description plugins-nx @@ -116,7 +115,7 @@ This package contains the NX plugin for the Remmina remote desktop client. Summary: RDP plugin for Remmina Remote Desktop Client Group: Applications/System BuildRequires: freerdp-devel -Requires: %{name}-plugins-common = %{version}-%{release} +Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} Requires: freerdp %description plugins-rdp @@ -132,7 +131,7 @@ remote desktop client. Summary: Telepathy plugin for Remmina Remote Desktop Client Group: Applications/System BuildRequires: telepathy-glib-devel -Requires: %{name}-plugins-common = %{version}-%{release} +Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} %description plugins-telepathy Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -149,7 +148,7 @@ Group: Applications/System BuildRequires: gnutls-devel BuildRequires: libjpeg-devel BuildRequires: libvncserver-devel -Requires: %{name}-plugins-common = %{version}-%{release} +Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} %description plugins-vnc Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -163,7 +162,7 @@ client. %package plugins-xdmcp Summary: XDMCP plugin for Remmina Remote Desktop Client Group: Applications/System -Requires: %{name}-plugins-common = %{version}-%{release} +Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} Requires: xorg-x11-server-Xephyr %description plugins-xdmcp From 8a5eb05ef58566580355a45072516f0d3ed50a44 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Fri, 1 Jun 2012 16:56:14 +0200 Subject: [PATCH 019/185] Add clipboard support (#818155) - Fix a memory leak and a crash --- remmina-1.0.0-add-clipboard-support.patch | 663 ++++++++++++++++++ remmina-1.0.0-clipboard-bugfix.patch | 73 ++ remmina-1.0.0-fix-crashes-in-some-cases.patch | 71 ++ remmina-1.0.0-fix-memory-leak.patch | 24 + remmina-1.0.0-some-more-clipboard-fixes.patch | 180 +++++ remmina.spec | 26 +- 6 files changed, 1036 insertions(+), 1 deletion(-) create mode 100644 remmina-1.0.0-add-clipboard-support.patch create mode 100644 remmina-1.0.0-clipboard-bugfix.patch create mode 100644 remmina-1.0.0-fix-crashes-in-some-cases.patch create mode 100644 remmina-1.0.0-fix-memory-leak.patch create mode 100644 remmina-1.0.0-some-more-clipboard-fixes.patch diff --git a/remmina-1.0.0-add-clipboard-support.patch b/remmina-1.0.0-add-clipboard-support.patch new file mode 100644 index 0000000..b5fd340 --- /dev/null +++ b/remmina-1.0.0-add-clipboard-support.patch @@ -0,0 +1,663 @@ +From 3ebdd6e7b0ee53ecdaf0d14bada6b92e7334b12a Mon Sep 17 00:00:00 2001 +From: Jean-Louis Dupond +Date: Mon, 30 Apr 2012 23:10:04 +0200 +Subject: [PATCH] Add clipboard support + +--- + remmina-plugins/rdp/CMakeLists.txt | 2 + + remmina-plugins/rdp/rdp_cliprdr.c | 459 ++++++++++++++++++++++++++++++++++++ + remmina-plugins/rdp/rdp_cliprdr.h | 33 +++ + remmina-plugins/rdp/rdp_event.c | 19 ++ + remmina-plugins/rdp/rdp_plugin.c | 15 ++ + remmina-plugins/rdp/rdp_plugin.h | 6 +- + 6 files changed, 533 insertions(+), 1 deletion(-) + create mode 100644 remmina-plugins/rdp/rdp_cliprdr.c + create mode 100644 remmina-plugins/rdp/rdp_cliprdr.h + +diff --git a/remmina-plugins/rdp/CMakeLists.txt b/remmina-plugins/rdp/CMakeLists.txt +index e3ec20b..8ae4a4d 100644 +--- a/remmina-plugins/rdp/CMakeLists.txt ++++ b/remmina-plugins/rdp/CMakeLists.txt +@@ -33,6 +33,8 @@ set(REMMINA_PLUGIN_RDP_SRCS + rdp_gdi.h + rdp_graphics.c + rdp_graphics.h ++ rdp_cliprdr.c ++ rdp_cliprdr.h + ) + + add_library(remmina-plugin-rdp ${REMMINA_PLUGIN_RDP_SRCS}) +diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c +new file mode 100644 +index 0000000..0821ffa +--- /dev/null ++++ b/remmina-plugins/rdp/rdp_cliprdr.c +@@ -0,0 +1,459 @@ ++/* ++ * Remmina - The GTK+ Remote Desktop Client ++ * Copyright (C) 2012-2012 Jean-Louis Dupond ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++#include "rdp_plugin.h" ++#include "rdp_cliprdr.h" ++ ++#include ++#include ++#include ++#include ++ ++/* ++ * Get the formats we can export based on the current clipboard data. ++ */ ++void remmina_rdp_cliprdr_get_target_types(uint32** dst_formats, uint16* size, GdkAtom* types, int count) ++{ ++ int i; ++ gboolean image = FALSE; ++ gboolean text = FALSE; ++ gboolean textutf8 = FALSE; ++ int matches = 1; ++ uint32* formats = (uint32*) xmalloc(sizeof(uint32) * 10); ++ ++ formats[0] = CB_FORMAT_RAW; ++ for (i = 0; i < count; i++) ++ { ++ GdkAtom atom = GDK_POINTER_TO_ATOM(types[i]); ++ gchar* name = gdk_atom_name(atom); ++ if (g_strcmp0("UTF8_STRING", name) == 0 || g_strcmp0("text/plain;charset=utf-8", name) == 0) ++ { ++ textutf8 = TRUE; ++ } ++ if (g_strcmp0("TEXT", name) == 0 || g_strcmp0("text/plain", name) == 0) ++ { ++ text = TRUE; ++ } ++ if (g_strcmp0("text/html", name) == 0) ++ { ++ formats[matches] = CB_FORMAT_HTML; ++ matches++; ++ } ++ if (g_strcmp0("image/png", name) == 0) ++ { ++ formats[matches] = CB_FORMAT_PNG; ++ image = TRUE; ++ matches++; ++ } ++ if (g_strcmp0("image/jpeg", name) == 0) ++ { ++ formats[matches] = CB_FORMAT_JPEG; ++ image = TRUE; ++ matches++; ++ } ++ if (g_strcmp0("image/bmp", name) == 0) ++ { ++ formats[matches] = CB_FORMAT_DIB; ++ image = TRUE; ++ matches++; ++ } ++ } ++ //Only add text formats if we don't have image formats ++ if (!image) ++ { ++ if (textutf8) ++ { ++ formats[matches] = CB_FORMAT_UNICODETEXT; ++ matches++; ++ } ++ if (text) ++ { ++ formats[matches] = CB_FORMAT_TEXT; ++ matches++; ++ } ++ } ++ ++ *size = (uint16)matches; ++ *dst_formats = (uint32*) xmalloc(sizeof(uint32) * matches); ++ memcpy(*dst_formats, formats, sizeof(uint32) * matches); ++ g_free(formats); ++} ++ ++int remmina_rdp_cliprdr_send_format_list_event(RemminaProtocolWidget* gp) ++{ ++ GtkClipboard* clipboard; ++ GdkAtom* targets; ++ gboolean result = 0; ++ gint count; ++ RDP_EVENT* rdp_event; ++ RDP_CB_FORMAT_LIST_EVENT* format_list_event; ++ rfContext* rfi = GET_DATA(gp); ++ ++ /* Lets see if we have something in our clipboard */ ++ THREADS_ENTER ++ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); ++ if (clipboard) ++ { ++ result = gtk_clipboard_wait_for_targets(clipboard, &targets, &count); ++ } ++ THREADS_LEAVE ++ ++ if (!result) ++ return 1; ++ ++ int i; ++ for (i = 0; i < count; i++) ++ { ++ g_printf("Target %d: %s\n", i, gdk_atom_name(targets[i])); ++ } ++ ++ rdp_event = (RDP_EVENT*) xnew(RDP_CB_FORMAT_LIST_EVENT); ++ rdp_event->event_class = RDP_EVENT_CLASS_CLIPRDR; ++ rdp_event->event_type = RDP_EVENT_TYPE_CB_FORMAT_LIST; ++ format_list_event = (RDP_CB_FORMAT_LIST_EVENT*) rdp_event; ++ ++ remmina_rdp_cliprdr_get_target_types(&format_list_event->formats, &format_list_event->num_formats, targets, count); ++ g_free(targets); ++ ++ int num_formats = format_list_event->num_formats; ++ g_printf("Sending %d formats\n", num_formats); ++ for (i = 0; i < num_formats; i++) ++ { ++ g_printf("Sending format %#X\n", format_list_event->formats[i]); ++ } ++ ++ return freerdp_channels_send_event(rfi->channels, (RDP_EVENT*) format_list_event); ++} ++ ++static uint8* lf2crlf(uint8* data, int* size) ++{ ++ uint8 c; ++ uint8* outbuf; ++ uint8* out; ++ uint8* in_end; ++ uint8* in; ++ int out_size; ++ ++ out_size = (*size) * 2 + 1; ++ outbuf = (uint8*) xmalloc(out_size); ++ out = outbuf; ++ in = data; ++ in_end = data + (*size); ++ ++ while (in < in_end) ++ { ++ c = *in++; ++ if (c == '\n') ++ { ++ *out++ = '\r'; ++ *out++ = '\n'; ++ } ++ else ++ { ++ *out++ = c; ++ } ++ } ++ ++ *out++ = 0; ++ *size = out - outbuf; ++ ++ return outbuf; ++} ++ ++static void crlf2lf(uint8* data, int* size) ++{ ++ uint8 c; ++ uint8* out; ++ uint8* in; ++ uint8* in_end; ++ ++ out = data; ++ in = data; ++ in_end = data + (*size); ++ ++ while (in < in_end) ++ { ++ c = *in++; ++ ++ if (c != '\r') ++ *out++ = c; ++ } ++ ++ *size = out - data; ++} ++ ++uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, int* size) ++{ ++ g_printf("GetData: Requested Format: %#X\n", format); ++ rfContext* rfi = GET_DATA(gp); ++ GtkClipboard* clipboard; ++ uint8* inbuf = NULL; ++ uint8* outbuf = NULL; ++ GdkPixbuf *image = NULL; ++ ++ THREADS_ENTER ++ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); ++ if (clipboard) ++ { ++ if (format == CB_FORMAT_TEXT || format == CB_FORMAT_UNICODETEXT || format == CB_FORMAT_HTML) ++ { ++ inbuf = (uint8*)gtk_clipboard_wait_for_text(clipboard); ++ } ++ if (format == CB_FORMAT_PNG || format == CB_FORMAT_JPEG || format == CB_FORMAT_DIB) ++ { ++ image = gtk_clipboard_wait_for_image(clipboard); ++ } ++ } ++ THREADS_LEAVE ++ ++ if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT) ++ { ++ lf2crlf(inbuf, size); ++ if (format == CB_FORMAT_TEXT) ++ { ++ outbuf = inbuf; ++ } ++ if (format == CB_FORMAT_HTML) ++ { ++ //TODO: check if we need special handling for HTML ++ outbuf = inbuf; ++ } ++ if (format == CB_FORMAT_UNICODETEXT) ++ { ++ size_t out_size; ++ UNICONV* uniconv; ++ ++ uniconv = freerdp_uniconv_new(); ++ outbuf = (uint8*) freerdp_uniconv_out(uniconv, (char*) inbuf, &out_size); ++ freerdp_uniconv_free(uniconv); ++ *size = out_size + 2; ++ } ++ } ++ if (format == CB_FORMAT_PNG || format == CB_FORMAT_JPEG || format == CB_FORMAT_DIB) ++ { ++ gchar* data; ++ gsize buffersize; ++ if (format == CB_FORMAT_PNG) ++ { ++ gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "png", NULL, NULL); ++ memcpy(outbuf, data, buffersize); ++ } ++ if (format == CB_FORMAT_JPEG) ++ { ++ gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "jpeg", NULL, NULL); ++ memcpy(outbuf, data, buffersize); ++ } ++ if (format == CB_FORMAT_DIB) ++ { ++ gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "bmp", NULL, NULL); ++ *size = buffersize - 14; ++ g_printf("Size of pixels: %d\n", *size); ++ outbuf = (uint8*) xmalloc(*size); ++ memcpy(outbuf, data + 14, *size); ++ } ++ } ++ ++ if (!outbuf) ++ outbuf = (uint8*)""; ++ ++ return outbuf; ++} ++ ++void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVENT* event) ++{ ++ g_printf("Received RDP_EVENT_TYPE_CB_DATA_RESPONSE\n"); ++ ++ GtkClipboard* clipboard; ++ GdkPixbuf *image = NULL; ++ uint8* data; ++ int size; ++ gboolean text = FALSE; ++ gboolean img = FALSE; ++ rfContext* rfi = GET_DATA(gp); ++ RDP_CB_DATA_RESPONSE_EVENT* data_response_event; ++ ++ data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*) event; ++ data = data_response_event->data; ++ size = data_response_event->size; ++ ++ g_printf("Requested format was: 0x%x\n", rfi->requested_format); ++ ++ if (rfi->requested_format == CB_FORMAT_TEXT || rfi->requested_format == CB_FORMAT_UNICODETEXT || rfi->requested_format == CB_FORMAT_HTML) ++ { ++ if (rfi->requested_format == CB_FORMAT_UNICODETEXT) ++ { ++ UNICONV* uniconv; ++ ++ uniconv = freerdp_uniconv_new(); ++ data = (uint8*) freerdp_uniconv_in(uniconv, data, size); ++ size = strlen((char*) data); ++ freerdp_uniconv_free(uniconv); ++ } ++ crlf2lf(data, &size); ++ text = TRUE; ++ } ++ if (rfi->requested_format == CB_FORMAT_DIB || rfi->requested_format == CB_FORMAT_PNG || rfi->requested_format == CB_FORMAT_JPEG) ++ { ++ /* Reconstruct header */ ++ if (rfi->requested_format == CB_FORMAT_DIB) ++ { ++ STREAM* s; ++ uint16 bpp; ++ uint32 offset; ++ uint32 ncolors; ++ ++ s = stream_new(0); ++ stream_attach(s, data, size); ++ stream_seek(s, 14); ++ stream_read_uint16(s, bpp); ++ stream_read_uint32(s, ncolors); ++ offset = 14 + 40 + (bpp <= 8 ? (ncolors == 0 ? (1 << bpp) : ncolors) * 4 : 0); ++ stream_detach(s); ++ stream_free(s); ++ ++ s = stream_new(14 + size); ++ stream_write_uint8(s, 'B'); ++ stream_write_uint8(s, 'M'); ++ stream_write_uint32(s, 14 + size); ++ stream_write_uint32(s, 0); ++ stream_write_uint32(s, offset); ++ stream_write(s, data, size); ++ ++ data = stream_get_head(s); ++ size = stream_get_length(s); ++ stream_detach(s); ++ stream_free(s); ++ } ++ GdkPixbufLoader *pixbuf; ++ pixbuf = gdk_pixbuf_loader_new(); ++ gdk_pixbuf_loader_write(pixbuf, data, size, NULL); ++ image = gdk_pixbuf_loader_get_pixbuf(pixbuf); ++ img = TRUE; ++ } ++ ++ THREADS_ENTER ++ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); ++ if (clipboard) ++ { ++ if (text || img) ++ rfi->clipboard_wait = TRUE; ++ if (text) ++ gtk_clipboard_set_text(clipboard, (gchar*)data, size); ++ if (img) ++ gtk_clipboard_set_image(clipboard, image); ++ } ++ THREADS_LEAVE ++ ++} ++ ++void remmina_handle_channel_event(RemminaProtocolWidget* gp, RDP_EVENT* event) ++{ ++ RDP_EVENT* rdp_event = NULL; ++ rfContext* rfi = GET_DATA(gp); ++ ++ switch (event->event_class) ++ { ++ case RDP_EVENT_CLASS_CLIPRDR: ++ g_printf("Event ID: %d\n", event->event_type); ++ if (event->event_type == RDP_EVENT_TYPE_CB_MONITOR_READY) ++ { ++ g_printf("Received CB_MONITOR_READY - Sending RDP_EVENT_TYPE_CB_FORMAT_LIST\n"); ++ /* Sending our format list */ ++ remmina_rdp_cliprdr_send_format_list_event(gp); ++ } ++ if (event->event_type == RDP_EVENT_TYPE_CB_FORMAT_LIST) ++ { ++ /* We received a FORMAT_LIST from the server, update our clipboard */ ++ g_printf("Received RDP_EVENT_TYPE_CB_FORMAT_LIST\n"); ++ int i; ++ uint32 format = CB_FORMAT_RAW; ++ RDP_CB_FORMAT_LIST_EVENT* format_list_event; ++ ++ format_list_event = (RDP_CB_FORMAT_LIST_EVENT*) event; ++ ++ g_printf("Format List Size: %d\n", format_list_event->num_formats); ++ for (i = 0; i < format_list_event->num_formats; i++) ++ { ++ g_printf("Format: 0x%X\n", format_list_event->formats[i]); ++ if (format_list_event->formats[i] == CB_FORMAT_UNICODETEXT) ++ { ++ format = CB_FORMAT_UNICODETEXT; ++ break; ++ } ++ if (format_list_event->formats[i] == CB_FORMAT_DIB) ++ { ++ format = CB_FORMAT_DIB; ++ break; ++ } ++ if (format_list_event->formats[i] == CB_FORMAT_JPEG) ++ { ++ format = CB_FORMAT_JPEG; ++ break; ++ } ++ if (format_list_event->formats[i] == CB_FORMAT_PNG) ++ { ++ format = CB_FORMAT_PNG; ++ break; ++ } ++ if (format_list_event->formats[i] == CB_FORMAT_TEXT) ++ { ++ format = CB_FORMAT_TEXT; ++ break; ++ } ++ } ++ rfi->requested_format = format; ++ ++ g_printf("Format Requested: 0x%X\n", format); ++ /* Request Clipboard data of the server */ ++ RDP_CB_DATA_REQUEST_EVENT* data_request_event; ++ rdp_event = (RDP_EVENT*) xnew(RDP_CB_DATA_REQUEST_EVENT); ++ rdp_event->event_class = RDP_EVENT_CLASS_CLIPRDR; ++ rdp_event->event_type = RDP_EVENT_TYPE_CB_DATA_REQUEST; ++ data_request_event = (RDP_CB_DATA_REQUEST_EVENT*) rdp_event; ++ data_request_event->format = format; ++ freerdp_channels_send_event(rfi->channels, (RDP_EVENT*) data_request_event); ++ } ++ if (event->event_type == RDP_EVENT_TYPE_CB_DATA_REQUEST) ++ { ++ g_printf("Received RDP_EVENT_TYPE_CB_DATA_REQUEST\n"); ++ ++ uint8* data; ++ int size; ++ RDP_CB_DATA_REQUEST_EVENT* data_request_event = (RDP_CB_DATA_REQUEST_EVENT*) event; ++ RDP_CB_DATA_RESPONSE_EVENT* data_response_event; ++ ++ g_printf("Event Format: %d\n", data_request_event->format); ++ ++ /* Send Data */ ++ rdp_event = (RDP_EVENT*) xnew(RDP_CB_DATA_RESPONSE_EVENT); ++ rdp_event->event_class = RDP_EVENT_CLASS_CLIPRDR; ++ rdp_event->event_type = RDP_EVENT_TYPE_CB_DATA_RESPONSE; ++ data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*) rdp_event; ++ data = remmina_rdp_cliprdr_get_data(gp, data_request_event->format, &size); ++ data_response_event->data = data; ++ data_response_event->size = size; ++ freerdp_channels_send_event(rfi->channels, rdp_event); ++ } ++ if (event->event_type == RDP_EVENT_TYPE_CB_DATA_RESPONSE) ++ { ++ remmina_rdp_cliprdr_parse_response_event(gp, event); ++ } ++ } ++} +diff --git a/remmina-plugins/rdp/rdp_cliprdr.h b/remmina-plugins/rdp/rdp_cliprdr.h +new file mode 100644 +index 0000000..ed6bf70 +--- /dev/null ++++ b/remmina-plugins/rdp/rdp_cliprdr.h +@@ -0,0 +1,33 @@ ++/* ++ * Remmina - The GTK+ Remote Desktop Client ++ * Copyright (C) 2010-2011 Vic Lee ++ * Copyright (C) 2012-2012 Jean-Louis Dupond ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++#ifndef __REMMINA_RDP_CLIPRDR_H__ ++#define __REMMINA_RDP_CLIPRDR_H__ ++ ++G_BEGIN_DECLS ++ ++RDP_EVENT* remmina_rdp_cliprdr_get_event(uint16 event_type); ++int remmina_rdp_cliprdr_send_format_list_event(RemminaProtocolWidget* gp); ++void remmina_handle_channel_event(RemminaProtocolWidget* gp, RDP_EVENT* event); ++ ++G_END_DECLS ++ ++#endif +diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c +index f77f5f1..a936fb1 100644 +--- a/remmina-plugins/rdp/rdp_event.c ++++ b/remmina-plugins/rdp/rdp_event.c +@@ -461,6 +461,16 @@ static gboolean remmina_rdp_event_on_key(GtkWidget* widget, GdkEventKey* event, + return TRUE; + } + ++static gboolean remmina_rdp_event_on_clipboard(GtkClipboard *clipboard, GdkEvent *event, RemminaProtocolWidget *gp) ++{ ++ RemminaPluginRdpEvent rdp_event = { 0 }; ++ ++ rdp_event.type = REMMINA_RDP_EVENT_TYPE_CLIPBOARD; ++ remmina_rdp_event_event_push(gp, &rdp_event); ++ ++ return TRUE; ++} ++ + void remmina_rdp_event_init(RemminaProtocolWidget* gp) + { + gint n; +@@ -470,6 +480,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) + XPixmapFormatValues* pf; + XPixmapFormatValues* pfs; + rfContext* rfi; ++ GtkClipboard* clipboard; + + rfi = GET_DATA(gp); + rfi->drawing_area = gtk_drawing_area_new(); +@@ -508,6 +519,14 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) + g_signal_connect(G_OBJECT(rfi->drawing_area), "key-release-event", + G_CALLBACK(remmina_rdp_event_on_key), gp); + ++ RemminaFile* remminafile = remmina_plugin_service->protocol_plugin_get_file(gp); ++ if (!remmina_plugin_service->file_get_int(remminafile, "disableclipboard", FALSE)) ++ { ++ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); ++ g_signal_connect(clipboard, "owner-change", ++ G_CALLBACK(remmina_rdp_event_on_clipboard), gp); ++ } ++ + rfi->pressed_keys = g_array_new(FALSE, TRUE, sizeof (gint)); + rfi->event_queue = g_async_queue_new_full(g_free); + rfi->ui_queue = g_async_queue_new(); +diff --git a/remmina-plugins/rdp/rdp_plugin.c b/remmina-plugins/rdp/rdp_plugin.c +index 08874e6..fd0fe08 100644 +--- a/remmina-plugins/rdp/rdp_plugin.c ++++ b/remmina-plugins/rdp/rdp_plugin.c +@@ -24,6 +24,7 @@ + #include "rdp_graphics.h" + #include "rdp_file.h" + #include "rdp_settings.h" ++#include "rdp_cliprdr.h" + + #include + #include +@@ -31,6 +32,7 @@ + #include + #include + #include ++#include + + #define REMMINA_RDP_FEATURE_TOOL_REFRESH 1 + #define REMMINA_RDP_FEATURE_SCALE 2 +@@ -128,6 +130,11 @@ boolean rf_check_fds(RemminaProtocolWidget* gp) + input->MouseEvent(input, event->mouse_event.flags, + event->mouse_event.x, event->mouse_event.y); + break; ++ case REMMINA_RDP_EVENT_TYPE_CLIPBOARD: ++ if (!rfi->clipboard_wait) ++ remmina_rdp_cliprdr_send_format_list_event(gp); ++ rfi->clipboard_wait = FALSE; ++ break; + } + + g_free(event); +@@ -503,6 +510,7 @@ static boolean remmina_rdp_verify_certificate(freerdp* instance, char* subject, + + static int remmina_rdp_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size) + { ++ g_printf("EVENT RECEIVED -> DATA: %s\nSIZE: %d\nFLAGS: %d\n", (char*)data, size, flags); + return freerdp_channels_data(instance, channelId, data, size, flags, total_size); + } + +@@ -518,6 +526,7 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp) + fd_set rfds_set; + fd_set wfds_set; + rfContext* rfi; ++ RDP_EVENT* event; + + memset(rfds, 0, sizeof(rfds)); + memset(wfds, 0, sizeof(wfds)); +@@ -591,6 +600,12 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp) + { + break; + } ++ else ++ { ++ event = freerdp_channels_pop_event(rfi->channels); ++ if (event) ++ remmina_handle_channel_event(gp, event); ++ } + /* check ui */ + if (!rf_check_fds(gp)) + { +diff --git a/remmina-plugins/rdp/rdp_plugin.h b/remmina-plugins/rdp/rdp_plugin.h +index a3774d9..1931384 100644 +--- a/remmina-plugins/rdp/rdp_plugin.h ++++ b/remmina-plugins/rdp/rdp_plugin.h +@@ -133,12 +133,16 @@ struct rf_context + GArray* pressed_keys; + GAsyncQueue* event_queue; + gint event_pipe[2]; ++ ++ gboolean clipboard_wait; ++ uint32 requested_format; + }; + + typedef enum + { + REMMINA_RDP_EVENT_TYPE_SCANCODE, +- REMMINA_RDP_EVENT_TYPE_MOUSE ++ REMMINA_RDP_EVENT_TYPE_MOUSE, ++ REMMINA_RDP_EVENT_TYPE_CLIPBOARD + } RemminaPluginRdpEventType; + + struct remmina_plugin_rdp_event +-- +1.7.10 + diff --git a/remmina-1.0.0-clipboard-bugfix.patch b/remmina-1.0.0-clipboard-bugfix.patch new file mode 100644 index 0000000..c564c8e --- /dev/null +++ b/remmina-1.0.0-clipboard-bugfix.patch @@ -0,0 +1,73 @@ +From 97c2af8ccc913b0850ed4a54ed6c477cfbd7b475 Mon Sep 17 00:00:00 2001 +From: Jean-Louis Dupond +Date: Tue, 1 May 2012 17:37:21 +0200 +Subject: [PATCH] clipboard bugfix + cleanup of memory + +--- + remmina-plugins/rdp/rdp_cliprdr.c | 20 ++++++++++++++++---- + 1 file changed, 16 insertions(+), 4 deletions(-) + +diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c +index 0821ffa..b9b37ad 100644 +--- a/remmina-plugins/rdp/rdp_cliprdr.c ++++ b/remmina-plugins/rdp/rdp_cliprdr.c +@@ -225,7 +225,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + + if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT) + { +- lf2crlf(inbuf, size); ++ inbuf = lf2crlf(inbuf, size); + if (format == CB_FORMAT_TEXT) + { + outbuf = inbuf; +@@ -269,6 +269,11 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + memcpy(outbuf, data + 14, *size); + } + } ++ ++ if (inbuf) ++ g_free(inbuf); ++ if (G_IS_OBJECT(image)) ++ g_object_unref(image); + + if (!outbuf) + outbuf = (uint8*)""; +@@ -288,7 +293,7 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE + gboolean img = FALSE; + rfContext* rfi = GET_DATA(gp); + RDP_CB_DATA_RESPONSE_EVENT* data_response_event; +- ++ GdkPixbufLoader *pixbuf; + data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*) event; + data = data_response_event->data; + size = data_response_event->size; +@@ -341,7 +346,6 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE + stream_detach(s); + stream_free(s); + } +- GdkPixbufLoader *pixbuf; + pixbuf = gdk_pixbuf_loader_new(); + gdk_pixbuf_loader_write(pixbuf, data, size, NULL); + image = gdk_pixbuf_loader_get_pixbuf(pixbuf); +@@ -355,9 +359,17 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE + if (text || img) + rfi->clipboard_wait = TRUE; + if (text) +- gtk_clipboard_set_text(clipboard, (gchar*)data, size); ++ { ++ gtk_clipboard_set_text(clipboard, (gchar*)data, size); ++ gtk_clipboard_store(clipboard); ++ } + if (img) ++ { + gtk_clipboard_set_image(clipboard, image); ++ gtk_clipboard_store(clipboard); ++ gdk_pixbuf_loader_close(pixbuf, NULL); ++ g_object_unref(pixbuf); ++ } + } + THREADS_LEAVE + +-- +1.7.10 + diff --git a/remmina-1.0.0-fix-crashes-in-some-cases.patch b/remmina-1.0.0-fix-crashes-in-some-cases.patch new file mode 100644 index 0000000..64baac0 --- /dev/null +++ b/remmina-1.0.0-fix-crashes-in-some-cases.patch @@ -0,0 +1,71 @@ +From 6ee2028996ee9d8802201e95f3cec56e2b307ddb Mon Sep 17 00:00:00 2001 +From: Jean-Louis Dupond +Date: Sat, 5 May 2012 16:54:18 +0200 +Subject: [PATCH] Fix crashes in some cases + +--- + remmina-plugins/rdp/rdp_cliprdr.c | 19 +++++++++++++------ + 1 file changed, 13 insertions(+), 6 deletions(-) + +diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c +index d84374e..772709c 100644 +--- a/remmina-plugins/rdp/rdp_cliprdr.c ++++ b/remmina-plugins/rdp/rdp_cliprdr.c +@@ -204,7 +204,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + g_printf("GetData: Requested Format: %#X\n", format); + rfContext* rfi = GET_DATA(gp); + GtkClipboard* clipboard; +- uint8* inbuf = (uint8*)""; ++ uint8* inbuf = NULL; + uint8* outbuf = NULL; + GdkPixbuf *image = NULL; + +@@ -223,10 +223,18 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + } + THREADS_LEAVE + ++ /* No data received, send nothing */ ++ if (inbuf == NULL && image == NULL) ++ { ++ g_printf("NO DATA RECEIVED\n"); ++ *size = 0; ++ return NULL; ++ } ++ ++ + if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT) + { +- if (inbuf == NULL) +- inbuf = (uint8*)""; ++ *size = strlen((char*)inbuf); + inbuf = lf2crlf(inbuf, size); + if (format == CB_FORMAT_TEXT) + { +@@ -258,12 +266,14 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "png", NULL, NULL); + outbuf = (uint8*) xmalloc(buffersize); + memcpy(outbuf, data, buffersize); ++ *size = buffersize; + } + if (format == CB_FORMAT_JPEG) + { + gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "jpeg", NULL, NULL); + outbuf = (uint8*) xmalloc(buffersize); + memcpy(outbuf, data, buffersize); ++ *size = buffersize; + } + if (format == CB_FORMAT_DIB) + { +@@ -276,9 +286,6 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + g_object_unref(image); + } + +- if (!outbuf) +- outbuf = (uint8*)""; +- + return outbuf; + } + +-- +1.7.10 + diff --git a/remmina-1.0.0-fix-memory-leak.patch b/remmina-1.0.0-fix-memory-leak.patch new file mode 100644 index 0000000..a0aac1a --- /dev/null +++ b/remmina-1.0.0-fix-memory-leak.patch @@ -0,0 +1,24 @@ +From b22778270ad05fed21797d5a5d4b782d6e273a59 Mon Sep 17 00:00:00 2001 +From: Jean-Louis Dupond +Date: Sat, 5 May 2012 17:15:29 +0200 +Subject: [PATCH] Fix memory leak + +--- + remmina-plugins/rdp/rdp_cliprdr.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c +index 772709c..ea8baa0 100644 +--- a/remmina-plugins/rdp/rdp_cliprdr.c ++++ b/remmina-plugins/rdp/rdp_cliprdr.c +@@ -74,6 +74,7 @@ void remmina_rdp_cliprdr_get_target_types(uint32** dst_formats, uint16* size, Gd + image = TRUE; + matches++; + } ++ g_free(name); + } + //Only add text formats if we don't have image formats + if (!image) +-- +1.7.10 + diff --git a/remmina-1.0.0-some-more-clipboard-fixes.patch b/remmina-1.0.0-some-more-clipboard-fixes.patch new file mode 100644 index 0000000..ad31d51 --- /dev/null +++ b/remmina-1.0.0-some-more-clipboard-fixes.patch @@ -0,0 +1,180 @@ +From 84327f81995b4efe56503b94216e35eb9e99f243 Mon Sep 17 00:00:00 2001 +From: Jean-Louis Dupond +Date: Thu, 3 May 2012 15:25:02 +0200 +Subject: [PATCH] Some more clipboard fixes + +--- + remmina-plugins/rdp/rdp_cliprdr.c | 68 ++++++++++++++++++++++--------------- + remmina-plugins/rdp/rdp_plugin.c | 9 +++-- + remmina-plugins/rdp/rdp_plugin.h | 2 +- + 3 files changed, 48 insertions(+), 31 deletions(-) + +diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c +index b9b37ad..1424ac9 100644 +--- a/remmina-plugins/rdp/rdp_cliprdr.c ++++ b/remmina-plugins/rdp/rdp_cliprdr.c +@@ -204,7 +204,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + g_printf("GetData: Requested Format: %#X\n", format); + rfContext* rfi = GET_DATA(gp); + GtkClipboard* clipboard; +- uint8* inbuf = NULL; ++ uint8* inbuf = (uint8*)""; + uint8* outbuf = NULL; + GdkPixbuf *image = NULL; + +@@ -225,6 +225,8 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + + if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT) + { ++ if (inbuf == NULL) ++ inbuf = (uint8*)""; + inbuf = lf2crlf(inbuf, size); + if (format == CB_FORMAT_TEXT) + { +@@ -243,6 +245,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + uniconv = freerdp_uniconv_new(); + outbuf = (uint8*) freerdp_uniconv_out(uniconv, (char*) inbuf, &out_size); + freerdp_uniconv_free(uniconv); ++ g_free(inbuf); + *size = out_size + 2; + } + } +@@ -253,11 +256,13 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + if (format == CB_FORMAT_PNG) + { + gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "png", NULL, NULL); ++ outbuf = (uint8*) xmalloc(buffersize); + memcpy(outbuf, data, buffersize); + } + if (format == CB_FORMAT_JPEG) + { + gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "jpeg", NULL, NULL); ++ outbuf = (uint8*) xmalloc(buffersize); + memcpy(outbuf, data, buffersize); + } + if (format == CB_FORMAT_DIB) +@@ -268,13 +273,9 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in + outbuf = (uint8*) xmalloc(*size); + memcpy(outbuf, data + 14, *size); + } ++ g_object_unref(image); + } + +- if (inbuf) +- g_free(inbuf); +- if (G_IS_OBJECT(image)) +- g_object_unref(image); +- + if (!outbuf) + outbuf = (uint8*)""; + +@@ -357,7 +358,10 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE + if (clipboard) + { + if (text || img) +- rfi->clipboard_wait = TRUE; ++ { ++ rfi->clipboard_wait = 2; ++ g_printf("Setting Clipboard Wait\n"); ++ } + if (text) + { + gtk_clipboard_set_text(clipboard, (gchar*)data, size); +@@ -404,31 +408,39 @@ void remmina_handle_channel_event(RemminaProtocolWidget* gp, RDP_EVENT* event) + for (i = 0; i < format_list_event->num_formats; i++) + { + g_printf("Format: 0x%X\n", format_list_event->formats[i]); +- if (format_list_event->formats[i] == CB_FORMAT_UNICODETEXT) +- { +- format = CB_FORMAT_UNICODETEXT; +- break; +- } +- if (format_list_event->formats[i] == CB_FORMAT_DIB) +- { +- format = CB_FORMAT_DIB; +- break; +- } +- if (format_list_event->formats[i] == CB_FORMAT_JPEG) ++ } ++ ++ for (i = 0; i < format_list_event->num_formats; i++) ++ { ++ g_printf("Format: 0x%X\n", format_list_event->formats[i]); ++ if (format_list_event->formats[i] > format) + { +- format = CB_FORMAT_JPEG; +- break; ++ g_printf("Format 0x%X is bigger!\n", format_list_event->formats[i]); ++ if (format_list_event->formats[i] == CB_FORMAT_UNICODETEXT) ++ { ++ format = CB_FORMAT_UNICODETEXT; ++ } ++ if (format_list_event->formats[i] == CB_FORMAT_DIB) ++ { ++ format = CB_FORMAT_DIB; ++ } ++ if (format_list_event->formats[i] == CB_FORMAT_JPEG) ++ { ++ format = CB_FORMAT_JPEG; ++ } ++ if (format_list_event->formats[i] == CB_FORMAT_PNG) ++ { ++ format = CB_FORMAT_PNG; ++ } ++ if (format_list_event->formats[i] == CB_FORMAT_TEXT) ++ { ++ format = CB_FORMAT_TEXT; ++ } + } +- if (format_list_event->formats[i] == CB_FORMAT_PNG) ++ else + { +- format = CB_FORMAT_PNG; +- break; ++ g_printf("Format 0x%X is smaller!\n", format_list_event->formats[i]); + } +- if (format_list_event->formats[i] == CB_FORMAT_TEXT) +- { +- format = CB_FORMAT_TEXT; +- break; +- } + } + rfi->requested_format = format; + +diff --git a/remmina-plugins/rdp/rdp_plugin.c b/remmina-plugins/rdp/rdp_plugin.c +index fd0fe08..3c7fc0a 100644 +--- a/remmina-plugins/rdp/rdp_plugin.c ++++ b/remmina-plugins/rdp/rdp_plugin.c +@@ -131,9 +131,14 @@ boolean rf_check_fds(RemminaProtocolWidget* gp) + event->mouse_event.x, event->mouse_event.y); + break; + case REMMINA_RDP_EVENT_TYPE_CLIPBOARD: +- if (!rfi->clipboard_wait) ++ if (rfi->clipboard_wait <= 0) ++ { + remmina_rdp_cliprdr_send_format_list_event(gp); +- rfi->clipboard_wait = FALSE; ++ g_printf("Clipboard Wait ON\n"); ++ rfi->clipboard_wait = 0; ++ } ++ g_printf("Setting Clipboard Wait To FALSE\n"); ++ rfi->clipboard_wait--; + break; + } + +diff --git a/remmina-plugins/rdp/rdp_plugin.h b/remmina-plugins/rdp/rdp_plugin.h +index 1931384..ff66906 100644 +--- a/remmina-plugins/rdp/rdp_plugin.h ++++ b/remmina-plugins/rdp/rdp_plugin.h +@@ -134,7 +134,7 @@ struct rf_context + GAsyncQueue* event_queue; + gint event_pipe[2]; + +- gboolean clipboard_wait; ++ gint clipboard_wait; + uint32 requested_format; + }; + +-- +1.7.10 + diff --git a/remmina.spec b/remmina.spec index 1c13271..2e6c8a8 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.0.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -17,6 +17,19 @@ Patch0: remmina-1.0.0-fix-library-name.patch # https://github.com/FreeRDP/Remmina/commit/13f20367 Patch1: remmina-1.0.0-linker-error.patch +# The following 3 patches are needed to add clipboard support (#818155) +# https://github.com/FreeRDP/Remmina/commit/3ebdd6e7 +Patch2: remmina-1.0.0-add-clipboard-support.patch +# https://github.com/FreeRDP/Remmina/commit/97c2af8c +Patch3: remmina-1.0.0-clipboard-bugfix.patch +# https://github.com/FreeRDP/Remmina/commit/84327f81 +Patch4: remmina-1.0.0-some-more-clipboard-fixes.patch + +# https://github.com/FreeRDP/Remmina/commit/6ee20289 +Patch5: remmina-1.0.0-fix-crashes-in-some-cases.patch +# https://github.com/FreeRDP/Remmina/commit/b2277827 +Patch6: remmina-1.0.0-fix-memory-leak.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk3-devel @@ -180,6 +193,13 @@ client. %patch0 -p1 -b .fix-library-name %patch1 -p1 -b .linker-error +%patch2 -p1 -b .add-clipboard-support +%patch3 -p1 -b .clipboard-bugfix +%patch4 -p1 -b .some-more-clipboard-fixes + +%patch5 -p1 -b .fix-crashes-in-some-cases +%patch6 -p1 -b .fix-memory-leak + # Don't hardcode libdir sed -i "s,/lib/remmina/plugins,/%{_lib}/remmina/plugins,g" CMakeLists.txt @@ -310,6 +330,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Jun 01 2012 Christoph Wickert - 1.0.0-2 +- Add clipboard support (#818155) +- Fix a memory leak and a crash + * Sun Apr 22 2012 Christoph Wickert - 1.0.0-1 - Update to 1.0.0 - Plugins are now part of this package (again) From 75c2aae559dc061a383f2dd7d45c3029c993000a Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Sun, 3 Jun 2012 00:37:35 +0200 Subject: [PATCH 020/185] Fix crash introduced by clipboard support (#827756) --- ...nect-signal-handler-after-disconnect.patch | 53 +++++++++++++++++++ remmina.spec | 18 ++++--- 2 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch diff --git a/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch b/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch new file mode 100644 index 0000000..dc4ae33 --- /dev/null +++ b/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch @@ -0,0 +1,53 @@ +From c1ef3a162622942d7c556c5a4352e626c7bcb28f Mon Sep 17 00:00:00 2001 +From: Jean-Louis Dupond +Date: Tue, 8 May 2012 14:44:16 +0200 +Subject: [PATCH] Disconnect signal handler after disconnect + +--- + remmina-plugins/rdp/rdp_event.c | 10 ++++++++-- + remmina-plugins/rdp/rdp_plugin.h | 1 + + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c +index a936fb1..2c050c6 100644 +--- a/remmina-plugins/rdp/rdp_event.c ++++ b/remmina-plugins/rdp/rdp_event.c +@@ -523,8 +523,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) + if (!remmina_plugin_service->file_get_int(remminafile, "disableclipboard", FALSE)) + { + clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); +- g_signal_connect(clipboard, "owner-change", +- G_CALLBACK(remmina_rdp_event_on_clipboard), gp); ++ rfi->clipboard_handler = g_signal_connect(clipboard, "owner-change", G_CALLBACK(remmina_rdp_event_on_clipboard), gp); + } + + rfi->pressed_keys = g_array_new(FALSE, TRUE, sizeof (gint)); +@@ -575,6 +574,13 @@ void remmina_rdp_event_uninit(RemminaProtocolWidget* gp) + + rfi = GET_DATA(gp); + ++ ++ /* unregister the clipboard monitor */ ++ if (rfi->clipboard_handler) ++ { ++ g_signal_handler_disconnect(G_OBJECT(gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD)), rfi->clipboard_handler); ++ rfi->clipboard_handler = NULL; ++ } + if (rfi->scale_handler) + { + g_source_remove(rfi->scale_handler); +diff --git a/remmina-plugins/rdp/rdp_plugin.h b/remmina-plugins/rdp/rdp_plugin.h +index ff66906..08b8891 100644 +--- a/remmina-plugins/rdp/rdp_plugin.h ++++ b/remmina-plugins/rdp/rdp_plugin.h +@@ -134,6 +134,7 @@ struct rf_context + GAsyncQueue* event_queue; + gint event_pipe[2]; + ++ gint clipboard_handler; + gint clipboard_wait; + uint32 requested_format; + }; +-- +1.7.10 + diff --git a/remmina.spec b/remmina.spec index 2e6c8a8..b66609f 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.0.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -17,18 +17,20 @@ Patch0: remmina-1.0.0-fix-library-name.patch # https://github.com/FreeRDP/Remmina/commit/13f20367 Patch1: remmina-1.0.0-linker-error.patch -# The following 3 patches are needed to add clipboard support (#818155) +# The following 4 patches are needed to add clipboard support (#818155) # https://github.com/FreeRDP/Remmina/commit/3ebdd6e7 Patch2: remmina-1.0.0-add-clipboard-support.patch # https://github.com/FreeRDP/Remmina/commit/97c2af8c Patch3: remmina-1.0.0-clipboard-bugfix.patch # https://github.com/FreeRDP/Remmina/commit/84327f81 Patch4: remmina-1.0.0-some-more-clipboard-fixes.patch +# https://github.com/FreeRDP/Remmina/commit/c1ef3a16 +Patch5: remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch # https://github.com/FreeRDP/Remmina/commit/6ee20289 -Patch5: remmina-1.0.0-fix-crashes-in-some-cases.patch +Patch10: remmina-1.0.0-fix-crashes-in-some-cases.patch # https://github.com/FreeRDP/Remmina/commit/b2277827 -Patch6: remmina-1.0.0-fix-memory-leak.patch +Patch11: remmina-1.0.0-fix-memory-leak.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -196,9 +198,10 @@ client. %patch2 -p1 -b .add-clipboard-support %patch3 -p1 -b .clipboard-bugfix %patch4 -p1 -b .some-more-clipboard-fixes +%patch5 -p1 -b .disconnect-signal-handler -%patch5 -p1 -b .fix-crashes-in-some-cases -%patch6 -p1 -b .fix-memory-leak +%patch10 -p1 -b .fix-crashes-in-some-cases +%patch11 -p1 -b .fix-memory-leak # Don't hardcode libdir sed -i "s,/lib/remmina/plugins,/%{_lib}/remmina/plugins,g" CMakeLists.txt @@ -330,6 +333,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Jun 03 2012 Christoph Wickert - 1.0.0-3 +- Fix crash introduced by clipboard support (#827756) + * Fri Jun 01 2012 Christoph Wickert - 1.0.0-2 - Add clipboard support (#818155) - Fix a memory leak and a crash From 48973fa57e04f28db7b3dc3f9a9def9ac32485d2 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Sat, 9 Jun 2012 18:38:57 +0200 Subject: [PATCH 021/185] Fix DSO linking against gnutls (#819976) --- remmina-1.0.0-dsofix.patch | 11 +++++++++++ remmina.spec | 14 +++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 remmina-1.0.0-dsofix.patch diff --git a/remmina-1.0.0-dsofix.patch b/remmina-1.0.0-dsofix.patch new file mode 100644 index 0000000..2778e0d --- /dev/null +++ b/remmina-1.0.0-dsofix.patch @@ -0,0 +1,11 @@ +--- remmina-plugins/vnc/CMakeLists.txt 2012-06-04 13:03:46.542093149 -0600 ++++ remmina-plugins/vnc/CMakeLists.txt 2012-06-04 13:03:34.112332497 -0600 +@@ -28,7 +28,7 @@ + set_target_properties(remmina-plugin-vnc PROPERTIES PREFIX "") + + include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${LIBVNCSERVER_INCLUDE_DIRS}) +-target_link_libraries(remmina-plugin-vnc ${REMMINA_COMMON_LIBRARIES} ${LIBVNCSERVER_LIBRARIES}) ++target_link_libraries(remmina-plugin-vnc ${REMMINA_COMMON_LIBRARIES} ${LIBVNCSERVER_LIBRARIES} gnutls ) + + install(TARGETS remmina-plugin-vnc DESTINATION ${REMMINA_PLUGINDIR}) + diff --git a/remmina.spec b/remmina.spec index b66609f..74e7f53 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.0.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -32,6 +32,9 @@ Patch10: remmina-1.0.0-fix-crashes-in-some-cases.patch # https://github.com/FreeRDP/Remmina/commit/b2277827 Patch11: remmina-1.0.0-fix-memory-leak.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=819976 +Patch20: remmina-1.0.0-dsofix.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk3-devel @@ -200,8 +203,10 @@ client. %patch4 -p1 -b .some-more-clipboard-fixes %patch5 -p1 -b .disconnect-signal-handler -%patch10 -p1 -b .fix-crashes-in-some-cases -%patch11 -p1 -b .fix-memory-leak +%patch10 -p1 -b .fix-crashes-in-some-cases +%patch11 -p1 -b .fix-memory-leak + +%patch20 -p1 -b .dsofix # Don't hardcode libdir sed -i "s,/lib/remmina/plugins,/%{_lib}/remmina/plugins,g" CMakeLists.txt @@ -333,6 +338,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Jun 09 2012 Christoph Wickert - 1.0.0-4 +- Fix DSO linking against gnutls (#819976) + * Sun Jun 03 2012 Christoph Wickert - 1.0.0-3 - Fix crash introduced by clipboard support (#827756) From 06c9429b54d7f759ed3b2623b26616d37032032e Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Sat, 9 Jun 2012 19:11:18 +0200 Subject: [PATCH 022/185] Apply patch correctly --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 74e7f53..1fcd9bb 100644 --- a/remmina.spec +++ b/remmina.spec @@ -206,7 +206,7 @@ client. %patch10 -p1 -b .fix-crashes-in-some-cases %patch11 -p1 -b .fix-memory-leak -%patch20 -p1 -b .dsofix +%patch20 -p0 -b .dsofix # Don't hardcode libdir sed -i "s,/lib/remmina/plugins,/%{_lib}/remmina/plugins,g" CMakeLists.txt From 894239beee5216b0bb243ae70fc073df04117d9b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 10:46:38 -0500 Subject: [PATCH 023/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 1fcd9bb..7e39391 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.0.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -338,6 +338,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Jul 21 2012 Fedora Release Engineering - 1.0.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Sat Jun 09 2012 Christoph Wickert - 1.0.0-4 - Fix DSO linking against gnutls (#819976) From 45051709753460b47d3f9ad7f8b9e52f4a157f93 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 15:34:51 -0600 Subject: [PATCH 024/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 7e39391..d066e11 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.0.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -338,6 +338,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Feb 14 2013 Fedora Release Engineering - 1.0.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Sat Jul 21 2012 Fedora Release Engineering - 1.0.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From f10a2061393775160fcb8bbe9251b86b50404cea Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Mon, 6 May 2013 23:49:00 +0200 Subject: [PATCH 025/185] Unfuzz remmina-1.0.0-add-clipboard-support.patch --- remmina-1.0.0-add-clipboard-support.patch | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/remmina-1.0.0-add-clipboard-support.patch b/remmina-1.0.0-add-clipboard-support.patch index b5fd340..57b16b9 100644 --- a/remmina-1.0.0-add-clipboard-support.patch +++ b/remmina-1.0.0-add-clipboard-support.patch @@ -535,7 +535,7 @@ diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c index f77f5f1..a936fb1 100644 --- a/remmina-plugins/rdp/rdp_event.c +++ b/remmina-plugins/rdp/rdp_event.c -@@ -461,6 +461,16 @@ static gboolean remmina_rdp_event_on_key(GtkWidget* widget, GdkEventKey* event, +@@ -452,6 +452,16 @@ static gboolean remmina_rdp_event_on_key(GtkWidget* widget, GdkEventKey* event, return TRUE; } @@ -552,7 +552,7 @@ index f77f5f1..a936fb1 100644 void remmina_rdp_event_init(RemminaProtocolWidget* gp) { gint n; -@@ -470,6 +480,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) +@@ -461,6 +471,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) XPixmapFormatValues* pf; XPixmapFormatValues* pfs; rfContext* rfi; @@ -560,7 +560,7 @@ index f77f5f1..a936fb1 100644 rfi = GET_DATA(gp); rfi->drawing_area = gtk_drawing_area_new(); -@@ -508,6 +519,14 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) +@@ -499,6 +510,14 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) g_signal_connect(G_OBJECT(rfi->drawing_area), "key-release-event", G_CALLBACK(remmina_rdp_event_on_key), gp); @@ -595,7 +595,7 @@ index 08874e6..fd0fe08 100644 #define REMMINA_RDP_FEATURE_TOOL_REFRESH 1 #define REMMINA_RDP_FEATURE_SCALE 2 -@@ -128,6 +130,11 @@ boolean rf_check_fds(RemminaProtocolWidget* gp) +@@ -155,6 +157,11 @@ boolean rf_check_fds(RemminaProtocolWidget* gp) input->MouseEvent(input, event->mouse_event.flags, event->mouse_event.x, event->mouse_event.y); break; @@ -607,7 +607,7 @@ index 08874e6..fd0fe08 100644 } g_free(event); -@@ -503,6 +510,7 @@ static boolean remmina_rdp_verify_certificate(freerdp* instance, char* subject, +@@ -530,6 +537,7 @@ static boolean remmina_rdp_verify_certificate(freerdp* instance, char* subject, static int remmina_rdp_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size) { @@ -615,7 +615,7 @@ index 08874e6..fd0fe08 100644 return freerdp_channels_data(instance, channelId, data, size, flags, total_size); } -@@ -518,6 +526,7 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp) +@@ -545,6 +553,7 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp) fd_set rfds_set; fd_set wfds_set; rfContext* rfi; @@ -623,7 +623,7 @@ index 08874e6..fd0fe08 100644 memset(rfds, 0, sizeof(rfds)); memset(wfds, 0, sizeof(wfds)); -@@ -591,6 +600,12 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp) +@@ -618,6 +627,12 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp) { break; } From aa4676cc51e3990e1b7a40269188b3febe0739d6 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Mon, 6 May 2013 23:51:19 +0200 Subject: [PATCH 026/185] Unfuzz remmina-1.0.0-some-more-clipboard-fixes.patch --- remmina-1.0.0-some-more-clipboard-fixes.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina-1.0.0-some-more-clipboard-fixes.patch b/remmina-1.0.0-some-more-clipboard-fixes.patch index ad31d51..acac772 100644 --- a/remmina-1.0.0-some-more-clipboard-fixes.patch +++ b/remmina-1.0.0-some-more-clipboard-fixes.patch @@ -145,7 +145,7 @@ diff --git a/remmina-plugins/rdp/rdp_plugin.c b/remmina-plugins/rdp/rdp_plugin.c index fd0fe08..3c7fc0a 100644 --- a/remmina-plugins/rdp/rdp_plugin.c +++ b/remmina-plugins/rdp/rdp_plugin.c -@@ -131,9 +131,14 @@ boolean rf_check_fds(RemminaProtocolWidget* gp) +@@ -158,9 +158,14 @@ boolean rf_check_fds(RemminaProtocolWidget* gp) event->mouse_event.x, event->mouse_event.y); break; case REMMINA_RDP_EVENT_TYPE_CLIPBOARD: From 13056c6a52d8d2e6f0ce7480f461058835cc2e69 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Mon, 6 May 2013 23:53:14 +0200 Subject: [PATCH 027/185] Unfuzz remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch --- ...ina-1.0.0-disconnect-signal-handler-after-disconnect.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch b/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch index dc4ae33..4258919 100644 --- a/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch +++ b/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch @@ -12,7 +12,7 @@ diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c index a936fb1..2c050c6 100644 --- a/remmina-plugins/rdp/rdp_event.c +++ b/remmina-plugins/rdp/rdp_event.c -@@ -523,8 +523,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) +@@ -514,8 +514,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) if (!remmina_plugin_service->file_get_int(remminafile, "disableclipboard", FALSE)) { clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); @@ -22,7 +22,7 @@ index a936fb1..2c050c6 100644 } rfi->pressed_keys = g_array_new(FALSE, TRUE, sizeof (gint)); -@@ -575,6 +574,13 @@ void remmina_rdp_event_uninit(RemminaProtocolWidget* gp) +@@ -566,6 +565,13 @@ void remmina_rdp_event_uninit(RemminaProtocolWidget* gp) rfi = GET_DATA(gp); From fc1472cfb7797383d7910cbf7bdde18336db4932 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Tue, 7 May 2013 02:06:06 +0200 Subject: [PATCH 028/185] Fix scrolling in VNC (#830210) - Handle GDK_SCROLL_SMOOTH in VNC and RDP - Bring back the --icon/-i autostart option (#834883) - Fix fullscreen with multiple monitors (#864262) - Resize window to fit remote resolution (#953678) - Enable TLS-support in VNC plugin - Close SSH tunnels on disconnect (https://github.com/FreeRDP/Remmina/issues/77) - Patch out copy of libvncserver shipped in source tarball - Update icon cache also for plugins - Drop the remmina-plugins-common package - Drop Provides/Obsoletes for grdc - Spec file clean-up --- remmina.spec | 219 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 153 insertions(+), 66 deletions(-) diff --git a/remmina.spec b/remmina.spec index d066e11..722b7f4 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.0.0 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -32,8 +32,41 @@ Patch10: remmina-1.0.0-fix-crashes-in-some-cases.patch # https://github.com/FreeRDP/Remmina/commit/b2277827 Patch11: remmina-1.0.0-fix-memory-leak.patch +# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=953678 +# upstream bug: https://github.com/FreeRDP/Remmina/issues/63 +# upstream fix: https://github.com/FreeRDP/Remmina/commit/1901a1e9 +Patch12: remmina-1.0.0-fix-typo-when-fitting-window.patch + +# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=834883 +# upstream bug: https://github.com/FreeRDP/Remmina/issues/76 +# upstream fix: https://github.com/FreeRDP/Remmina/commit/1901a1e9 +Patch13: remmina-1.0.0-trayicon-patch + +# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=830210 +# upstream fix: https://github.com/FreeRDP/Remmina/commit/ +Patch14: remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch +# upstream fix: https://github.com/FreeRDP/Remmina/commit/fe1b698e +Patch15: remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch + +# upstream bug: https://github.com/FreeRDP/Remmina/issues/77 +# upstream fix: https://github.com/FreeRDP/Remmina/commit/bed49ad6 +Patch16: remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch + +# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=864262 +# upstream fix: https://github.com/FreeRDP/Remmina/commit/348e01d2 +Patch17: remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch + # https://bugzilla.redhat.com/show_bug.cgi?id=819976 -Patch20: remmina-1.0.0-dsofix.patch +Patch30: remmina-1.0.0-dsofix.patch + +# From OpenSUSE. All patches are backport from upstream. +# Thanks to Guido Berhoerster +Patch31: remmina-1.0.0-fix-desktop-file.patch +Patch32: remmina-1.0.0-fix-install-paths.patch + +# From Debian. Thanks to Luca Falavigna +Patch35: remmina-1.0.0-remove-inline-libvncserver.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -52,6 +85,10 @@ BuildRequires: gnutls-devel BuildRequires: libjpeg-devel BuildRequires: libvncserver-devel +# We don't ship the remmina-plugins-common package any longer +Provides: remmina-plugins-common = %{version} +Obsoletes: remmina-plugins-common < 1.0.0-7 + # Remmina used to be called grdc Provides: grdc = %{version} Obsoletes: grdc < 0.6.1 @@ -85,25 +122,11 @@ The %{name}-devel package contains header files for developing plugins for %{name}. -%package plugins-common -Summary: Common files for Remmina Remote Desktop Client plugins -Group: Applications/System -Requires: %{name} >= 0.9 - -%description plugins-common -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny netbooks. - -This package contains files shared among all plugins for the Remmina remote -desktop client. - - %package plugins-gnome Summary: GNOME keyring integration for Remmina Remote Desktop Client BuildRequires: libgnome-keyring-devel Group: Applications/System -Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libgnome-keyring %description plugins-gnome @@ -118,7 +141,7 @@ remote desktop client. %package plugins-nx Summary: NX plugin for Remmina Remote Desktop Client Group: Applications/System -Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: nx %description plugins-nx @@ -133,7 +156,7 @@ This package contains the NX plugin for the Remmina remote desktop client. Summary: RDP plugin for Remmina Remote Desktop Client Group: Applications/System BuildRequires: freerdp-devel -Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: freerdp %description plugins-rdp @@ -149,7 +172,7 @@ remote desktop client. Summary: Telepathy plugin for Remmina Remote Desktop Client Group: Applications/System BuildRequires: telepathy-glib-devel -Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-telepathy Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -166,7 +189,7 @@ Group: Applications/System BuildRequires: gnutls-devel BuildRequires: libjpeg-devel BuildRequires: libvncserver-devel -Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-vnc Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -180,7 +203,7 @@ client. %package plugins-xdmcp Summary: XDMCP plugin for Remmina Remote Desktop Client Group: Applications/System -Requires: %{name}-plugins-common%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} Requires: xorg-x11-server-Xephyr %description plugins-xdmcp @@ -206,64 +229,70 @@ client. %patch10 -p1 -b .fix-crashes-in-some-cases %patch11 -p1 -b .fix-memory-leak -%patch20 -p0 -b .dsofix +%patch12 -p1 -b .fitting-window + +%patch13 -p1 -b .trayicon + +%patch14 -p1 -b .vnc-scrolling -# Don't hardcode libdir -sed -i "s,/lib/remmina/plugins,/%{_lib}/remmina/plugins,g" CMakeLists.txt +%patch15 -p1 -b .GDK_SCROLL_SMOOTH + +%patch16 -p1 -b .ssh-disconnect + +%patch17 -p1 -b .multiple-monitors + +%patch30 -p0 -b .dsofix +%patch31 -p1 -b .desktop-file +%patch32 -p1 -b .install-paths + + +%patch35 -p1 -b .libvncserver -# Don't build against bundled libvncserver -#grep -v libvncserver remmina-plugins/CMakeLists.txt > remmina-plugins/CMakeLists.txt.new -#mv remmina-plugins/CMakeLists.txt.new remmina-plugins/CMakeLists.txt -# -#rm -rf remmina-plugins/vnc/libvncserver/ %build mkdir -p build pushd build +CFLAGS="%{optflags} -DLIBVNCSERVER_WITH_CLIENT_TLS=1" LDFLAGS="-Wl,-z,relro -Wl,--no-as-needed" %cmake \ - -DWITH_PTHREAD=ON \ - -DWITH_GCRYPT=ON \ - -DWITH_LIBSSH=ON \ - -DWITH_VTE=ON \ - -DWITH_GETTEXT=ON \ - -DWITH_LIBSSH=ON \ - -DWITH_FREERDP=ON \ - -DWITH_TELEPATHY=ON \ - -DWITH_ZLIB=ON \ - -DWITH_GETTEXT=ON \ - -DWITH_AVAHI=ON \ - -DWITH_APPINDICATOR=OFF \ - -LIBVNCSERVER_INCLUDE_DIRS=%{_includedir} \ - -DCMAKE_INSTALL_LIBDIR=%{_libdir} \ - .. + -DWITH_PTHREAD=ON \ + -DWITH_GCRYPT=ON \ + -DWITH_LIBSSH=ON \ + -DWITH_VTE=ON \ + -DWITH_GETTEXT=ON \ + -DWITH_LIBSSH=ON \ + -DWITH_FREERDP=ON \ + -DWITH_TELEPATHY=ON \ + -DWITH_ZLIB=ON \ + -DWITH_GETTEXT=ON \ + -DWITH_AVAHI=ON \ + -DWITH_APPINDICATOR=OFF \ + -LIBVNCSERVER_INCLUDE_DIRS=%{_includedir} \ + -DLIBVNCSERVER_WITH_CLIENT_TLS=1 \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_LIBDIR=%{_lib} \ + .. make %{?_smp_mflags} popd %install rm -rf %{buildroot} -# make install DESTDIR=%{buildroot} make install/fast DESTDIR=%{buildroot} -C build - -# dirty hack as desktop file does not get built. -sed 's,^_,,g' remmina/desktop/remmina.desktop.in > remmina/desktop/remmina.desktop - -# another dirty hack -mv %{buildroot}/usr/share/remmina/icons %{buildroot}/usr/share/icons - desktop-file-install --vendor="" --delete-original \ - --add-category="RemoteAccess" \ - --remove-key="Actions" \ - --dir %{buildroot}%{_datadir}/applications \ - remmina/desktop/remmina.desktop + --add-category="RemoteAccess" \ + --remove-category="X-GNOME-NetworkSettings" \ + --remove-key="Actions" \ + --dir %{buildroot}%{_datadir}/applications \ + %{buildroot}/%{_datadir}/applications/%{name}.desktop %find_lang %{name} %find_lang %{name}-plugins + %clean rm -rf %{buildroot} @@ -271,24 +300,75 @@ rm -rf %{buildroot} %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +%post plugins-nx +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%post plugins-rdp +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%post plugins-vnc +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%post plugins-xdmcp +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + + %postun if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/icons/hicolor &>/dev/null gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi +%postun plugins-nx +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%postun plugins-rdp +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%postun plugins-vnc +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%postun plugins-xdmcp +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + + %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +%posttrans plugins-nx +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%posttrans plugins-rdp +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%posttrans plugins-vnc +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + +%posttrans plugins-xdmcp +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + -%files -f %{name}.lang +%files -f %{name}.lang -f %{name}-plugins.lang %defattr(-,root,root,-) # FIXME: Add NEWS if not empty %doc remmina/AUTHORS remmina/ChangeLog remmina/COPYING README %{_bindir}/%{name} %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/*/*.* -%{_datadir}/%{name}/ +%dir %{_libdir}/remmina/ +%dir %{_libdir}/remmina/plugins/ %files devel %defattr(-,root,root,-) @@ -296,13 +376,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_includedir}/%{name}/ %{_libdir}/pkgconfig/%{name}.pc -%files plugins-common -f %{name}-plugins.lang -%defattr(-,root,root,-) -# FIXME: Add docs once there are some *proper* ones -#%doc remmina-plugins/AUTHORS remmina-plugins/COPYING -%dir %{_libdir}/remmina/ -%dir %{_libdir}/remmina/plugins/ - %files plugins-gnome %defattr(-,root,root,-) %{_libdir}/remmina/plugins/remmina-plugins-gnome.so @@ -338,6 +411,20 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue May 07 2013 Christoph Wickert - 1.0.0-7 +- Fix scrolling in VNC (#830210) +- Handle GDK_SCROLL_SMOOTH in VNC and RDP +- Bring back the --icon/-i autostart option (#834883) +- Fix fullscreen with multiple monitors (#864262) +- Resize window to fit remote resolution (#953678) +- Enable TLS-support in VNC plugin +- Close SSH tunnels on disconnect (https://github.com/FreeRDP/Remmina/issues/77) +- Patch out copy of libvncserver shipped in source tarball +- Update icon cache also for plugins +- Drop the remmina-plugins-common package +- Drop Provides/Obsoletes for grdc +- Spec file clean-up + * Thu Feb 14 2013 Fedora Release Engineering - 1.0.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 55cc018879cab1205c7e07346142541c4bbaede9 Mon Sep 17 00:00:00 2001 From: Christoph Wickert Date: Tue, 7 May 2013 02:06:40 +0200 Subject: [PATCH 029/185] Add new patches --- ...-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch | 82 + ...1.0.0-close-SSH-tunnel-on-disconnect.patch | 44 + remmina-1.0.0-fix-desktop-file.patch | 39 + ...ix-fullscreen-with-multiple-monitors.patch | 35 + remmina-1.0.0-fix-install-paths.patch | 13 + ...na-1.0.0-fix-scrolling-in-vnc-plugin.patch | 32 + ...a-1.0.0-fix-typo-when-fitting-window.patch | 25 + ...ina-1.0.0-remove-inline-libvncserver.patch | 20338 ++++++++++++++++ remmina-1.0.0-trayicon-patch | 53 + 9 files changed, 20661 insertions(+) create mode 100644 remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch create mode 100644 remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch create mode 100644 remmina-1.0.0-fix-desktop-file.patch create mode 100644 remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch create mode 100644 remmina-1.0.0-fix-install-paths.patch create mode 100644 remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch create mode 100644 remmina-1.0.0-fix-typo-when-fitting-window.patch create mode 100644 remmina-1.0.0-remove-inline-libvncserver.patch create mode 100644 remmina-1.0.0-trayicon-patch diff --git a/remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch b/remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch new file mode 100644 index 0000000..49f8b14 --- /dev/null +++ b/remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch @@ -0,0 +1,82 @@ +From fe1b698e4a6bba7783edcb3d0431e6acb24323f4 Mon Sep 17 00:00:00 2001 +From: Jean-Louis Dupond +Date: Sun, 22 Apr 2012 23:08:47 +0200 +Subject: [PATCH] Also handle GDK_SCROLL_SMOOTH + +--- + remmina-plugins/rdp/rdp_event.c | 9 +++++++++ + remmina-plugins/vnc/vnc_plugin.c | 12 ++++++++++++ + remmina/src/remmina_connection_window.c | 14 ++++++++++++++ + 3 files changed, 35 insertions(+) + +diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c +index de8e01f..3d3e67a 100644 +--- a/remmina-plugins/rdp/rdp_event.c ++++ b/remmina-plugins/rdp/rdp_event.c +@@ -377,6 +377,15 @@ static gboolean remmina_rdp_event_on_scroll(GtkWidget* widget, GdkEventScroll* e + case GDK_SCROLL_DOWN: + flag = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088; + break; ++ ++ case GDK_SCROLL_SMOOTH: ++ if (event->delta_y < 0) ++ flag = PTR_FLAGS_WHEEL | 0x0078; ++ if (event->delta_y > 0) ++ flag = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088; ++ if (!flag) ++ return FALSE; ++ break; + + default: + return FALSE; +diff --git a/remmina-plugins/vnc/vnc_plugin.c b/remmina-plugins/vnc/vnc_plugin.c +index 0321057..f000ccb 100644 +--- a/remmina-plugins/vnc/vnc_plugin.c ++++ b/remmina-plugins/vnc/vnc_plugin.c +@@ -1426,6 +1426,18 @@ static gboolean remmina_plugin_vnc_on_scroll(GtkWidget *widget, GdkEventScroll * + case GDK_SCROLL_RIGHT: + mask = (1 << 6); + break; ++ case GDK_SCROLL_SMOOTH: ++ if (event->delta_y < 0) ++ mask = (1 << 3); ++ if (event->delta_y > 0) ++ mask = (1 << 4); ++ if (event->delta_x < 0) ++ mask = (1 << 5); ++ if (event->delta_x > 0) ++ mask = (1 << 6); ++ if (!mask) ++ return FALSE; ++ break; + default: + return FALSE; + } +diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c +index dfcc353..5487697 100644 +--- a/remmina/src/remmina_connection_window.c ++++ b/remmina/src/remmina_connection_window.c +@@ -1477,6 +1477,20 @@ static gboolean remmina_connection_holder_toolbar_scroll(GtkWidget* widget, GdkE + return TRUE; + } + break; ++ case GDK_SCROLL_SMOOTH: ++ if (event->delta_y < 0 && opacity > 0) ++ { ++ remmina_file_set_int(cnnobj->remmina_file, "toolbar_opacity", opacity - 1); ++ remmina_connection_holder_update_toolbar_opacity(cnnhld); ++ return TRUE; ++ } ++ if (event->delta_y > 0 && opacity < TOOLBAR_OPACITY_LEVEL) ++ { ++ remmina_file_set_int(cnnobj->remmina_file, "toolbar_opacity", opacity + 1); ++ remmina_connection_holder_update_toolbar_opacity(cnnhld); ++ return TRUE; ++ } ++ break; + default: + break; + } +-- +1.8.1.6 + diff --git a/remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch b/remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch new file mode 100644 index 0000000..23faf23 --- /dev/null +++ b/remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch @@ -0,0 +1,44 @@ +commit bed49ad62d78718c0876c000a97c68cc87f12c7c +Author: Jean-Louis Dupond +Date: Sat Sep 1 20:56:09 2012 +0200 + + Closes #77: Close the SSH tunnel after the connection has been closed + +Index: FreeRDP-Remmina-356c033/remmina/src/remmina_protocol_widget.c +=================================================================== +--- FreeRDP-Remmina-356c033.orig/remmina/src/remmina_protocol_widget.c ++++ FreeRDP-Remmina-356c033/remmina/src/remmina_protocol_widget.c +@@ -267,13 +267,7 @@ gboolean remmina_protocol_widget_close_c + gp->priv->chat_window = NULL; + } + +-#ifdef HAVE_LIBSSH +- if (gp->priv->ssh_tunnel) +- { +- remmina_ssh_tunnel_free(gp->priv->ssh_tunnel); +- gp->priv->ssh_tunnel = NULL; +- } +-#endif ++ gboolean retval; + + if (!gp->priv->plugin || !gp->priv->plugin->close_connection) + { +@@ -281,7 +275,17 @@ gboolean remmina_protocol_widget_close_c + return FALSE; + } + +- return gp->priv->plugin->close_connection(gp); ++ retval = gp->priv->plugin->close_connection(gp); ++ ++ #ifdef HAVE_LIBSSH ++ if (gp->priv->ssh_tunnel) ++ { ++ remmina_ssh_tunnel_free(gp->priv->ssh_tunnel); ++ gp->priv->ssh_tunnel = NULL; ++ } ++ #endif ++ ++ return retval; + } + + static gboolean remmina_protocol_widget_emit_signal_timeout(gpointer user_data) diff --git a/remmina-1.0.0-fix-desktop-file.patch b/remmina-1.0.0-fix-desktop-file.patch new file mode 100644 index 0000000..5fd5eef --- /dev/null +++ b/remmina-1.0.0-fix-desktop-file.patch @@ -0,0 +1,39 @@ +Index: remmina-1.0.0/remmina/desktop/CMakeLists.txt +=================================================================== +--- remmina-1.0.0.orig/remmina/desktop/CMakeLists.txt ++++ remmina-1.0.0/remmina/desktop/CMakeLists.txt +@@ -38,3 +38,4 @@ install(FILES ${ICON32_DATA} DESTINATION + install(FILES ${ICON48_DATA} DESTINATION ${ICON48_DIR}) + install(FILES ${ICONSVG_DATA} DESTINATION ${ICONSVG_DIR}) + ++install(FILES remmina.desktop DESTINATION "${REMMINA_DATADIR}/applications") +Index: remmina-1.0.0/CMakeLists.txt +=================================================================== +--- remmina-1.0.0.orig/CMakeLists.txt ++++ remmina-1.0.0/CMakeLists.txt +@@ -78,7 +78,7 @@ include_directories(.) + include_directories(remmina/include) + + set(REMMINA_VERSION "0.9.99.1") +-set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share/remmina") ++set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share") + set(REMMINA_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale") + set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/lib/remmina/plugins") + +Index: remmina-1.0.0/remmina/desktop/remmina.desktop +=================================================================== +--- /dev/null ++++ remmina-1.0.0/remmina/desktop/remmina.desktop +@@ -0,0 +1,12 @@ ++[Desktop Entry] ++Version=1.0 ++Name=Remmina Remote Desktop Client ++Comment=Connect to remote desktops ++TryExec=remmina ++Exec=remmina ++Icon=remmina ++Terminal=false ++Type=Application ++Actions= ++Categories=GTK;GNOME;X-GNOME-NetworkSettings;Network; ++ diff --git a/remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch b/remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch new file mode 100644 index 0000000..0996515 --- /dev/null +++ b/remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch @@ -0,0 +1,35 @@ +commit 348e01d27869a577ad5df9bf6286f876b34a40c0 +Author: Jean-Louis Dupond +Date: Mon Sep 10 20:08:00 2012 +0200 + + Fix fullscreen mode with multiple monitors + +diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c +index 761b2f4..7a5b214 100644 +--- a/remmina/src/remmina_connection_window.c ++++ b/remmina/src/remmina_connection_window.c +@@ -496,13 +496,21 @@ static void remmina_connection_holder_check_resize(RemminaConnectionHolder* cnnh + DECLARE_CNNOBJ + gboolean scroll_required = FALSE; + GdkScreen* screen; ++ gint monitor; ++ GdkRectangle screen_size; + gint screen_width, screen_height; + gint server_width, server_height; + + remmina_connection_holder_get_desktop_size(cnnhld, &server_width, &server_height, FALSE); +- screen = gdk_screen_get_default(); +- screen_width = gdk_screen_get_width(screen); +- screen_height = gdk_screen_get_height(screen); ++ screen = gtk_window_get_screen(GTK_WINDOW(cnnhld->cnnwin)); ++ monitor = gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(GTK_WIDGET(cnnhld->cnnwin))); ++#ifdef gdk_screen_get_monitor_workarea ++ gdk_screen_get_monitor_workarea(screen, monitor, &screen_size); ++#else ++ gdk_screen_get_monitor_geometry(screen, monitor, &screen_size); ++#endif ++ screen_width = screen_size.width; ++ screen_height = screen_size.height; + + if (!remmina_protocol_widget_get_expand(REMMINA_PROTOCOL_WIDGET(cnnobj->proto)) + && (server_width <= 0 || server_height <= 0 || screen_width < server_width diff --git a/remmina-1.0.0-fix-install-paths.patch b/remmina-1.0.0-fix-install-paths.patch new file mode 100644 index 0000000..e47203e --- /dev/null +++ b/remmina-1.0.0-fix-install-paths.patch @@ -0,0 +1,13 @@ +Index: remmina-1.0.0/CMakeLists.txt +=================================================================== +--- remmina-1.0.0.orig/CMakeLists.txt ++++ remmina-1.0.0/CMakeLists.txt +@@ -80,7 +80,7 @@ include_directories(remmina/include) + set(REMMINA_VERSION "0.9.99.1") + set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share") + set(REMMINA_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale") +-set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/lib/remmina/plugins") ++set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/remmina/plugins") + + find_suggested_package(PTHREAD) + if(PTHREAD_FOUND) diff --git a/remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch b/remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch new file mode 100644 index 0000000..56e23fd --- /dev/null +++ b/remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch @@ -0,0 +1,32 @@ +commit c422e9c0396e405ef5a3d2a6b24dbc83c20afe2f +Author: Jean-Louis Dupond +Date: Wed Apr 25 11:57:39 2012 +0200 + + Also fix scrolling on VNC plugin + +Index: FreeRDP-Remmina-356c033/remmina-plugins/rdp/rdp_event.c +=================================================================== +--- FreeRDP-Remmina-356c033.orig/remmina-plugins/rdp/rdp_event.c ++++ FreeRDP-Remmina-356c033/remmina-plugins/rdp/rdp_event.c +@@ -468,7 +468,7 @@ void remmina_rdp_event_init(RemminaProto + gtk_container_add(GTK_CONTAINER(gp), rfi->drawing_area); + + gtk_widget_add_events(rfi->drawing_area, GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK +- | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); ++ | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_SCROLL_MASK); + gtk_widget_set_can_focus(rfi->drawing_area, TRUE); + + remmina_plugin_service->protocol_plugin_register_hostkey(gp, rfi->drawing_area); +Index: FreeRDP-Remmina-356c033/remmina-plugins/vnc/vnc_plugin.c +=================================================================== +--- FreeRDP-Remmina-356c033.orig/remmina-plugins/vnc/vnc_plugin.c ++++ FreeRDP-Remmina-356c033/remmina-plugins/vnc/vnc_plugin.c +@@ -1847,7 +1847,7 @@ static void remmina_plugin_vnc_init(Remm + gtk_widget_add_events( + gpdata->drawing_area, + GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK +- | GDK_KEY_RELEASE_MASK); ++ | GDK_KEY_RELEASE_MASK | GDK_SCROLL_MASK); + gtk_widget_set_can_focus(gpdata->drawing_area, TRUE); + + #if GTK_VERSION == 3 diff --git a/remmina-1.0.0-fix-typo-when-fitting-window.patch b/remmina-1.0.0-fix-typo-when-fitting-window.patch new file mode 100644 index 0000000..799b059 --- /dev/null +++ b/remmina-1.0.0-fix-typo-when-fitting-window.patch @@ -0,0 +1,25 @@ +From 1901a1e9e5282c1deca2f5f98476e2c7e9243d35 Mon Sep 17 00:00:00 2001 +From: Jean-Louis Dupond +Date: Mon, 10 Sep 2012 14:12:11 +0200 +Subject: [PATCH] Closes #63: fix typo when fitting window + +--- + remmina/src/remmina_connection_window.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c +index 7ff1246..2ba8193 100644 +--- a/remmina/src/remmina_connection_window.c ++++ b/remmina/src/remmina_connection_window.c +@@ -436,7 +436,7 @@ static gboolean remmina_connection_holder_toolbar_autofit_restore(RemminaConnect + remmina_connection_holder_get_desktop_size(cnnhld, &width, &height, TRUE); + gtk_widget_get_allocation(priv->notebook, &na); + gtk_widget_get_allocation(cnnobj->scrolled_container, &ca); +- gtk_widget_get_allocation(priv->toolbar, &ca); ++ gtk_widget_get_allocation(priv->toolbar, &ta); + gtk_window_resize(GTK_WINDOW(cnnhld->cnnwin), MAX(1, width + na.width - ca.width), + MAX(1, height + ta.height + na.height - ca.height)); + gtk_container_check_resize(GTK_CONTAINER(cnnhld->cnnwin)); +-- +1.8.1.6 + diff --git a/remmina-1.0.0-remove-inline-libvncserver.patch b/remmina-1.0.0-remove-inline-libvncserver.patch new file mode 100644 index 0000000..4c8cae1 --- /dev/null +++ b/remmina-1.0.0-remove-inline-libvncserver.patch @@ -0,0 +1,20338 @@ +commit 58881d4dd9129f56cb5ed9e56c54236be494d30a +Author: Luca Falavigna +Date: Sun Feb 12 17:24:29 2012 +0100 + + Do not use convenience copy of libvncserver + +diff --git a/cmake/FindLIBVNCSERVER.cmake b/cmake/FindLIBVNCSERVER.cmake +new file mode 100644 +index 0000000..dfb0ebb +--- /dev/null ++++ b/cmake/FindLIBVNCSERVER.cmake +@@ -0,0 +1,37 @@ ++# Remmina - The GTK+ Remote Desktop Client ++# ++# Copyright (C) 2012 Luca Falavigna ++# ++# This program is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2 of the License, or ++# (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 59 Temple Place, Suite 330, ++# Boston, MA 02111-1307, USA. ++ ++find_package(PkgConfig) ++pkg_check_modules(PC_LIBVNCSERVER LibVNCServer) ++set(LIBVNCSERVER_DEFINITIONS ${PC_LIBVNCSERVER_CFLAGS_OTHER}) ++ ++find_path(LIBVNCSERVER_INCLUDE_DIR NAMES rfb/rfb.h ++ HINTS ${PC_LIBVNCSERVER_INCLUDEDIR} ${PC_LIBVNCSERVER_INCLUDE_DIRS}) ++ ++find_library(LIBVNCSERVER_LIBRARY NAMES vncserver ++ HINTS ${PC_LIBVNCSERVER_LIBDIR} ${PC_LIBVNCSERVER_LIBRARY_DIRS}) ++ ++include(FindPackageHandleStandardArgs) ++ ++find_package_handle_standard_args(LIBVNCSERVER DEFAULT_MSG LIBVNCSERVER_LIBRARY LIBVNCSERVER_INCLUDE_DIR) ++ ++set(LIBVNCSERVER_LIBRARIES ${LIBVNCSERVER_LIBRARY}) ++set(LIBVNCSERVER_INCLUDE_DIRS ${LIBVNCSERVER_INCLUDE_DIR}) ++ ++mark_as_advanced(LIBVNCSERVER_INCLUDE_DIR LIBVNCSERVER_LIBRARY) +diff --git a/remmina-plugins/CMakeLists.txt b/remmina-plugins/CMakeLists.txt +index e33cd10..646eb2e 100644 +--- a/remmina-plugins/CMakeLists.txt ++++ b/remmina-plugins/CMakeLists.txt +@@ -32,6 +32,8 @@ if(LIBSSH_FOUND) + target_link_libraries(remmina ${SSH_LIBRARIES}) + endif() + ++find_required_package(LIBVNCSERVER) ++ + find_required_package(XKBFILE) + + if(LIBSSH_FOUND AND XKBFILE_FOUND) +@@ -53,7 +55,6 @@ endif() + find_suggested_package(ZLIB) + + if(ZLIB_FOUND) +- add_subdirectory(vnc/libvncserver) + add_subdirectory(vnc) + endif() + +diff --git a/remmina-plugins/vnc/CMakeLists.txt b/remmina-plugins/vnc/CMakeLists.txt +index d8edd37..6a59fb7 100644 +--- a/remmina-plugins/vnc/CMakeLists.txt ++++ b/remmina-plugins/vnc/CMakeLists.txt +@@ -17,7 +17,7 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, + # Boston, MA 02111-1307, USA. + +-set(LIBVNCSERVER_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libvncserver) ++set(LIBVNCSERVER_INCLUDE_DIRS) + set(LIBVNCSERVER_LIBRARIES vncclient) + + set(REMMINA_PLUGIN_VNC_SRCS +diff --git a/remmina-plugins/vnc/libvncserver/CMakeLists.txt b/remmina-plugins/vnc/libvncserver/CMakeLists.txt +deleted file mode 100644 +index 88a0af2..0000000 +--- a/remmina-plugins/vnc/libvncserver/CMakeLists.txt ++++ /dev/null +@@ -1,102 +0,0 @@ +- +-include(CheckFunctionExists) +-include(CheckIncludeFile) +-include(CheckTypeSize) +-include(TestBigEndian) +- +-#set(PACKAGE_NAME "LibVNCServer") +-#set(FULL_PACKAGE_NAME "LibVNCServer") +-#set(PACKAGE_VERSION "0.9.8.2") +-#set(PROJECT_BUGREPORT_PATH "http://sourceforge.net/projects/libvncserver") +- +-include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/common) +- +-find_package(ZLIB) +-find_package(JPEG) +-find_package(GnuTLS) +-find_package(Threads) +-find_package(X11) +-find_library(LIBGCRYPT_LIBRARIES gcrypt) +- +-if(Threads_FOUND) +- option(TIGHTVNC_FILETRANSFER "Enable filetransfer" ON) +-endif(Threads_FOUND) +-if(ZLIB_FOUND) +- set(LIBVNCSERVER_HAVE_LIBZ 1) +-endif(ZLIB_FOUND) +-if(JPEG_FOUND) +- set(LIBVNCSERVER_HAVE_LIBJPEG 1) +-endif(JPEG_FOUND) +-option(LIBVNCSERVER_ALLOW24BPP "Allow 24 bpp" ON) +-if(GNUTLS_FOUND) +- set(LIBVNCSERVER_WITH_CLIENT_TLS 1) +-endif(GNUTLS_FOUND) +-if(LIBGCRYPT_LIBRARIES) +- message(STATUS "Found libgcrypt: ${LIBGCRYPT_LIBRARIES}") +- set(LIBVNCSERVER_WITH_CLIENT_GCRYPT 1) +-endif(LIBGCRYPT_LIBRARIES) +- +-check_include_file("fcntl.h" LIBVNCSERVER_HAVE_FCNTL_H) +-check_include_file("netinet/in.h" LIBVNCSERVER_HAVE_NETINET_IN_H) +-check_include_file("sys/socket.h" LIBVNCSERVER_HAVE_SYS_SOCKET_H) +-check_include_file("sys/stat.h" LIBVNCSERVER_HAVE_SYS_STAT_H) +-check_include_file("sys/time.h" LIBVNCSERVER_HAVE_SYS_TIME_H) +-check_include_file("sys/types.h" LIBVNCSERVER_HAVE_SYS_TYPES_H) +-check_include_file("sys/wait.h" LIBVNCSERVER_HAVE_SYS_WAIT_H) +-check_include_file("unistd.h" LIBVNCSERVER_HAVE_UNISTD_H) +- +-# headers needed for check_type_size() +-check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) +-check_include_file("stdint.h" HAVE_STDINT_H) +-check_include_file("stddef.h" HAVE_STDDEF_H) +-check_include_file("sys/types.h" HAVE_SYS_TYPES_H) +- +-check_function_exists(gettimeofday LIBVNCSERVER_HAVE_GETTIMEOFDAY) +- +-if(CMAKE_USE_PTHREADS_INIT) +- set(LIBVNCSERVER_HAVE_LIBPTHREAD 1) +-endif(CMAKE_USE_PTHREADS_INIT) +-if(LIBVNCSERVER_HAVE_SYS_SOCKET_H) +- # socklen_t +- list(APPEND CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h") +-endif(LIBVNCSERVER_HAVE_SYS_SOCKET_H) +-if(HAVE_ARPA_INET_H) +- # in_addr_t +- list(APPEND CMAKE_EXTRA_INCLUDE_FILES "arpa/inet.h") +-endif(HAVE_ARPA_INET_H) +- +-check_type_size(pid_t LIBVNCSERVER_PID_T) +-check_type_size(size_t LIBVNCSERVER_SIZE_T) +-check_type_size(socklen_t LIBVNCSERVER_SOCKLEN_T) +-check_type_size(in_addr_t LIBVNCSERVER_IN_ADDR_T) +- +-if(NOT HAVE_LIBVNCSERVER_IN_ADDR_T) +- set(LIBVNCSERVER_NEED_INADDR_T 1) +-endif(NOT HAVE_LIBVNCSERVER_IN_ADDR_T) +- +-TEST_BIG_ENDIAN(LIBVNCSERVER_WORDS_BIGENDIAN) +- +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbconfig.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbconfig.h) +-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbint.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbint.h) +- +-set(COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/common) +-set(LIBVNCCLIENT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libvncclient) +- +-set(LIBVNCCLIENT_SOURCES +- ${LIBVNCCLIENT_DIR}/cursor.c +- ${LIBVNCCLIENT_DIR}/listen.c +- ${LIBVNCCLIENT_DIR}/rfbproto.c +- ${LIBVNCCLIENT_DIR}/sockets.c +- ${LIBVNCCLIENT_DIR}/vncviewer.c +- ${COMMON_DIR}/minilzo.c +- ${LIBVNCCLIENT_DIR}/tls.c +-) +- +-add_library(vncclient STATIC ${LIBVNCCLIENT_SOURCES}) +- +-if(WIN32) +- set(ADDITIONAL_LIBS ws2_32) +-endif(WIN32) +- +-target_link_libraries(vncclient ${ADDITIONAL_LIBS} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES}) +- +diff --git a/remmina-plugins/vnc/libvncserver/common/d3des.c b/remmina-plugins/vnc/libvncserver/common/d3des.c +deleted file mode 100644 +index 2df1aab..0000000 +--- a/remmina-plugins/vnc/libvncserver/common/d3des.c ++++ /dev/null +@@ -1,436 +0,0 @@ +-/* +- * This is D3DES (V5.09) by Richard Outerbridge with the double and +- * triple-length support removed for use in VNC. Also the bytebit[] array +- * has been reversed so that the most significant bit in each byte of the +- * key is ignored, not the least significant. +- * +- * These changes are: +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +- */ +- +-/* D3DES (V5.09) - +- * +- * A portable, public domain, version of the Data Encryption Standard. +- * +- * Written with Symantec's THINK (Lightspeed) C by Richard Outerbridge. +- * Thanks to: Dan Hoey for his excellent Initial and Inverse permutation +- * code; Jim Gillogly & Phil Karn for the DES key schedule code; Dennis +- * Ferguson, Eric Young and Dana How for comparing notes; and Ray Lau, +- * for humouring me on. +- * +- * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge. +- * (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992. +- */ +- +-#include "d3des.h" +- +-static void scrunch(unsigned char *, unsigned long *); +-static void unscrun(unsigned long *, unsigned char *); +-static void desfunc(unsigned long *, unsigned long *); +-static void cookey(unsigned long *); +- +-static unsigned long KnL[32] = { 0L }; +-/* +-static unsigned long KnR[32] = { 0L }; +-static unsigned long Kn3[32] = { 0L }; +-static unsigned char Df_Key[24] = { +- 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, +- 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10, +- 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 }; +-*/ +- +-static unsigned short bytebit[8] = { +- 01, 02, 04, 010, 020, 040, 0100, 0200 }; +- +-static unsigned long bigbyte[24] = { +- 0x800000L, 0x400000L, 0x200000L, 0x100000L, +- 0x80000L, 0x40000L, 0x20000L, 0x10000L, +- 0x8000L, 0x4000L, 0x2000L, 0x1000L, +- 0x800L, 0x400L, 0x200L, 0x100L, +- 0x80L, 0x40L, 0x20L, 0x10L, +- 0x8L, 0x4L, 0x2L, 0x1L }; +- +-/* Use the key schedule specified in the Standard (ANSI X3.92-1981). */ +- +-static unsigned char pc1[56] = { +- 56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17, +- 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, +- 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, +- 13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3 }; +- +-static unsigned char totrot[16] = { +- 1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28 }; +- +-static unsigned char pc2[48] = { +- 13, 16, 10, 23, 0, 4, 2, 27, 14, 5, 20, 9, +- 22, 18, 11, 3, 25, 7, 15, 6, 26, 19, 12, 1, +- 40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47, +- 43, 48, 38, 55, 33, 52, 45, 41, 49, 35, 28, 31 }; +- +-void rfbDesKey(unsigned char *key, +- int edf) +-{ +- register int i, j, l, m, n; +- unsigned char pc1m[56], pcr[56]; +- unsigned long kn[32]; +- +- for ( j = 0; j < 56; j++ ) { +- l = pc1[j]; +- m = l & 07; +- pc1m[j] = (key[l >> 3] & bytebit[m]) ? 1 : 0; +- } +- for( i = 0; i < 16; i++ ) { +- if( edf == DE1 ) m = (15 - i) << 1; +- else m = i << 1; +- n = m + 1; +- kn[m] = kn[n] = 0L; +- for( j = 0; j < 28; j++ ) { +- l = j + totrot[i]; +- if( l < 28 ) pcr[j] = pc1m[l]; +- else pcr[j] = pc1m[l - 28]; +- } +- for( j = 28; j < 56; j++ ) { +- l = j + totrot[i]; +- if( l < 56 ) pcr[j] = pc1m[l]; +- else pcr[j] = pc1m[l - 28]; +- } +- for( j = 0; j < 24; j++ ) { +- if( pcr[pc2[j]] ) kn[m] |= bigbyte[j]; +- if( pcr[pc2[j+24]] ) kn[n] |= bigbyte[j]; +- } +- } +- cookey(kn); +- return; +- } +- +-static void cookey(register unsigned long *raw1) +-{ +- register unsigned long *cook, *raw0; +- unsigned long dough[32]; +- register int i; +- +- cook = dough; +- for( i = 0; i < 16; i++, raw1++ ) { +- raw0 = raw1++; +- *cook = (*raw0 & 0x00fc0000L) << 6; +- *cook |= (*raw0 & 0x00000fc0L) << 10; +- *cook |= (*raw1 & 0x00fc0000L) >> 10; +- *cook++ |= (*raw1 & 0x00000fc0L) >> 6; +- *cook = (*raw0 & 0x0003f000L) << 12; +- *cook |= (*raw0 & 0x0000003fL) << 16; +- *cook |= (*raw1 & 0x0003f000L) >> 4; +- *cook++ |= (*raw1 & 0x0000003fL); +- } +- rfbUseKey(dough); +- return; +- } +- +-void rfbCPKey(register unsigned long *into) +-{ +- register unsigned long *from, *endp; +- +- from = KnL, endp = &KnL[32]; +- while( from < endp ) *into++ = *from++; +- return; +- } +- +-void rfbUseKey(register unsigned long *from) +-{ +- register unsigned long *to, *endp; +- +- to = KnL, endp = &KnL[32]; +- while( to < endp ) *to++ = *from++; +- return; +- } +- +-void rfbDes(unsigned char *inblock, +- unsigned char *outblock) +-{ +- unsigned long work[2]; +- +- scrunch(inblock, work); +- desfunc(work, KnL); +- unscrun(work, outblock); +- return; +- } +- +-static void scrunch(register unsigned char *outof, +- register unsigned long *into) +-{ +- *into = (*outof++ & 0xffL) << 24; +- *into |= (*outof++ & 0xffL) << 16; +- *into |= (*outof++ & 0xffL) << 8; +- *into++ |= (*outof++ & 0xffL); +- *into = (*outof++ & 0xffL) << 24; +- *into |= (*outof++ & 0xffL) << 16; +- *into |= (*outof++ & 0xffL) << 8; +- *into |= (*outof & 0xffL); +- return; +- } +- +-static void unscrun(register unsigned long *outof, +- register unsigned char *into) +-{ +- *into++ = (unsigned char)((*outof >> 24) & 0xffL); +- *into++ = (unsigned char)((*outof >> 16) & 0xffL); +- *into++ = (unsigned char)((*outof >> 8) & 0xffL); +- *into++ = (unsigned char)( *outof++ & 0xffL); +- *into++ = (unsigned char)((*outof >> 24) & 0xffL); +- *into++ = (unsigned char)((*outof >> 16) & 0xffL); +- *into++ = (unsigned char)((*outof >> 8) & 0xffL); +- *into = (unsigned char)( *outof & 0xffL); +- return; +- } +- +-static unsigned long SP1[64] = { +- 0x01010400L, 0x00000000L, 0x00010000L, 0x01010404L, +- 0x01010004L, 0x00010404L, 0x00000004L, 0x00010000L, +- 0x00000400L, 0x01010400L, 0x01010404L, 0x00000400L, +- 0x01000404L, 0x01010004L, 0x01000000L, 0x00000004L, +- 0x00000404L, 0x01000400L, 0x01000400L, 0x00010400L, +- 0x00010400L, 0x01010000L, 0x01010000L, 0x01000404L, +- 0x00010004L, 0x01000004L, 0x01000004L, 0x00010004L, +- 0x00000000L, 0x00000404L, 0x00010404L, 0x01000000L, +- 0x00010000L, 0x01010404L, 0x00000004L, 0x01010000L, +- 0x01010400L, 0x01000000L, 0x01000000L, 0x00000400L, +- 0x01010004L, 0x00010000L, 0x00010400L, 0x01000004L, +- 0x00000400L, 0x00000004L, 0x01000404L, 0x00010404L, +- 0x01010404L, 0x00010004L, 0x01010000L, 0x01000404L, +- 0x01000004L, 0x00000404L, 0x00010404L, 0x01010400L, +- 0x00000404L, 0x01000400L, 0x01000400L, 0x00000000L, +- 0x00010004L, 0x00010400L, 0x00000000L, 0x01010004L }; +- +-static unsigned long SP2[64] = { +- 0x80108020L, 0x80008000L, 0x00008000L, 0x00108020L, +- 0x00100000L, 0x00000020L, 0x80100020L, 0x80008020L, +- 0x80000020L, 0x80108020L, 0x80108000L, 0x80000000L, +- 0x80008000L, 0x00100000L, 0x00000020L, 0x80100020L, +- 0x00108000L, 0x00100020L, 0x80008020L, 0x00000000L, +- 0x80000000L, 0x00008000L, 0x00108020L, 0x80100000L, +- 0x00100020L, 0x80000020L, 0x00000000L, 0x00108000L, +- 0x00008020L, 0x80108000L, 0x80100000L, 0x00008020L, +- 0x00000000L, 0x00108020L, 0x80100020L, 0x00100000L, +- 0x80008020L, 0x80100000L, 0x80108000L, 0x00008000L, +- 0x80100000L, 0x80008000L, 0x00000020L, 0x80108020L, +- 0x00108020L, 0x00000020L, 0x00008000L, 0x80000000L, +- 0x00008020L, 0x80108000L, 0x00100000L, 0x80000020L, +- 0x00100020L, 0x80008020L, 0x80000020L, 0x00100020L, +- 0x00108000L, 0x00000000L, 0x80008000L, 0x00008020L, +- 0x80000000L, 0x80100020L, 0x80108020L, 0x00108000L }; +- +-static unsigned long SP3[64] = { +- 0x00000208L, 0x08020200L, 0x00000000L, 0x08020008L, +- 0x08000200L, 0x00000000L, 0x00020208L, 0x08000200L, +- 0x00020008L, 0x08000008L, 0x08000008L, 0x00020000L, +- 0x08020208L, 0x00020008L, 0x08020000L, 0x00000208L, +- 0x08000000L, 0x00000008L, 0x08020200L, 0x00000200L, +- 0x00020200L, 0x08020000L, 0x08020008L, 0x00020208L, +- 0x08000208L, 0x00020200L, 0x00020000L, 0x08000208L, +- 0x00000008L, 0x08020208L, 0x00000200L, 0x08000000L, +- 0x08020200L, 0x08000000L, 0x00020008L, 0x00000208L, +- 0x00020000L, 0x08020200L, 0x08000200L, 0x00000000L, +- 0x00000200L, 0x00020008L, 0x08020208L, 0x08000200L, +- 0x08000008L, 0x00000200L, 0x00000000L, 0x08020008L, +- 0x08000208L, 0x00020000L, 0x08000000L, 0x08020208L, +- 0x00000008L, 0x00020208L, 0x00020200L, 0x08000008L, +- 0x08020000L, 0x08000208L, 0x00000208L, 0x08020000L, +- 0x00020208L, 0x00000008L, 0x08020008L, 0x00020200L }; +- +-static unsigned long SP4[64] = { +- 0x00802001L, 0x00002081L, 0x00002081L, 0x00000080L, +- 0x00802080L, 0x00800081L, 0x00800001L, 0x00002001L, +- 0x00000000L, 0x00802000L, 0x00802000L, 0x00802081L, +- 0x00000081L, 0x00000000L, 0x00800080L, 0x00800001L, +- 0x00000001L, 0x00002000L, 0x00800000L, 0x00802001L, +- 0x00000080L, 0x00800000L, 0x00002001L, 0x00002080L, +- 0x00800081L, 0x00000001L, 0x00002080L, 0x00800080L, +- 0x00002000L, 0x00802080L, 0x00802081L, 0x00000081L, +- 0x00800080L, 0x00800001L, 0x00802000L, 0x00802081L, +- 0x00000081L, 0x00000000L, 0x00000000L, 0x00802000L, +- 0x00002080L, 0x00800080L, 0x00800081L, 0x00000001L, +- 0x00802001L, 0x00002081L, 0x00002081L, 0x00000080L, +- 0x00802081L, 0x00000081L, 0x00000001L, 0x00002000L, +- 0x00800001L, 0x00002001L, 0x00802080L, 0x00800081L, +- 0x00002001L, 0x00002080L, 0x00800000L, 0x00802001L, +- 0x00000080L, 0x00800000L, 0x00002000L, 0x00802080L }; +- +-static unsigned long SP5[64] = { +- 0x00000100L, 0x02080100L, 0x02080000L, 0x42000100L, +- 0x00080000L, 0x00000100L, 0x40000000L, 0x02080000L, +- 0x40080100L, 0x00080000L, 0x02000100L, 0x40080100L, +- 0x42000100L, 0x42080000L, 0x00080100L, 0x40000000L, +- 0x02000000L, 0x40080000L, 0x40080000L, 0x00000000L, +- 0x40000100L, 0x42080100L, 0x42080100L, 0x02000100L, +- 0x42080000L, 0x40000100L, 0x00000000L, 0x42000000L, +- 0x02080100L, 0x02000000L, 0x42000000L, 0x00080100L, +- 0x00080000L, 0x42000100L, 0x00000100L, 0x02000000L, +- 0x40000000L, 0x02080000L, 0x42000100L, 0x40080100L, +- 0x02000100L, 0x40000000L, 0x42080000L, 0x02080100L, +- 0x40080100L, 0x00000100L, 0x02000000L, 0x42080000L, +- 0x42080100L, 0x00080100L, 0x42000000L, 0x42080100L, +- 0x02080000L, 0x00000000L, 0x40080000L, 0x42000000L, +- 0x00080100L, 0x02000100L, 0x40000100L, 0x00080000L, +- 0x00000000L, 0x40080000L, 0x02080100L, 0x40000100L }; +- +-static unsigned long SP6[64] = { +- 0x20000010L, 0x20400000L, 0x00004000L, 0x20404010L, +- 0x20400000L, 0x00000010L, 0x20404010L, 0x00400000L, +- 0x20004000L, 0x00404010L, 0x00400000L, 0x20000010L, +- 0x00400010L, 0x20004000L, 0x20000000L, 0x00004010L, +- 0x00000000L, 0x00400010L, 0x20004010L, 0x00004000L, +- 0x00404000L, 0x20004010L, 0x00000010L, 0x20400010L, +- 0x20400010L, 0x00000000L, 0x00404010L, 0x20404000L, +- 0x00004010L, 0x00404000L, 0x20404000L, 0x20000000L, +- 0x20004000L, 0x00000010L, 0x20400010L, 0x00404000L, +- 0x20404010L, 0x00400000L, 0x00004010L, 0x20000010L, +- 0x00400000L, 0x20004000L, 0x20000000L, 0x00004010L, +- 0x20000010L, 0x20404010L, 0x00404000L, 0x20400000L, +- 0x00404010L, 0x20404000L, 0x00000000L, 0x20400010L, +- 0x00000010L, 0x00004000L, 0x20400000L, 0x00404010L, +- 0x00004000L, 0x00400010L, 0x20004010L, 0x00000000L, +- 0x20404000L, 0x20000000L, 0x00400010L, 0x20004010L }; +- +-static unsigned long SP7[64] = { +- 0x00200000L, 0x04200002L, 0x04000802L, 0x00000000L, +- 0x00000800L, 0x04000802L, 0x00200802L, 0x04200800L, +- 0x04200802L, 0x00200000L, 0x00000000L, 0x04000002L, +- 0x00000002L, 0x04000000L, 0x04200002L, 0x00000802L, +- 0x04000800L, 0x00200802L, 0x00200002L, 0x04000800L, +- 0x04000002L, 0x04200000L, 0x04200800L, 0x00200002L, +- 0x04200000L, 0x00000800L, 0x00000802L, 0x04200802L, +- 0x00200800L, 0x00000002L, 0x04000000L, 0x00200800L, +- 0x04000000L, 0x00200800L, 0x00200000L, 0x04000802L, +- 0x04000802L, 0x04200002L, 0x04200002L, 0x00000002L, +- 0x00200002L, 0x04000000L, 0x04000800L, 0x00200000L, +- 0x04200800L, 0x00000802L, 0x00200802L, 0x04200800L, +- 0x00000802L, 0x04000002L, 0x04200802L, 0x04200000L, +- 0x00200800L, 0x00000000L, 0x00000002L, 0x04200802L, +- 0x00000000L, 0x00200802L, 0x04200000L, 0x00000800L, +- 0x04000002L, 0x04000800L, 0x00000800L, 0x00200002L }; +- +-static unsigned long SP8[64] = { +- 0x10001040L, 0x00001000L, 0x00040000L, 0x10041040L, +- 0x10000000L, 0x10001040L, 0x00000040L, 0x10000000L, +- 0x00040040L, 0x10040000L, 0x10041040L, 0x00041000L, +- 0x10041000L, 0x00041040L, 0x00001000L, 0x00000040L, +- 0x10040000L, 0x10000040L, 0x10001000L, 0x00001040L, +- 0x00041000L, 0x00040040L, 0x10040040L, 0x10041000L, +- 0x00001040L, 0x00000000L, 0x00000000L, 0x10040040L, +- 0x10000040L, 0x10001000L, 0x00041040L, 0x00040000L, +- 0x00041040L, 0x00040000L, 0x10041000L, 0x00001000L, +- 0x00000040L, 0x10040040L, 0x00001000L, 0x00041040L, +- 0x10001000L, 0x00000040L, 0x10000040L, 0x10040000L, +- 0x10040040L, 0x10000000L, 0x00040000L, 0x10001040L, +- 0x00000000L, 0x10041040L, 0x00040040L, 0x10000040L, +- 0x10040000L, 0x10001000L, 0x10001040L, 0x00000000L, +- 0x10041040L, 0x00041000L, 0x00041000L, 0x00001040L, +- 0x00001040L, 0x00040040L, 0x10000000L, 0x10041000L }; +- +-static void desfunc(register unsigned long *block, +- register unsigned long *keys) +-{ +- register unsigned long fval, work, right, leftt; +- register int round; +- +- leftt = block[0]; +- right = block[1]; +- work = ((leftt >> 4) ^ right) & 0x0f0f0f0fL; +- right ^= work; +- leftt ^= (work << 4); +- work = ((leftt >> 16) ^ right) & 0x0000ffffL; +- right ^= work; +- leftt ^= (work << 16); +- work = ((right >> 2) ^ leftt) & 0x33333333L; +- leftt ^= work; +- right ^= (work << 2); +- work = ((right >> 8) ^ leftt) & 0x00ff00ffL; +- leftt ^= work; +- right ^= (work << 8); +- right = ((right << 1) | ((right >> 31) & 1L)) & 0xffffffffL; +- work = (leftt ^ right) & 0xaaaaaaaaL; +- leftt ^= work; +- right ^= work; +- leftt = ((leftt << 1) | ((leftt >> 31) & 1L)) & 0xffffffffL; +- +- for( round = 0; round < 8; round++ ) { +- work = (right << 28) | (right >> 4); +- work ^= *keys++; +- fval = SP7[ work & 0x3fL]; +- fval |= SP5[(work >> 8) & 0x3fL]; +- fval |= SP3[(work >> 16) & 0x3fL]; +- fval |= SP1[(work >> 24) & 0x3fL]; +- work = right ^ *keys++; +- fval |= SP8[ work & 0x3fL]; +- fval |= SP6[(work >> 8) & 0x3fL]; +- fval |= SP4[(work >> 16) & 0x3fL]; +- fval |= SP2[(work >> 24) & 0x3fL]; +- leftt ^= fval; +- work = (leftt << 28) | (leftt >> 4); +- work ^= *keys++; +- fval = SP7[ work & 0x3fL]; +- fval |= SP5[(work >> 8) & 0x3fL]; +- fval |= SP3[(work >> 16) & 0x3fL]; +- fval |= SP1[(work >> 24) & 0x3fL]; +- work = leftt ^ *keys++; +- fval |= SP8[ work & 0x3fL]; +- fval |= SP6[(work >> 8) & 0x3fL]; +- fval |= SP4[(work >> 16) & 0x3fL]; +- fval |= SP2[(work >> 24) & 0x3fL]; +- right ^= fval; +- } +- +- right = (right << 31) | (right >> 1); +- work = (leftt ^ right) & 0xaaaaaaaaL; +- leftt ^= work; +- right ^= work; +- leftt = (leftt << 31) | (leftt >> 1); +- work = ((leftt >> 8) ^ right) & 0x00ff00ffL; +- right ^= work; +- leftt ^= (work << 8); +- work = ((leftt >> 2) ^ right) & 0x33333333L; +- right ^= work; +- leftt ^= (work << 2); +- work = ((right >> 16) ^ leftt) & 0x0000ffffL; +- leftt ^= work; +- right ^= (work << 16); +- work = ((right >> 4) ^ leftt) & 0x0f0f0f0fL; +- leftt ^= work; +- right ^= (work << 4); +- *block++ = right; +- *block = leftt; +- return; +- } +- +-/* Validation sets: +- * +- * Single-length key, single-length plaintext - +- * Key : 0123 4567 89ab cdef +- * Plain : 0123 4567 89ab cde7 +- * Cipher : c957 4425 6a5e d31d +- * +- * Double-length key, single-length plaintext - +- * Key : 0123 4567 89ab cdef fedc ba98 7654 3210 +- * Plain : 0123 4567 89ab cde7 +- * Cipher : 7f1d 0a77 826b 8aff +- * +- * Double-length key, double-length plaintext - +- * Key : 0123 4567 89ab cdef fedc ba98 7654 3210 +- * Plain : 0123 4567 89ab cdef 0123 4567 89ab cdff +- * Cipher : 27a0 8440 406a df60 278f 47cf 42d6 15d7 +- * +- * Triple-length key, single-length plaintext - +- * Key : 0123 4567 89ab cdef fedc ba98 7654 3210 89ab cdef 0123 4567 +- * Plain : 0123 4567 89ab cde7 +- * Cipher : de0b 7c06 ae5e 0ed5 +- * +- * Triple-length key, double-length plaintext - +- * Key : 0123 4567 89ab cdef fedc ba98 7654 3210 89ab cdef 0123 4567 +- * Plain : 0123 4567 89ab cdef 0123 4567 89ab cdff +- * Cipher : ad0d 1b30 ac17 cf07 0ed1 1c63 81e4 4de5 +- * +- * d3des V5.0a rwo 9208.07 18:44 Graven Imagery +- **********************************************************************/ +diff --git a/remmina-plugins/vnc/libvncserver/common/d3des.h b/remmina-plugins/vnc/libvncserver/common/d3des.h +deleted file mode 100644 +index e3761ca..0000000 +--- a/remmina-plugins/vnc/libvncserver/common/d3des.h ++++ /dev/null +@@ -1,56 +0,0 @@ +-#ifndef D3DES_H +-#define D3DES_H +- +-/* +- * This is D3DES (V5.09) by Richard Outerbridge with the double and +- * triple-length support removed for use in VNC. +- * +- * These changes are: +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +- */ +- +-/* d3des.h - +- * +- * Headers and defines for d3des.c +- * Graven Imagery, 1992. +- * +- * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge +- * (GEnie : OUTER; CIS : [71755,204]) +- */ +- +-#define EN0 0 /* MODE == encrypt */ +-#define DE1 1 /* MODE == decrypt */ +- +-extern void rfbDesKey(unsigned char *, int); +-/* hexkey[8] MODE +- * Sets the internal key register according to the hexadecimal +- * key contained in the 8 bytes of hexkey, according to the DES, +- * for encryption or decryption according to MODE. +- */ +- +-extern void rfbUseKey(unsigned long *); +-/* cookedkey[32] +- * Loads the internal key register with the data in cookedkey. +- */ +- +-extern void rfbCPKey(unsigned long *); +-/* cookedkey[32] +- * Copies the contents of the internal key register into the storage +- * located at &cookedkey[0]. +- */ +- +-extern void rfbDes(unsigned char *, unsigned char *); +-/* from[8] to[8] +- * Encrypts/Decrypts (according to the key currently loaded in the +- * internal key register) one block of eight bytes at address 'from' +- * into the block at address 'to'. They can be the same. +- */ +- +-/* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery +- ********************************************************************/ +- +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/common/lzoconf.h b/remmina-plugins/vnc/libvncserver/common/lzoconf.h +deleted file mode 100644 +index d6125e8..0000000 +--- a/remmina-plugins/vnc/libvncserver/common/lzoconf.h ++++ /dev/null +@@ -1,419 +0,0 @@ +-/* lzoconf.h -- configuration for the LZO real-time data compression library +- +- This file is part of the LZO real-time data compression library. +- +- Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer +- All Rights Reserved. +- +- The LZO library is free software; you can redistribute it and/or +- modify it under the terms of the GNU General Public License as +- published by the Free Software Foundation; either version 2 of +- the License, or (at your option) any later version. +- +- The LZO library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with the LZO library; see the file COPYING. +- If not, write to the Free Software Foundation, Inc., +- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +- +- Markus F.X.J. Oberhumer +- +- http://www.oberhumer.com/opensource/lzo/ +- */ +- +- +-#ifndef __LZOCONF_H_INCLUDED +-#define __LZOCONF_H_INCLUDED 1 +- +-#define LZO_VERSION 0x2040 +-#define LZO_VERSION_STRING "2.04" +-#define LZO_VERSION_DATE "Oct 31 2010" +- +-/* internal Autoconf configuration file - only used when building LZO */ +-#if defined(LZO_HAVE_CONFIG_H) +-# include +-#endif +-#include +-#include +- +- +-/*********************************************************************** +-// LZO requires a conforming +-************************************************************************/ +- +-#if !defined(CHAR_BIT) || (CHAR_BIT != 8) +-# error "invalid CHAR_BIT" +-#endif +-#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) +-# error "check your compiler installation" +-#endif +-#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) +-# error "your limits.h macros are broken" +-#endif +- +-/* get OS and architecture defines */ +-#ifndef __LZODEFS_H_INCLUDED +-#include "lzodefs.h" +-#endif +- +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +- +-/*********************************************************************** +-// some core defines +-************************************************************************/ +- +-#if !defined(LZO_UINT32_C) +-# if (UINT_MAX < LZO_0xffffffffL) +-# define LZO_UINT32_C(c) c ## UL +-# else +-# define LZO_UINT32_C(c) ((c) + 0U) +-# endif +-#endif +- +-/* memory checkers */ +-#if !defined(__LZO_CHECKER) +-# if defined(__BOUNDS_CHECKING_ON) +-# define __LZO_CHECKER 1 +-# elif defined(__CHECKER__) +-# define __LZO_CHECKER 1 +-# elif defined(__INSURE__) +-# define __LZO_CHECKER 1 +-# elif defined(__PURIFY__) +-# define __LZO_CHECKER 1 +-# endif +-#endif +- +- +-/*********************************************************************** +-// integral and pointer types +-************************************************************************/ +- +-/* lzo_uint should match size_t */ +-#if !defined(LZO_UINT_MAX) +-# if defined(LZO_ABI_LLP64) /* WIN64 */ +-# if defined(LZO_OS_WIN64) +- typedef unsigned __int64 lzo_uint; +- typedef __int64 lzo_int; +-# else +- typedef unsigned long long lzo_uint; +- typedef long long lzo_int; +-# endif +-# define LZO_UINT_MAX 0xffffffffffffffffull +-# define LZO_INT_MAX 9223372036854775807LL +-# define LZO_INT_MIN (-1LL - LZO_INT_MAX) +-# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */ +- typedef unsigned int lzo_uint; +- typedef int lzo_int; +-# define LZO_UINT_MAX UINT_MAX +-# define LZO_INT_MAX INT_MAX +-# define LZO_INT_MIN INT_MIN +-# elif (ULONG_MAX >= LZO_0xffffffffL) +- typedef unsigned long lzo_uint; +- typedef long lzo_int; +-# define LZO_UINT_MAX ULONG_MAX +-# define LZO_INT_MAX LONG_MAX +-# define LZO_INT_MIN LONG_MIN +-# else +-# error "lzo_uint" +-# endif +-#endif +- +-/* Integral types with 32 bits or more. */ +-#if !defined(LZO_UINT32_MAX) +-# if (UINT_MAX >= LZO_0xffffffffL) +- typedef unsigned int lzo_uint32; +- typedef int lzo_int32; +-# define LZO_UINT32_MAX UINT_MAX +-# define LZO_INT32_MAX INT_MAX +-# define LZO_INT32_MIN INT_MIN +-# elif (ULONG_MAX >= LZO_0xffffffffL) +- typedef unsigned long lzo_uint32; +- typedef long lzo_int32; +-# define LZO_UINT32_MAX ULONG_MAX +-# define LZO_INT32_MAX LONG_MAX +-# define LZO_INT32_MIN LONG_MIN +-# else +-# error "lzo_uint32" +-# endif +-#endif +- +-/* The larger type of lzo_uint and lzo_uint32. */ +-#if (LZO_UINT_MAX >= LZO_UINT32_MAX) +-# define lzo_xint lzo_uint +-#else +-# define lzo_xint lzo_uint32 +-#endif +- +-/* Memory model that allows to access memory at offsets of lzo_uint. */ +-#if !defined(__LZO_MMODEL) +-# if (LZO_UINT_MAX <= UINT_MAX) +-# define __LZO_MMODEL /*empty*/ +-# elif defined(LZO_HAVE_MM_HUGE_PTR) +-# define __LZO_MMODEL_HUGE 1 +-# define __LZO_MMODEL __huge +-# else +-# define __LZO_MMODEL /*empty*/ +-# endif +-#endif +- +-/* no typedef here because of const-pointer issues */ +-#define lzo_bytep unsigned char __LZO_MMODEL * +-#define lzo_charp char __LZO_MMODEL * +-#define lzo_voidp void __LZO_MMODEL * +-#define lzo_shortp short __LZO_MMODEL * +-#define lzo_ushortp unsigned short __LZO_MMODEL * +-#define lzo_uint32p lzo_uint32 __LZO_MMODEL * +-#define lzo_int32p lzo_int32 __LZO_MMODEL * +-#define lzo_uintp lzo_uint __LZO_MMODEL * +-#define lzo_intp lzo_int __LZO_MMODEL * +-#define lzo_xintp lzo_xint __LZO_MMODEL * +-#define lzo_voidpp lzo_voidp __LZO_MMODEL * +-#define lzo_bytepp lzo_bytep __LZO_MMODEL * +-/* deprecated - use 'lzo_bytep' instead of 'lzo_byte *' */ +-#define lzo_byte unsigned char __LZO_MMODEL +- +-typedef int lzo_bool; +- +- +-/*********************************************************************** +-// function types +-************************************************************************/ +- +-/* name mangling */ +-#if !defined(__LZO_EXTERN_C) +-# ifdef __cplusplus +-# define __LZO_EXTERN_C extern "C" +-# else +-# define __LZO_EXTERN_C extern +-# endif +-#endif +- +-/* calling convention */ +-#if !defined(__LZO_CDECL) +-# define __LZO_CDECL __lzo_cdecl +-#endif +- +-/* DLL export information */ +-#if !defined(__LZO_EXPORT1) +-# define __LZO_EXPORT1 /*empty*/ +-#endif +-#if !defined(__LZO_EXPORT2) +-# define __LZO_EXPORT2 /*empty*/ +-#endif +- +-/* __cdecl calling convention for public C and assembly functions */ +-#if !defined(LZO_PUBLIC) +-# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL +-#endif +-#if !defined(LZO_EXTERN) +-# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype) +-#endif +-#if !defined(LZO_PRIVATE) +-# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL +-#endif +- +-/* function types */ +-typedef int +-(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len, +- lzo_bytep dst, lzo_uintp dst_len, +- lzo_voidp wrkmem ); +- +-typedef int +-(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len, +- lzo_bytep dst, lzo_uintp dst_len, +- lzo_voidp wrkmem ); +- +-typedef int +-(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len, +- lzo_bytep dst, lzo_uintp dst_len, +- lzo_voidp wrkmem ); +- +-typedef int +-(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len, +- lzo_bytep dst, lzo_uintp dst_len, +- lzo_voidp wrkmem, +- const lzo_bytep dict, lzo_uint dict_len ); +- +-typedef int +-(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len, +- lzo_bytep dst, lzo_uintp dst_len, +- lzo_voidp wrkmem, +- const lzo_bytep dict, lzo_uint dict_len ); +- +- +-/* Callback interface. Currently only the progress indicator ("nprogress") +- * is used, but this may change in a future release. */ +- +-struct lzo_callback_t; +-typedef struct lzo_callback_t lzo_callback_t; +-#define lzo_callback_p lzo_callback_t __LZO_MMODEL * +- +-/* malloc & free function types */ +-typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t) +- (lzo_callback_p self, lzo_uint items, lzo_uint size); +-typedef void (__LZO_CDECL *lzo_free_func_t) +- (lzo_callback_p self, lzo_voidp ptr); +- +-/* a progress indicator callback function */ +-typedef void (__LZO_CDECL *lzo_progress_func_t) +- (lzo_callback_p, lzo_uint, lzo_uint, int); +- +-struct lzo_callback_t +-{ +- /* custom allocators (set to 0 to disable) */ +- lzo_alloc_func_t nalloc; /* [not used right now] */ +- lzo_free_func_t nfree; /* [not used right now] */ +- +- /* a progress indicator callback function (set to 0 to disable) */ +- lzo_progress_func_t nprogress; +- +- /* NOTE: the first parameter "self" of the nalloc/nfree/nprogress +- * callbacks points back to this struct, so you are free to store +- * some extra info in the following variables. */ +- lzo_voidp user1; +- lzo_xint user2; +- lzo_xint user3; +-}; +- +- +-/*********************************************************************** +-// error codes and prototypes +-************************************************************************/ +- +-/* Error codes for the compression/decompression functions. Negative +- * values are errors, positive values will be used for special but +- * normal events. +- */ +-#define LZO_E_OK 0 +-#define LZO_E_ERROR (-1) +-#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */ +-#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ +-#define LZO_E_INPUT_OVERRUN (-4) +-#define LZO_E_OUTPUT_OVERRUN (-5) +-#define LZO_E_LOOKBEHIND_OVERRUN (-6) +-#define LZO_E_EOF_NOT_FOUND (-7) +-#define LZO_E_INPUT_NOT_CONSUMED (-8) +-#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ +- +- +-#ifndef lzo_sizeof_dict_t +-# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep)) +-#endif +- +-/* lzo_init() should be the first function you call. +- * Check the return code ! +- * +- * lzo_init() is a macro to allow checking that the library and the +- * compiler's view of various types are consistent. +- */ +-#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ +- (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\ +- (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\ +- (int)sizeof(lzo_callback_t)) +-LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int); +- +-/* version functions (useful for shared libraries) */ +-LZO_EXTERN(unsigned) lzo_version(void); +-LZO_EXTERN(const char *) lzo_version_string(void); +-LZO_EXTERN(const char *) lzo_version_date(void); +-LZO_EXTERN(const lzo_charp) _lzo_version_string(void); +-LZO_EXTERN(const lzo_charp) _lzo_version_date(void); +- +-/* string functions */ +-LZO_EXTERN(int) +- lzo_memcmp(const lzo_voidp a, const lzo_voidp b, lzo_uint len); +-LZO_EXTERN(lzo_voidp) +- lzo_memcpy(lzo_voidp dst, const lzo_voidp src, lzo_uint len); +-LZO_EXTERN(lzo_voidp) +- lzo_memmove(lzo_voidp dst, const lzo_voidp src, lzo_uint len); +-LZO_EXTERN(lzo_voidp) +- lzo_memset(lzo_voidp buf, int c, lzo_uint len); +- +-/* checksum functions */ +-LZO_EXTERN(lzo_uint32) +- lzo_adler32(lzo_uint32 c, const lzo_bytep buf, lzo_uint len); +-LZO_EXTERN(lzo_uint32) +- lzo_crc32(lzo_uint32 c, const lzo_bytep buf, lzo_uint len); +-LZO_EXTERN(const lzo_uint32p) +- lzo_get_crc32_table(void); +- +-/* misc. */ +-LZO_EXTERN(int) _lzo_config_check(void); +-typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u; +-typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u; +-typedef union { void *vp; lzo_bytep bp; lzo_uint u; lzo_uint32 u32; unsigned long l; } lzo_align_t; +- +-/* align a char pointer on a boundary that is a multiple of 'size' */ +-LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp p, lzo_uint size); +-#define LZO_PTR_ALIGN_UP(p,size) \ +- ((p) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(p),(lzo_uint)(size))) +- +- +-/*********************************************************************** +-// deprecated macros - only for backward compatibility with LZO v1.xx +-************************************************************************/ +- +-#if defined(LZO_CFG_COMPAT) +- +-#define __LZOCONF_H 1 +- +-#if defined(LZO_ARCH_I086) +-# define __LZO_i386 1 +-#elif defined(LZO_ARCH_I386) +-# define __LZO_i386 1 +-#endif +- +-#if defined(LZO_OS_DOS16) +-# define __LZO_DOS 1 +-# define __LZO_DOS16 1 +-#elif defined(LZO_OS_DOS32) +-# define __LZO_DOS 1 +-#elif defined(LZO_OS_WIN16) +-# define __LZO_WIN 1 +-# define __LZO_WIN16 1 +-#elif defined(LZO_OS_WIN32) +-# define __LZO_WIN 1 +-#endif +- +-#define __LZO_CMODEL /*empty*/ +-#define __LZO_DMODEL /*empty*/ +-#define __LZO_ENTRY __LZO_CDECL +-#define LZO_EXTERN_CDECL LZO_EXTERN +-#define LZO_ALIGN LZO_PTR_ALIGN_UP +- +-#define lzo_compress_asm_t lzo_compress_t +-#define lzo_decompress_asm_t lzo_decompress_t +- +-#endif /* LZO_CFG_COMPAT */ +- +- +-#ifdef __cplusplus +-} /* extern "C" */ +-#endif +- +-#endif /* already included */ +- +- +-/* vim:set ts=4 et: */ +diff --git a/remmina-plugins/vnc/libvncserver/common/lzodefs.h b/remmina-plugins/vnc/libvncserver/common/lzodefs.h +deleted file mode 100644 +index 190013f..0000000 +--- a/remmina-plugins/vnc/libvncserver/common/lzodefs.h ++++ /dev/null +@@ -1,1851 +0,0 @@ +-/* lzodefs.h -- architecture, OS and compiler specific defines +- +- This file is part of the LZO real-time data compression library. +- +- Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer +- All Rights Reserved. +- +- The LZO library is free software; you can redistribute it and/or +- modify it under the terms of the GNU General Public License as +- published by the Free Software Foundation; either version 2 of +- the License, or (at your option) any later version. +- +- The LZO library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with the LZO library; see the file COPYING. +- If not, write to the Free Software Foundation, Inc., +- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +- +- Markus F.X.J. Oberhumer +- +- http://www.oberhumer.com/opensource/lzo/ +- */ +- +- +-#ifndef __LZODEFS_H_INCLUDED +-#define __LZODEFS_H_INCLUDED 1 +- +-#if defined(__CYGWIN32__) && !defined(__CYGWIN__) +-# define __CYGWIN__ __CYGWIN32__ +-#endif +-#if defined(__IBMCPP__) && !defined(__IBMC__) +-# define __IBMC__ __IBMCPP__ +-#endif +-#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) +-# define __INTEL_COMPILER __ICL +-#endif +-#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) +-# define _ALL_SOURCE 1 +-#endif +-#if defined(__mips__) && defined(__R5900__) +-# if !defined(__LONG_MAX__) +-# define __LONG_MAX__ 9223372036854775807L +-# endif +-#endif +-#if defined(__INTEL_COMPILER) && defined(__linux__) +-# pragma warning(disable: 193) +-#endif +-#if defined(__KEIL__) && defined(__C166__) +-# pragma warning disable = 322 +-#elif 0 && defined(__C251__) +-# pragma warning disable = 322 +-#endif +-#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) +-# if (_MSC_VER >= 1300) +-# pragma warning(disable: 4668) +-# endif +-#endif +-#if 0 && defined(__WATCOMC__) +-# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) +-# pragma warning 203 9 +-# endif +-#endif +-#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) +-# pragma option -h +-#endif +-#if 0 +-#define LZO_0xffffL 0xfffful +-#define LZO_0xffffffffL 0xfffffffful +-#else +-#define LZO_0xffffL 65535ul +-#define LZO_0xffffffffL 4294967295ul +-#endif +-#if (LZO_0xffffL == LZO_0xffffffffL) +-# error "your preprocessor is broken 1" +-#endif +-#if (16ul * 16384ul != 262144ul) +-# error "your preprocessor is broken 2" +-#endif +-#if 0 +-#if (32767 >= 4294967295ul) +-# error "your preprocessor is broken 3" +-#endif +-#if (65535u >= 4294967295ul) +-# error "your preprocessor is broken 4" +-#endif +-#endif +-#if (UINT_MAX == LZO_0xffffL) +-#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) +-# if !defined(MSDOS) +-# define MSDOS 1 +-# endif +-# if !defined(_MSDOS) +-# define _MSDOS 1 +-# endif +-#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) +-# if (__VERSION == 520) && (MB_LEN_MAX == 1) +-# if !defined(__AZTEC_C__) +-# define __AZTEC_C__ __VERSION +-# endif +-# if !defined(__DOS__) +-# define __DOS__ 1 +-# endif +-# endif +-#endif +-#endif +-#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) +-# define ptrdiff_t long +-# define _PTRDIFF_T_DEFINED 1 +-#endif +-#if (UINT_MAX == LZO_0xffffL) +-# undef __LZO_RENAME_A +-# undef __LZO_RENAME_B +-# if defined(__AZTEC_C__) && defined(__DOS__) +-# define __LZO_RENAME_A 1 +-# elif defined(_MSC_VER) && defined(MSDOS) +-# if (_MSC_VER < 600) +-# define __LZO_RENAME_A 1 +-# elif (_MSC_VER < 700) +-# define __LZO_RENAME_B 1 +-# endif +-# elif defined(__TSC__) && defined(__OS2__) +-# define __LZO_RENAME_A 1 +-# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) +-# define __LZO_RENAME_A 1 +-# elif defined(__PACIFIC__) && defined(DOS) +-# if !defined(__far) +-# define __far far +-# endif +-# if !defined(__near) +-# define __near near +-# endif +-# endif +-# if defined(__LZO_RENAME_A) +-# if !defined(__cdecl) +-# define __cdecl cdecl +-# endif +-# if !defined(__far) +-# define __far far +-# endif +-# if !defined(__huge) +-# define __huge huge +-# endif +-# if !defined(__near) +-# define __near near +-# endif +-# if !defined(__pascal) +-# define __pascal pascal +-# endif +-# if !defined(__huge) +-# define __huge huge +-# endif +-# elif defined(__LZO_RENAME_B) +-# if !defined(__cdecl) +-# define __cdecl _cdecl +-# endif +-# if !defined(__far) +-# define __far _far +-# endif +-# if !defined(__huge) +-# define __huge _huge +-# endif +-# if !defined(__near) +-# define __near _near +-# endif +-# if !defined(__pascal) +-# define __pascal _pascal +-# endif +-# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +-# if !defined(__cdecl) +-# define __cdecl cdecl +-# endif +-# if !defined(__pascal) +-# define __pascal pascal +-# endif +-# endif +-# undef __LZO_RENAME_A +-# undef __LZO_RENAME_B +-#endif +-#if (UINT_MAX == LZO_0xffffL) +-#if defined(__AZTEC_C__) && defined(__DOS__) +-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +-#elif defined(_MSC_VER) && defined(MSDOS) +-# if (_MSC_VER < 600) +-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +-# endif +-# if (_MSC_VER < 700) +-# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +-# define LZO_BROKEN_SIZEOF 1 +-# endif +-#elif defined(__PACIFIC__) && defined(DOS) +-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +-#elif defined(__TURBOC__) && defined(__MSDOS__) +-# if (__TURBOC__ < 0x0150) +-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +-# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +-# endif +-# if (__TURBOC__ < 0x0200) +-# define LZO_BROKEN_SIZEOF 1 +-# endif +-# if (__TURBOC__ < 0x0400) && defined(__cplusplus) +-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +-# endif +-#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +-# define LZO_BROKEN_SIZEOF 1 +-#endif +-#endif +-#if defined(__WATCOMC__) && (__WATCOMC__ < 900) +-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +-#endif +-#if defined(_CRAY) && defined(_CRAY1) +-# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 +-#endif +-#define LZO_PP_STRINGIZE(x) #x +-#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) +-#define LZO_PP_CONCAT2(a,b) a ## b +-#define LZO_PP_CONCAT3(a,b,c) a ## b ## c +-#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d +-#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +-#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) +-#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) +-#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) +-#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) +-#if 1 +-#define LZO_CPP_STRINGIZE(x) #x +-#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) +-#define LZO_CPP_CONCAT2(a,b) a ## b +-#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c +-#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d +-#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +-#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) +-#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) +-#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) +-#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) +-#endif +-#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) +-#if 1 && defined(__cplusplus) +-# if !defined(__STDC_CONSTANT_MACROS) +-# define __STDC_CONSTANT_MACROS 1 +-# endif +-# if !defined(__STDC_LIMIT_MACROS) +-# define __STDC_LIMIT_MACROS 1 +-# endif +-#endif +-#if defined(__cplusplus) +-# define LZO_EXTERN_C extern "C" +-#else +-# define LZO_EXTERN_C extern +-#endif +-#if !defined(__LZO_OS_OVERRIDE) +-#if (LZO_OS_FREESTANDING) +-# define LZO_INFO_OS "freestanding" +-#elif (LZO_OS_EMBEDDED) +-# define LZO_INFO_OS "embedded" +-#elif 1 && defined(__IAR_SYSTEMS_ICC__) +-# define LZO_OS_EMBEDDED 1 +-# define LZO_INFO_OS "embedded" +-#elif defined(__CYGWIN__) && defined(__GNUC__) +-# define LZO_OS_CYGWIN 1 +-# define LZO_INFO_OS "cygwin" +-#elif defined(__EMX__) && defined(__GNUC__) +-# define LZO_OS_EMX 1 +-# define LZO_INFO_OS "emx" +-#elif defined(__BEOS__) +-# define LZO_OS_BEOS 1 +-# define LZO_INFO_OS "beos" +-#elif defined(__Lynx__) +-# define LZO_OS_LYNXOS 1 +-# define LZO_INFO_OS "lynxos" +-#elif defined(__OS400__) +-# define LZO_OS_OS400 1 +-# define LZO_INFO_OS "os400" +-#elif defined(__QNX__) +-# define LZO_OS_QNX 1 +-# define LZO_INFO_OS "qnx" +-#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) +-# define LZO_OS_DOS32 1 +-# define LZO_INFO_OS "dos32" +-#elif defined(__BORLANDC__) && defined(__DPMI16__) +-# define LZO_OS_DOS16 1 +-# define LZO_INFO_OS "dos16" +-#elif defined(__ZTC__) && defined(DOS386) +-# define LZO_OS_DOS32 1 +-# define LZO_INFO_OS "dos32" +-#elif defined(__OS2__) || defined(__OS2V2__) +-# if (UINT_MAX == LZO_0xffffL) +-# define LZO_OS_OS216 1 +-# define LZO_INFO_OS "os216" +-# elif (UINT_MAX == LZO_0xffffffffL) +-# define LZO_OS_OS2 1 +-# define LZO_INFO_OS "os2" +-# else +-# error "check your limits.h header" +-# endif +-#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) +-# define LZO_OS_WIN64 1 +-# define LZO_INFO_OS "win64" +-#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) +-# define LZO_OS_WIN32 1 +-# define LZO_INFO_OS "win32" +-#elif defined(__MWERKS__) && defined(__INTEL__) +-# define LZO_OS_WIN32 1 +-# define LZO_INFO_OS "win32" +-#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +-# if (UINT_MAX == LZO_0xffffL) +-# define LZO_OS_WIN16 1 +-# define LZO_INFO_OS "win16" +-# elif (UINT_MAX == LZO_0xffffffffL) +-# define LZO_OS_WIN32 1 +-# define LZO_INFO_OS "win32" +-# else +-# error "check your limits.h header" +-# endif +-#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) +-# if (UINT_MAX == LZO_0xffffL) +-# define LZO_OS_DOS16 1 +-# define LZO_INFO_OS "dos16" +-# elif (UINT_MAX == LZO_0xffffffffL) +-# define LZO_OS_DOS32 1 +-# define LZO_INFO_OS "dos32" +-# else +-# error "check your limits.h header" +-# endif +-#elif defined(__WATCOMC__) +-# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) +-# define LZO_OS_DOS16 1 +-# define LZO_INFO_OS "dos16" +-# elif defined(__NT__) && (__WATCOMC__ < 1100) +-# define LZO_OS_WIN32 1 +-# define LZO_INFO_OS "win32" +-# elif defined(__linux__) || defined(__LINUX__) +-# define LZO_OS_POSIX 1 +-# define LZO_INFO_OS "posix" +-# else +-# error "please specify a target using the -bt compiler option" +-# endif +-#elif defined(__palmos__) +-# define LZO_OS_PALMOS 1 +-# define LZO_INFO_OS "palmos" +-#elif defined(__TOS__) || defined(__atarist__) +-# define LZO_OS_TOS 1 +-# define LZO_INFO_OS "tos" +-#elif defined(macintosh) && !defined(__ppc__) +-# define LZO_OS_MACCLASSIC 1 +-# define LZO_INFO_OS "macclassic" +-#elif defined(__VMS) +-# define LZO_OS_VMS 1 +-# define LZO_INFO_OS "vms" +-#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +-# define LZO_OS_CONSOLE 1 +-# define LZO_OS_CONSOLE_PS2 1 +-# define LZO_INFO_OS "console" +-# define LZO_INFO_OS_CONSOLE "ps2" +-#elif (defined(__mips__) && defined(__psp__)) +-# define LZO_OS_CONSOLE 1 +-# define LZO_OS_CONSOLE_PSP 1 +-# define LZO_INFO_OS "console" +-# define LZO_INFO_OS_CONSOLE "psp" +-#else +-# define LZO_OS_POSIX 1 +-# define LZO_INFO_OS "posix" +-#endif +-#if (LZO_OS_POSIX) +-# if defined(_AIX) || defined(__AIX__) || defined(__aix__) +-# define LZO_OS_POSIX_AIX 1 +-# define LZO_INFO_OS_POSIX "aix" +-# elif defined(__FreeBSD__) +-# define LZO_OS_POSIX_FREEBSD 1 +-# define LZO_INFO_OS_POSIX "freebsd" +-# elif defined(__hpux__) || defined(__hpux) +-# define LZO_OS_POSIX_HPUX 1 +-# define LZO_INFO_OS_POSIX "hpux" +-# elif defined(__INTERIX) +-# define LZO_OS_POSIX_INTERIX 1 +-# define LZO_INFO_OS_POSIX "interix" +-# elif defined(__IRIX__) || defined(__irix__) +-# define LZO_OS_POSIX_IRIX 1 +-# define LZO_INFO_OS_POSIX "irix" +-# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) +-# define LZO_OS_POSIX_LINUX 1 +-# define LZO_INFO_OS_POSIX "linux" +-# elif defined(__APPLE__) || defined(__MACOS__) +-# define LZO_OS_POSIX_MACOSX 1 +-# define LZO_INFO_OS_POSIX "macosx" +-# elif defined(__minix__) || defined(__minix) +-# define LZO_OS_POSIX_MINIX 1 +-# define LZO_INFO_OS_POSIX "minix" +-# elif defined(__NetBSD__) +-# define LZO_OS_POSIX_NETBSD 1 +-# define LZO_INFO_OS_POSIX "netbsd" +-# elif defined(__OpenBSD__) +-# define LZO_OS_POSIX_OPENBSD 1 +-# define LZO_INFO_OS_POSIX "openbsd" +-# elif defined(__osf__) +-# define LZO_OS_POSIX_OSF 1 +-# define LZO_INFO_OS_POSIX "osf" +-# elif defined(__solaris__) || defined(__sun) +-# if defined(__SVR4) || defined(__svr4__) +-# define LZO_OS_POSIX_SOLARIS 1 +-# define LZO_INFO_OS_POSIX "solaris" +-# else +-# define LZO_OS_POSIX_SUNOS 1 +-# define LZO_INFO_OS_POSIX "sunos" +-# endif +-# elif defined(__ultrix__) || defined(__ultrix) +-# define LZO_OS_POSIX_ULTRIX 1 +-# define LZO_INFO_OS_POSIX "ultrix" +-# elif defined(_UNICOS) +-# define LZO_OS_POSIX_UNICOS 1 +-# define LZO_INFO_OS_POSIX "unicos" +-# else +-# define LZO_OS_POSIX_UNKNOWN 1 +-# define LZO_INFO_OS_POSIX "unknown" +-# endif +-#endif +-#endif +-#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +-# if (UINT_MAX != LZO_0xffffL) +-# error "this should not happen" +-# endif +-# if (ULONG_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-#endif +-#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) +-# if (UINT_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-# if (ULONG_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-#endif +-#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) +-# define LZO_CC_CILLY 1 +-# define LZO_INFO_CC "Cilly" +-# if defined(__CILLY__) +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) +-# else +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) +-# define LZO_CC_SDCC 1 +-# define LZO_INFO_CC "sdcc" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) +-#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) +-# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) +-# define LZO_INFO_CC "Pathscale C" +-# define LZO_INFO_CCVER __PATHSCALE__ +-#elif defined(__INTEL_COMPILER) +-# define LZO_CC_INTELC 1 +-# define LZO_INFO_CC "Intel C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) +-# if defined(_WIN32) || defined(_WIN64) +-# define LZO_CC_SYNTAX_MSC 1 +-# else +-# define LZO_CC_SYNTAX_GNUC 1 +-# endif +-#elif defined(__POCC__) && defined(_WIN32) +-# define LZO_CC_PELLESC 1 +-# define LZO_INFO_CC "Pelles C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) +-#elif defined(__clang__) && defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) +-# if defined(__GNUC_PATCHLEVEL__) +-# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +-# else +-# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +-# endif +-# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) +-# define LZO_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__) +-# else +-# define LZO_CC_CLANG_CLANG 0x020700L +-# endif +-# define LZO_CC_CLANG LZO_CC_CLANG_GNUC +-# define LZO_INFO_CC "clang" +-# define LZO_INFO_CCVER __VERSION__ +-#elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) +-# if defined(__GNUC_PATCHLEVEL__) +-# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +-# else +-# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +-# endif +-# define LZO_CC_LLVM LZO_CC_LLVM_GNUC +-# define LZO_INFO_CC "llvm-gcc" +-# define LZO_INFO_CCVER __VERSION__ +-#elif defined(__GNUC__) && defined(__VERSION__) +-# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +-# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +-# elif defined(__GNUC_MINOR__) +-# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +-# else +-# define LZO_CC_GNUC (__GNUC__ * 0x10000L) +-# endif +-# define LZO_INFO_CC "gcc" +-# define LZO_INFO_CCVER __VERSION__ +-#elif defined(__ACK__) && defined(_ACK) +-# define LZO_CC_ACK 1 +-# define LZO_INFO_CC "Amsterdam Compiler Kit C" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__AZTEC_C__) +-# define LZO_CC_AZTECC 1 +-# define LZO_INFO_CC "Aztec C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) +-#elif defined(__CODEGEARC__) +-# define LZO_CC_CODEGEARC 1 +-# define LZO_INFO_CC "CodeGear C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) +-#elif defined(__BORLANDC__) +-# define LZO_CC_BORLANDC 1 +-# define LZO_INFO_CC "Borland C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) +-#elif defined(_CRAYC) && defined(_RELEASE) +-# define LZO_CC_CRAYC 1 +-# define LZO_INFO_CC "Cray C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) +-#elif defined(__DMC__) && defined(__SC__) +-# define LZO_CC_DMC 1 +-# define LZO_INFO_CC "Digital Mars C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) +-#elif defined(__DECC) +-# define LZO_CC_DECC 1 +-# define LZO_INFO_CC "DEC C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) +-#elif defined(__HIGHC__) +-# define LZO_CC_HIGHC 1 +-# define LZO_INFO_CC "MetaWare High C" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__IAR_SYSTEMS_ICC__) +-# define LZO_CC_IARC 1 +-# define LZO_INFO_CC "IAR C" +-# if defined(__VER__) +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) +-# else +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif defined(__IBMC__) +-# define LZO_CC_IBMC 1 +-# define LZO_INFO_CC "IBM C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) +-#elif defined(__KEIL__) && defined(__C166__) +-# define LZO_CC_KEILC 1 +-# define LZO_INFO_CC "Keil C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) +-#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) +-# define LZO_CC_LCCWIN32 1 +-# define LZO_INFO_CC "lcc-win32" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__LCC__) +-# define LZO_CC_LCC 1 +-# define LZO_INFO_CC "lcc" +-# if defined(__LCC_VERSION__) +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) +-# else +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif defined(_MSC_VER) +-# define LZO_CC_MSC 1 +-# define LZO_INFO_CC "Microsoft C" +-# if defined(_MSC_FULL_VER) +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) +-# else +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) +-# endif +-#elif defined(__MWERKS__) +-# define LZO_CC_MWERKS 1 +-# define LZO_INFO_CC "Metrowerks C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) +-#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) +-# define LZO_CC_NDPC 1 +-# define LZO_INFO_CC "Microway NDP C" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__PACIFIC__) +-# define LZO_CC_PACIFICC 1 +-# define LZO_INFO_CC "Pacific C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) +-#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) +-# define LZO_CC_PGI 1 +-# define LZO_INFO_CC "Portland Group PGI C" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__PUREC__) && defined(__TOS__) +-# define LZO_CC_PUREC 1 +-# define LZO_INFO_CC "Pure C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) +-#elif defined(__SC__) && defined(__ZTC__) +-# define LZO_CC_SYMANTECC 1 +-# define LZO_INFO_CC "Symantec C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) +-#elif defined(__SUNPRO_C) +-# define LZO_INFO_CC "SunPro C" +-# if ((__SUNPRO_C)+0 > 0) +-# define LZO_CC_SUNPROC __SUNPRO_C +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) +-# else +-# define LZO_CC_SUNPROC 1 +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif defined(__SUNPRO_CC) +-# define LZO_INFO_CC "SunPro C" +-# if ((__SUNPRO_CC)+0 > 0) +-# define LZO_CC_SUNPROC __SUNPRO_CC +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) +-# else +-# define LZO_CC_SUNPROC 1 +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif defined(__TINYC__) +-# define LZO_CC_TINYC 1 +-# define LZO_INFO_CC "Tiny C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) +-#elif defined(__TSC__) +-# define LZO_CC_TOPSPEEDC 1 +-# define LZO_INFO_CC "TopSpeed C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) +-#elif defined(__WATCOMC__) +-# define LZO_CC_WATCOMC 1 +-# define LZO_INFO_CC "Watcom C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) +-#elif defined(__TURBOC__) +-# define LZO_CC_TURBOC 1 +-# define LZO_INFO_CC "Turbo C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) +-#elif defined(__ZTC__) +-# define LZO_CC_ZORTECHC 1 +-# define LZO_INFO_CC "Zortech C" +-# if (__ZTC__ == 0x310) +-# define LZO_INFO_CCVER "0x310" +-# else +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) +-# endif +-#else +-# define LZO_CC_UNKNOWN 1 +-# define LZO_INFO_CC "unknown" +-# define LZO_INFO_CCVER "unknown" +-#endif +-#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) +-# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" +-#endif +-#if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) +-# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) +-# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) +-# define LZO_ARCH_CRAY_MPP 1 +-# elif defined(_CRAY1) +-# define LZO_ARCH_CRAY_PVP 1 +-# endif +-# endif +-#endif +-#if !defined(__LZO_ARCH_OVERRIDE) +-#if (LZO_ARCH_GENERIC) +-# define LZO_INFO_ARCH "generic" +-#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +-# define LZO_ARCH_I086 1 +-# define LZO_ARCH_IA16 1 +-# define LZO_INFO_ARCH "i086" +-#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) +-# define LZO_ARCH_ALPHA 1 +-# define LZO_INFO_ARCH "alpha" +-#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) +-# define LZO_ARCH_ALPHA 1 +-# define LZO_INFO_ARCH "alpha" +-#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) +-# define LZO_ARCH_AMD64 1 +-# define LZO_INFO_ARCH "amd64" +-#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +-# define LZO_ARCH_ARM 1 +-# define LZO_ARCH_ARM_THUMB 1 +-# define LZO_INFO_ARCH "arm_thumb" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) +-# define LZO_ARCH_ARM 1 +-# if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1) +-# define LZO_ARCH_ARM_THUMB 1 +-# define LZO_INFO_ARCH "arm_thumb" +-# elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2) +-# define LZO_INFO_ARCH "arm" +-# else +-# define LZO_INFO_ARCH "arm" +-# endif +-#elif defined(__arm__) || defined(_M_ARM) +-# define LZO_ARCH_ARM 1 +-# define LZO_INFO_ARCH "arm" +-#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) +-# define LZO_ARCH_AVR 1 +-# define LZO_INFO_ARCH "avr" +-#elif defined(__avr32__) || defined(__AVR32__) +-# define LZO_ARCH_AVR32 1 +-# define LZO_INFO_ARCH "avr32" +-#elif defined(__bfin__) +-# define LZO_ARCH_BLACKFIN 1 +-# define LZO_INFO_ARCH "blackfin" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) +-# define LZO_ARCH_C166 1 +-# define LZO_INFO_ARCH "c166" +-#elif defined(__cris__) +-# define LZO_ARCH_CRIS 1 +-# define LZO_INFO_ARCH "cris" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) +-# define LZO_ARCH_EZ80 1 +-# define LZO_INFO_ARCH "ez80" +-#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +-# define LZO_ARCH_H8300 1 +-# define LZO_INFO_ARCH "h8300" +-#elif defined(__hppa__) || defined(__hppa) +-# define LZO_ARCH_HPPA 1 +-# define LZO_INFO_ARCH "hppa" +-#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) +-# define LZO_ARCH_I386 1 +-# define LZO_ARCH_IA32 1 +-# define LZO_INFO_ARCH "i386" +-#elif (LZO_CC_ZORTECHC && defined(__I86__)) +-# define LZO_ARCH_I386 1 +-# define LZO_ARCH_IA32 1 +-# define LZO_INFO_ARCH "i386" +-#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) +-# define LZO_ARCH_I386 1 +-# define LZO_ARCH_IA32 1 +-# define LZO_INFO_ARCH "i386" +-#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) +-# define LZO_ARCH_IA64 1 +-# define LZO_INFO_ARCH "ia64" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) +-# define LZO_ARCH_M16C 1 +-# define LZO_INFO_ARCH "m16c" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) +-# define LZO_ARCH_M16C 1 +-# define LZO_INFO_ARCH "m16c" +-#elif defined(__m32r__) +-# define LZO_ARCH_M32R 1 +-# define LZO_INFO_ARCH "m32r" +-#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) +-# define LZO_ARCH_M68K 1 +-# define LZO_INFO_ARCH "m68k" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) +-# define LZO_ARCH_MCS251 1 +-# define LZO_INFO_ARCH "mcs251" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) +-# define LZO_ARCH_MCS51 1 +-# define LZO_INFO_ARCH "mcs51" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) +-# define LZO_ARCH_MCS51 1 +-# define LZO_INFO_ARCH "mcs51" +-#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) +-# define LZO_ARCH_MIPS 1 +-# define LZO_INFO_ARCH "mips" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) +-# define LZO_ARCH_MSP430 1 +-# define LZO_INFO_ARCH "msp430" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) +-# define LZO_ARCH_MSP430 1 +-# define LZO_INFO_ARCH "msp430" +-#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) +-# define LZO_ARCH_POWERPC 1 +-# define LZO_INFO_ARCH "powerpc" +-#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) +-# define LZO_ARCH_S390 1 +-# define LZO_INFO_ARCH "s390" +-#elif defined(__sh__) || defined(_M_SH) +-# define LZO_ARCH_SH 1 +-# define LZO_INFO_ARCH "sh" +-#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) +-# define LZO_ARCH_SPARC 1 +-# define LZO_INFO_ARCH "sparc" +-#elif defined(__SPU__) +-# define LZO_ARCH_SPU 1 +-# define LZO_INFO_ARCH "spu" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) +-# define LZO_ARCH_Z80 1 +-# define LZO_INFO_ARCH "z80" +-#elif (LZO_ARCH_CRAY_PVP) +-# if defined(_CRAYSV1) +-# define LZO_ARCH_CRAY_SV1 1 +-# define LZO_INFO_ARCH "cray_sv1" +-# elif (_ADDR64) +-# define LZO_ARCH_CRAY_T90 1 +-# define LZO_INFO_ARCH "cray_t90" +-# elif (_ADDR32) +-# define LZO_ARCH_CRAY_YMP 1 +-# define LZO_INFO_ARCH "cray_ymp" +-# else +-# define LZO_ARCH_CRAY_XMP 1 +-# define LZO_INFO_ARCH "cray_xmp" +-# endif +-#else +-# define LZO_ARCH_UNKNOWN 1 +-# define LZO_INFO_ARCH "unknown" +-#endif +-#endif +-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) +-# error "FIXME - missing define for CPU architecture" +-#endif +-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) +-# error "FIXME - missing WIN32 define for CPU architecture" +-#endif +-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) +-# error "FIXME - missing WIN64 define for CPU architecture" +-#endif +-#if (LZO_OS_OS216 || LZO_OS_WIN16) +-# define LZO_ARCH_I086PM 1 +-# define LZO_ARCH_IA16PM 1 +-#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) +-# define LZO_ARCH_I086PM 1 +-# define LZO_ARCH_IA16PM 1 +-#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) +-# define LZO_ARCH_I086PM 1 +-# define LZO_ARCH_IA16PM 1 +-#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) +-# define LZO_ARCH_I086PM 1 +-# define LZO_ARCH_IA16PM 1 +-#endif +-#if (LZO_ARCH_ARM_THUMB) && !(LZO_ARCH_ARM) +-# error "this should not happen" +-#endif +-#if (LZO_ARCH_I086PM) && !(LZO_ARCH_I086) +-# error "this should not happen" +-#endif +-#if (LZO_ARCH_I086) +-# if (UINT_MAX != LZO_0xffffL) +-# error "this should not happen" +-# endif +-# if (ULONG_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-#endif +-#if (LZO_ARCH_I386) +-# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) +-# error "this should not happen" +-# endif +-# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) +-# error "this should not happen" +-# endif +-# if (ULONG_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-#endif +-#if !defined(__LZO_MM_OVERRIDE) +-#if (LZO_ARCH_I086) +-#if (UINT_MAX != LZO_0xffffL) +-# error "this should not happen" +-#endif +-#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) +-# define LZO_MM_TINY 1 +-#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) +-# define LZO_MM_HUGE 1 +-#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) +-# define LZO_MM_SMALL 1 +-#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) +-# define LZO_MM_MEDIUM 1 +-#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) +-# define LZO_MM_COMPACT 1 +-#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) +-# define LZO_MM_LARGE 1 +-#elif (LZO_CC_AZTECC) +-# if defined(_LARGE_CODE) && defined(_LARGE_DATA) +-# define LZO_MM_LARGE 1 +-# elif defined(_LARGE_CODE) +-# define LZO_MM_MEDIUM 1 +-# elif defined(_LARGE_DATA) +-# define LZO_MM_COMPACT 1 +-# else +-# define LZO_MM_SMALL 1 +-# endif +-#elif (LZO_CC_ZORTECHC && defined(__VCM__)) +-# define LZO_MM_LARGE 1 +-#else +-# error "unknown memory model" +-#endif +-#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +-#define LZO_HAVE_MM_HUGE_PTR 1 +-#define LZO_HAVE_MM_HUGE_ARRAY 1 +-#if (LZO_MM_TINY) +-# undef LZO_HAVE_MM_HUGE_ARRAY +-#endif +-#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) +-# undef LZO_HAVE_MM_HUGE_PTR +-# undef LZO_HAVE_MM_HUGE_ARRAY +-#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +-# undef LZO_HAVE_MM_HUGE_ARRAY +-#elif (LZO_CC_MSC && defined(_QC)) +-# undef LZO_HAVE_MM_HUGE_ARRAY +-# if (_MSC_VER < 600) +-# undef LZO_HAVE_MM_HUGE_PTR +-# endif +-#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) +-# undef LZO_HAVE_MM_HUGE_ARRAY +-#endif +-#if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR) +-# if (LZO_OS_DOS16) +-# error "this should not happen" +-# elif (LZO_CC_ZORTECHC) +-# else +-# error "this should not happen" +-# endif +-#endif +-#ifdef __cplusplus +-extern "C" { +-#endif +-#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) +- extern void __near __cdecl _AHSHIFT(void); +-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +-#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +- extern void __near __cdecl _AHSHIFT(void); +-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +-#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) +- extern void __near __cdecl _AHSHIFT(void); +-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +-#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) +- extern void __near __cdecl _AHSHIFT(void); +-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +-#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) +-# define LZO_MM_AHSHIFT 12 +-#elif (LZO_CC_WATCOMC) +- extern unsigned char _HShift; +-# define LZO_MM_AHSHIFT ((unsigned) _HShift) +-#else +-# error "FIXME - implement LZO_MM_AHSHIFT" +-#endif +-#ifdef __cplusplus +-} +-#endif +-#endif +-#elif (LZO_ARCH_C166) +-#if !defined(__MODEL__) +-# error "FIXME - C166 __MODEL__" +-#elif ((__MODEL__) == 0) +-# define LZO_MM_SMALL 1 +-#elif ((__MODEL__) == 1) +-# define LZO_MM_SMALL 1 +-#elif ((__MODEL__) == 2) +-# define LZO_MM_LARGE 1 +-#elif ((__MODEL__) == 3) +-# define LZO_MM_TINY 1 +-#elif ((__MODEL__) == 4) +-# define LZO_MM_XTINY 1 +-#elif ((__MODEL__) == 5) +-# define LZO_MM_XSMALL 1 +-#else +-# error "FIXME - C166 __MODEL__" +-#endif +-#elif (LZO_ARCH_MCS251) +-#if !defined(__MODEL__) +-# error "FIXME - MCS251 __MODEL__" +-#elif ((__MODEL__) == 0) +-# define LZO_MM_SMALL 1 +-#elif ((__MODEL__) == 2) +-# define LZO_MM_LARGE 1 +-#elif ((__MODEL__) == 3) +-# define LZO_MM_TINY 1 +-#elif ((__MODEL__) == 4) +-# define LZO_MM_XTINY 1 +-#elif ((__MODEL__) == 5) +-# define LZO_MM_XSMALL 1 +-#else +-# error "FIXME - MCS251 __MODEL__" +-#endif +-#elif (LZO_ARCH_MCS51) +-#if !defined(__MODEL__) +-# error "FIXME - MCS51 __MODEL__" +-#elif ((__MODEL__) == 1) +-# define LZO_MM_SMALL 1 +-#elif ((__MODEL__) == 2) +-# define LZO_MM_LARGE 1 +-#elif ((__MODEL__) == 3) +-# define LZO_MM_TINY 1 +-#elif ((__MODEL__) == 4) +-# define LZO_MM_XTINY 1 +-#elif ((__MODEL__) == 5) +-# define LZO_MM_XSMALL 1 +-#else +-# error "FIXME - MCS51 __MODEL__" +-#endif +-#elif (LZO_ARCH_CRAY_PVP) +-# define LZO_MM_PVP 1 +-#else +-# define LZO_MM_FLAT 1 +-#endif +-#if (LZO_MM_COMPACT) +-# define LZO_INFO_MM "compact" +-#elif (LZO_MM_FLAT) +-# define LZO_INFO_MM "flat" +-#elif (LZO_MM_HUGE) +-# define LZO_INFO_MM "huge" +-#elif (LZO_MM_LARGE) +-# define LZO_INFO_MM "large" +-#elif (LZO_MM_MEDIUM) +-# define LZO_INFO_MM "medium" +-#elif (LZO_MM_PVP) +-# define LZO_INFO_MM "pvp" +-#elif (LZO_MM_SMALL) +-# define LZO_INFO_MM "small" +-#elif (LZO_MM_TINY) +-# define LZO_INFO_MM "tiny" +-#else +-# error "unknown memory model" +-#endif +-#endif +-#if defined(SIZEOF_SHORT) +-# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) +-#endif +-#if defined(SIZEOF_INT) +-# define LZO_SIZEOF_INT (SIZEOF_INT) +-#endif +-#if defined(SIZEOF_LONG) +-# define LZO_SIZEOF_LONG (SIZEOF_LONG) +-#endif +-#if defined(SIZEOF_LONG_LONG) +-# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) +-#endif +-#if defined(SIZEOF___INT16) +-# define LZO_SIZEOF___INT16 (SIZEOF___INT16) +-#endif +-#if defined(SIZEOF___INT32) +-# define LZO_SIZEOF___INT32 (SIZEOF___INT32) +-#endif +-#if defined(SIZEOF___INT64) +-# define LZO_SIZEOF___INT64 (SIZEOF___INT64) +-#endif +-#if defined(SIZEOF_VOID_P) +-# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) +-#endif +-#if defined(SIZEOF_SIZE_T) +-# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) +-#endif +-#if defined(SIZEOF_PTRDIFF_T) +-# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) +-#endif +-#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) +-#if !defined(LZO_SIZEOF_SHORT) +-# if (LZO_ARCH_CRAY_PVP) +-# define LZO_SIZEOF_SHORT 8 +-# elif (USHRT_MAX == LZO_0xffffL) +-# define LZO_SIZEOF_SHORT 2 +-# elif (__LZO_LSR(USHRT_MAX,7) == 1) +-# define LZO_SIZEOF_SHORT 1 +-# elif (__LZO_LSR(USHRT_MAX,15) == 1) +-# define LZO_SIZEOF_SHORT 2 +-# elif (__LZO_LSR(USHRT_MAX,31) == 1) +-# define LZO_SIZEOF_SHORT 4 +-# elif (__LZO_LSR(USHRT_MAX,63) == 1) +-# define LZO_SIZEOF_SHORT 8 +-# elif (__LZO_LSR(USHRT_MAX,127) == 1) +-# define LZO_SIZEOF_SHORT 16 +-# else +-# error "LZO_SIZEOF_SHORT" +-# endif +-#endif +-#if !defined(LZO_SIZEOF_INT) +-# if (LZO_ARCH_CRAY_PVP) +-# define LZO_SIZEOF_INT 8 +-# elif (UINT_MAX == LZO_0xffffL) +-# define LZO_SIZEOF_INT 2 +-# elif (UINT_MAX == LZO_0xffffffffL) +-# define LZO_SIZEOF_INT 4 +-# elif (__LZO_LSR(UINT_MAX,7) == 1) +-# define LZO_SIZEOF_INT 1 +-# elif (__LZO_LSR(UINT_MAX,15) == 1) +-# define LZO_SIZEOF_INT 2 +-# elif (__LZO_LSR(UINT_MAX,31) == 1) +-# define LZO_SIZEOF_INT 4 +-# elif (__LZO_LSR(UINT_MAX,63) == 1) +-# define LZO_SIZEOF_INT 8 +-# elif (__LZO_LSR(UINT_MAX,127) == 1) +-# define LZO_SIZEOF_INT 16 +-# else +-# error "LZO_SIZEOF_INT" +-# endif +-#endif +-#if !defined(LZO_SIZEOF_LONG) +-# if (ULONG_MAX == LZO_0xffffffffL) +-# define LZO_SIZEOF_LONG 4 +-# elif (__LZO_LSR(ULONG_MAX,7) == 1) +-# define LZO_SIZEOF_LONG 1 +-# elif (__LZO_LSR(ULONG_MAX,15) == 1) +-# define LZO_SIZEOF_LONG 2 +-# elif (__LZO_LSR(ULONG_MAX,31) == 1) +-# define LZO_SIZEOF_LONG 4 +-# elif (__LZO_LSR(ULONG_MAX,63) == 1) +-# define LZO_SIZEOF_LONG 8 +-# elif (__LZO_LSR(ULONG_MAX,127) == 1) +-# define LZO_SIZEOF_LONG 16 +-# else +-# error "LZO_SIZEOF_LONG" +-# endif +-#endif +-#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +-#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +-# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) +-# if (LZO_CC_GNUC >= 0x030300ul) +-# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) +-# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG +-# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) +-# define LZO_SIZEOF_LONG_LONG 4 +-# endif +-# endif +-# endif +-#endif +-#endif +-#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +-#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +-#if (LZO_ARCH_I086 && LZO_CC_DMC) +-#elif (LZO_CC_CILLY) && defined(__GNUC__) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_OS_WIN64 || defined(_WIN64)) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) +-# define LZO_SIZEOF___INT64 8 +-#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) +-#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +-# define LZO_SIZEOF_LONG_LONG 8 +-#endif +-#endif +-#endif +-#if defined(__cplusplus) && (LZO_CC_GNUC) +-# if (LZO_CC_GNUC < 0x020800ul) +-# undef LZO_SIZEOF_LONG_LONG +-# endif +-#endif +-#if (LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) +-# undef LZO_SIZEOF_LONG_LONG +-#endif +-#if !defined(LZO_SIZEOF_VOID_P) +-#if (LZO_ARCH_I086) +-# define __LZO_WORDSIZE 2 +-# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) +-# define LZO_SIZEOF_VOID_P 2 +-# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) +-# define LZO_SIZEOF_VOID_P 4 +-# else +-# error "LZO_MM" +-# endif +-#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) +-# define __LZO_WORDSIZE 1 +-# define LZO_SIZEOF_VOID_P 2 +-#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) +-# define LZO_SIZEOF_VOID_P 2 +-#elif (LZO_ARCH_H8300) +-# if defined(__NORMAL_MODE__) +-# define __LZO_WORDSIZE 4 +-# define LZO_SIZEOF_VOID_P 2 +-# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +-# define __LZO_WORDSIZE 4 +-# define LZO_SIZEOF_VOID_P 4 +-# else +-# define __LZO_WORDSIZE 2 +-# define LZO_SIZEOF_VOID_P 2 +-# endif +-# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT +-# endif +-#elif (LZO_ARCH_M16C) +-# define __LZO_WORDSIZE 2 +-# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) +-# define LZO_SIZEOF_VOID_P 4 +-# else +-# define LZO_SIZEOF_VOID_P 2 +-# endif +-#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +-# define __LZO_WORDSIZE 8 +-# define LZO_SIZEOF_VOID_P 4 +-#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) +-# define __LZO_WORDSIZE 8 +-# define LZO_SIZEOF_VOID_P 8 +-#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) +-# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +-#elif (LZO_OS_OS400 || defined(__OS400__)) +-# define __LZO_WORDSIZE LZO_SIZEOF_LONG +-# define LZO_SIZEOF_VOID_P 16 +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +-# define LZO_SIZEOF_VOID_P 8 +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +-#elif (LZO_ARCH_SPU) +-# if 0 +-# define __LZO_WORDSIZE 16 +-# endif +-# define LZO_SIZEOF_VOID_P 4 +-#else +-# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +-#endif +-#endif +-#if !defined(LZO_WORDSIZE) +-# if defined(__LZO_WORDSIZE) +-# define LZO_WORDSIZE __LZO_WORDSIZE +-# else +-# define LZO_WORDSIZE LZO_SIZEOF_VOID_P +-# endif +-#endif +-#if !defined(LZO_SIZEOF_SIZE_T) +-#if (LZO_ARCH_I086 || LZO_ARCH_M16C) +-# define LZO_SIZEOF_SIZE_T 2 +-#else +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P +-#endif +-#endif +-#if !defined(LZO_SIZEOF_PTRDIFF_T) +-#if (LZO_ARCH_I086) +-# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P +-# elif (LZO_MM_COMPACT || LZO_MM_LARGE) +-# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) +-# define LZO_SIZEOF_PTRDIFF_T 4 +-# else +-# define LZO_SIZEOF_PTRDIFF_T 2 +-# endif +-# else +-# error "LZO_MM" +-# endif +-#else +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T +-#endif +-#endif +-#if (LZO_ABI_NEUTRAL_ENDIAN) +-# undef LZO_ABI_BIG_ENDIAN +-# undef LZO_ABI_LITTLE_ENDIAN +-#elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN) +-#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) +-# if (__LITTLE_ENDIAN__ == 1) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-# else +-# define LZO_ABI_BIG_ENDIAN 1 +-# endif +-#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#endif +-#endif +-#if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN) +-# error "this should not happen" +-#endif +-#if (LZO_ABI_BIG_ENDIAN) +-# define LZO_INFO_ABI_ENDIAN "be" +-#elif (LZO_ABI_LITTLE_ENDIAN) +-# define LZO_INFO_ABI_ENDIAN "le" +-#elif (LZO_ABI_NEUTRAL_ENDIAN) +-# define LZO_INFO_ABI_ENDIAN "neutral" +-#endif +-#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +-# define LZO_ABI_I8LP16 1 +-# define LZO_INFO_ABI_PM "i8lp16" +-#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +-# define LZO_ABI_ILP16 1 +-# define LZO_INFO_ABI_PM "ilp16" +-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) +-# define LZO_ABI_ILP32 1 +-# define LZO_INFO_ABI_PM "ilp32" +-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) +-# define LZO_ABI_LLP64 1 +-# define LZO_INFO_ABI_PM "llp64" +-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +-# define LZO_ABI_LP64 1 +-# define LZO_INFO_ABI_PM "lp64" +-#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +-# define LZO_ABI_ILP64 1 +-# define LZO_INFO_ABI_PM "ilp64" +-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) +-# define LZO_ABI_IP32L64 1 +-# define LZO_INFO_ABI_PM "ip32l64" +-#endif +-#if !defined(__LZO_LIBC_OVERRIDE) +-#if (LZO_LIBC_NAKED) +-# define LZO_INFO_LIBC "naked" +-#elif (LZO_LIBC_FREESTANDING) +-# define LZO_INFO_LIBC "freestanding" +-#elif (LZO_LIBC_MOSTLY_FREESTANDING) +-# define LZO_INFO_LIBC "mfreestanding" +-#elif (LZO_LIBC_ISOC90) +-# define LZO_INFO_LIBC "isoc90" +-#elif (LZO_LIBC_ISOC99) +-# define LZO_INFO_LIBC "isoc99" +-#elif defined(__dietlibc__) +-# define LZO_LIBC_DIETLIBC 1 +-# define LZO_INFO_LIBC "dietlibc" +-#elif defined(_NEWLIB_VERSION) +-# define LZO_LIBC_NEWLIB 1 +-# define LZO_INFO_LIBC "newlib" +-#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) +-# if defined(__UCLIBC_SUBLEVEL__) +-# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) +-# else +-# define LZO_LIBC_UCLIBC 0x00090bL +-# endif +-# define LZO_INFO_LIBC "uclibc" +-#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) +-# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) +-# define LZO_INFO_LIBC "glibc" +-#elif (LZO_CC_MWERKS) && defined(__MSL__) +-# define LZO_LIBC_MSL __MSL__ +-# define LZO_INFO_LIBC "msl" +-#elif 1 && defined(__IAR_SYSTEMS_ICC__) +-# define LZO_LIBC_ISOC90 1 +-# define LZO_INFO_LIBC "isoc90" +-#else +-# define LZO_LIBC_DEFAULT 1 +-# define LZO_INFO_LIBC "default" +-#endif +-#endif +-#if !defined(__lzo_gnuc_extension__) +-#if (LZO_CC_GNUC >= 0x020800ul) +-# define __lzo_gnuc_extension__ __extension__ +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_gnuc_extension__ __extension__ +-#else +-# define __lzo_gnuc_extension__ /*empty*/ +-#endif +-#endif +-#if !defined(__lzo_ua_volatile) +-# define __lzo_ua_volatile volatile +-#endif +-#if !defined(__lzo_alignof) +-#if (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +-# define __lzo_alignof(e) __alignof__(e) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) +-# define __lzo_alignof(e) __alignof__(e) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +-# define __lzo_alignof(e) __alignof(e) +-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) +-# define __lzo_alignof(e) __alignof__(e) +-#endif +-#endif +-#if defined(__lzo_alignof) +-# define __lzo_HAVE_alignof 1 +-#endif +-#if !defined(__lzo_constructor) +-#if (LZO_CC_GNUC >= 0x030400ul) +-# define __lzo_constructor __attribute__((__constructor__,__used__)) +-#elif (LZO_CC_GNUC >= 0x020700ul) +-# define __lzo_constructor __attribute__((__constructor__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_constructor __attribute__((__constructor__)) +-#endif +-#endif +-#if defined(__lzo_constructor) +-# define __lzo_HAVE_constructor 1 +-#endif +-#if !defined(__lzo_destructor) +-#if (LZO_CC_GNUC >= 0x030400ul) +-# define __lzo_destructor __attribute__((__destructor__,__used__)) +-#elif (LZO_CC_GNUC >= 0x020700ul) +-# define __lzo_destructor __attribute__((__destructor__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_destructor __attribute__((__destructor__)) +-#endif +-#endif +-#if defined(__lzo_destructor) +-# define __lzo_HAVE_destructor 1 +-#endif +-#if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor) +-# error "this should not happen" +-#endif +-#if !defined(__lzo_inline) +-#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) +-#elif defined(__cplusplus) +-# define __lzo_inline inline +-#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) +-# define __lzo_inline __inline +-#elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +-# define __lzo_inline __inline__ +-#elif (LZO_CC_DMC) +-# define __lzo_inline __inline +-#elif (LZO_CC_INTELC) +-# define __lzo_inline __inline +-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) +-# define __lzo_inline __inline +-#elif (LZO_CC_MSC && (_MSC_VER >= 900)) +-# define __lzo_inline __inline +-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) +-# define __lzo_inline __inline__ +-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +-# define __lzo_inline inline +-#endif +-#endif +-#if defined(__lzo_inline) +-# define __lzo_HAVE_inline 1 +-#else +-# define __lzo_inline /*empty*/ +-#endif +-#if !defined(__lzo_forceinline) +-#if (LZO_CC_GNUC >= 0x030200ul) +-# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) +-# define __lzo_forceinline __forceinline +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +-# define __lzo_forceinline __forceinline +-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) +-# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +-#endif +-#endif +-#if defined(__lzo_forceinline) +-# define __lzo_HAVE_forceinline 1 +-#else +-# define __lzo_forceinline /*empty*/ +-#endif +-#if !defined(__lzo_noinline) +-#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) +-# define __lzo_noinline __attribute__((__noinline__,__used__)) +-#elif (LZO_CC_GNUC >= 0x030200ul) +-# define __lzo_noinline __attribute__((__noinline__)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC) +-# define __lzo_noinline __declspec(noinline) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_noinline __attribute__((__noinline__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_noinline __attribute__((__noinline__)) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +-# define __lzo_noinline __declspec(noinline) +-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +-# if defined(__cplusplus) +-# else +-# define __lzo_noinline __declspec(noinline) +-# endif +-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) +-# define __lzo_noinline __attribute__((__noinline__)) +-#endif +-#endif +-#if defined(__lzo_noinline) +-# define __lzo_HAVE_noinline 1 +-#else +-# define __lzo_noinline /*empty*/ +-#endif +-#if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline) +-# error "this should not happen" +-#endif +-#if !defined(__lzo_noreturn) +-#if (LZO_CC_GNUC >= 0x020700ul) +-# define __lzo_noreturn __attribute__((__noreturn__)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) +-# define __lzo_noreturn __declspec(noreturn) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_noreturn __attribute__((__noreturn__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_noreturn __attribute__((__noreturn__)) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +-# define __lzo_noreturn __declspec(noreturn) +-#endif +-#endif +-#if defined(__lzo_noreturn) +-# define __lzo_HAVE_noreturn 1 +-#else +-# define __lzo_noreturn /*empty*/ +-#endif +-#if !defined(__lzo_nothrow) +-#if (LZO_CC_GNUC >= 0x030300ul) +-# define __lzo_nothrow __attribute__((__nothrow__)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus) +-# define __lzo_nothrow __declspec(nothrow) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 900) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_nothrow __attribute__((__nothrow__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_nothrow __attribute__((__nothrow__)) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) +-# define __lzo_nothrow __declspec(nothrow) +-#endif +-#endif +-#if defined(__lzo_nothrow) +-# define __lzo_HAVE_nothrow 1 +-#else +-# define __lzo_nothrow /*empty*/ +-#endif +-#if !defined(__lzo_restrict) +-#if (LZO_CC_GNUC >= 0x030400ul) +-# define __lzo_restrict __restrict__ +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_restrict __restrict__ +-#elif (LZO_CC_CLANG || LZO_CC_LLVM) +-# define __lzo_restrict __restrict__ +-#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) +-# define __lzo_restrict __restrict +-#endif +-#endif +-#if defined(__lzo_restrict) +-# define __lzo_HAVE_restrict 1 +-#else +-# define __lzo_restrict /*empty*/ +-#endif +-#if !defined(__lzo_likely) && !defined(__lzo_unlikely) +-#if (LZO_CC_GNUC >= 0x030200ul) +-# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +-# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +-#endif +-#endif +-#if defined(__lzo_likely) +-# define __lzo_HAVE_likely 1 +-#else +-# define __lzo_likely(e) (e) +-#endif +-#if defined(__lzo_unlikely) +-# define __lzo_HAVE_unlikely 1 +-#else +-# define __lzo_unlikely(e) (e) +-#endif +-#if !defined(LZO_UNUSED) +-# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +-# define LZO_UNUSED(var) ((void) &var) +-# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) +-# define LZO_UNUSED(var) if (&var) ; else +-# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define LZO_UNUSED(var) ((void) var) +-# elif (LZO_CC_MSC && (_MSC_VER < 900)) +-# define LZO_UNUSED(var) if (&var) ; else +-# elif (LZO_CC_KEILC) +-# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} +-# elif (LZO_CC_PACIFICC) +-# define LZO_UNUSED(var) ((void) sizeof(var)) +-# elif (LZO_CC_WATCOMC) && defined(__cplusplus) +-# define LZO_UNUSED(var) ((void) var) +-# else +-# define LZO_UNUSED(var) ((void) &var) +-# endif +-#endif +-#if !defined(LZO_UNUSED_FUNC) +-# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +-# define LZO_UNUSED_FUNC(func) ((void) func) +-# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) +-# define LZO_UNUSED_FUNC(func) if (func) ; else +-# elif (LZO_CC_CLANG || LZO_CC_LLVM) +-# define LZO_UNUSED_FUNC(func) ((void) &func) +-# elif (LZO_CC_MSC && (_MSC_VER < 900)) +-# define LZO_UNUSED_FUNC(func) if (func) ; else +-# elif (LZO_CC_MSC) +-# define LZO_UNUSED_FUNC(func) ((void) &func) +-# elif (LZO_CC_KEILC || LZO_CC_PELLESC) +-# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} +-# else +-# define LZO_UNUSED_FUNC(func) ((void) func) +-# endif +-#endif +-#if !defined(LZO_UNUSED_LABEL) +-# if (LZO_CC_WATCOMC) && defined(__cplusplus) +-# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +-# elif (LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC) +-# define LZO_UNUSED_LABEL(l) if (0) goto l +-# else +-# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +-# endif +-#endif +-#if !defined(LZO_DEFINE_UNINITIALIZED_VAR) +-# if 0 +-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var +-# elif 0 && (LZO_CC_GNUC) +-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var +-# else +-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init +-# endif +-#endif +-#if !defined(LZO_UNCONST_CAST) +-# if 0 && defined(__cplusplus) +-# define LZO_UNCONST_CAST(t,e) (const_cast (e)) +-# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((lzo_uintptr_t) ((const void *) (e)))))) +-# else +-# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((const void *) (e))))) +-# endif +-#endif +-#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) +-# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) +-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +-# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; +-# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +-# else +-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; +-# endif +-#endif +-#if !defined(LZO_COMPILE_TIME_ASSERT) +-# if (LZO_CC_AZTECC) +-# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} +-# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +-# elif (LZO_CC_MSC && (_MSC_VER < 900)) +-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +-# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +-# else +-# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} +-# endif +-#endif +-#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) +-# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) +-# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +-# define __lzo_cdecl __cdecl +-# define __lzo_cdecl_atexit /*empty*/ +-# define __lzo_cdecl_main __cdecl +-# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +-# define __lzo_cdecl_qsort __pascal +-# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +-# define __lzo_cdecl_qsort _stdcall +-# else +-# define __lzo_cdecl_qsort __cdecl +-# endif +-# elif (LZO_CC_WATCOMC) +-# define __lzo_cdecl __cdecl +-# else +-# define __lzo_cdecl __cdecl +-# define __lzo_cdecl_atexit __cdecl +-# define __lzo_cdecl_main __cdecl +-# define __lzo_cdecl_qsort __cdecl +-# endif +-# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) +-# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +-# define __lzo_cdecl_sighandler __pascal +-# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +-# define __lzo_cdecl_sighandler _stdcall +-# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) +-# define __lzo_cdecl_sighandler __clrcall +-# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) +-# if defined(_DLL) +-# define __lzo_cdecl_sighandler _far _cdecl _loadds +-# elif defined(_MT) +-# define __lzo_cdecl_sighandler _far _cdecl +-# else +-# define __lzo_cdecl_sighandler _cdecl +-# endif +-# else +-# define __lzo_cdecl_sighandler __cdecl +-# endif +-#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) +-# define __lzo_cdecl __cdecl +-#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) +-# define __lzo_cdecl cdecl +-#endif +-#if !defined(__lzo_cdecl) +-# define __lzo_cdecl /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_atexit) +-# define __lzo_cdecl_atexit /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_main) +-# define __lzo_cdecl_main /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_qsort) +-# define __lzo_cdecl_qsort /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_sighandler) +-# define __lzo_cdecl_sighandler /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_va) +-# define __lzo_cdecl_va __lzo_cdecl +-#endif +-#if !(LZO_CFG_NO_WINDOWS_H) +-#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) +-# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) +-# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +-# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) +-# else +-# define LZO_HAVE_WINDOWS_H 1 +-# endif +-#endif +-#endif +-#if (LZO_ARCH_ALPHA) +-# define LZO_OPT_AVOID_UINT_INDEX 1 +-# define LZO_OPT_AVOID_SHORT 1 +-# define LZO_OPT_AVOID_USHORT 1 +-#elif (LZO_ARCH_AMD64) +-# define LZO_OPT_AVOID_INT_INDEX 1 +-# define LZO_OPT_AVOID_UINT_INDEX 1 +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-# define LZO_OPT_UNALIGNED64 1 +-#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) +-#elif (LZO_ARCH_ARM) +-# define LZO_OPT_AVOID_SHORT 1 +-# define LZO_OPT_AVOID_USHORT 1 +-#elif (LZO_ARCH_CRIS) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-#elif (LZO_ARCH_I386) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-#elif (LZO_ARCH_IA64) +-# define LZO_OPT_AVOID_INT_INDEX 1 +-# define LZO_OPT_AVOID_UINT_INDEX 1 +-# define LZO_OPT_PREFER_POSTINC 1 +-#elif (LZO_ARCH_M68K) +-# define LZO_OPT_PREFER_POSTINC 1 +-# define LZO_OPT_PREFER_PREDEC 1 +-# if defined(__mc68020__) && !defined(__mcoldfire__) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-# endif +-#elif (LZO_ARCH_MIPS) +-# define LZO_OPT_AVOID_UINT_INDEX 1 +-#elif (LZO_ARCH_POWERPC) +-# define LZO_OPT_PREFER_PREINC 1 +-# define LZO_OPT_PREFER_PREDEC 1 +-# if (LZO_ABI_BIG_ENDIAN) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-# endif +-#elif (LZO_ARCH_S390) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-# if (LZO_SIZEOF_SIZE_T == 8) +-# define LZO_OPT_UNALIGNED64 1 +-# endif +-#elif (LZO_ARCH_SH) +-# define LZO_OPT_PREFER_POSTINC 1 +-# define LZO_OPT_PREFER_PREDEC 1 +-#endif +-#ifndef LZO_CFG_NO_INLINE_ASM +-#if (LZO_CC_LLVM) +-# define LZO_CFG_NO_INLINE_ASM 1 +-#endif +-#endif +-#ifndef LZO_CFG_NO_UNALIGNED +-#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) +-# define LZO_CFG_NO_UNALIGNED 1 +-#endif +-#endif +-#if (LZO_CFG_NO_UNALIGNED) +-# undef LZO_OPT_UNALIGNED16 +-# undef LZO_OPT_UNALIGNED32 +-# undef LZO_OPT_UNALIGNED64 +-#endif +-#if (LZO_CFG_NO_INLINE_ASM) +-#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +-# define LZO_ASM_SYNTAX_MSC 1 +-#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +-#elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul)) +-#elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +-# define LZO_ASM_SYNTAX_GNUC 1 +-#elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +-# define LZO_ASM_SYNTAX_GNUC 1 +-#endif +-#if (LZO_ASM_SYNTAX_GNUC) +-#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) +-# define __LZO_ASM_CLOBBER "ax" +-#elif (LZO_CC_INTELC) +-# define __LZO_ASM_CLOBBER "memory" +-#else +-# define __LZO_ASM_CLOBBER "cc", "memory" +-#endif +-#endif +-#if defined(__LZO_INFOSTR_MM) +-#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) +-# define __LZO_INFOSTR_MM "" +-#elif defined(LZO_INFO_MM) +-# define __LZO_INFOSTR_MM "." LZO_INFO_MM +-#else +-# define __LZO_INFOSTR_MM "" +-#endif +-#if defined(__LZO_INFOSTR_PM) +-#elif defined(LZO_INFO_ABI_PM) +-# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM +-#else +-# define __LZO_INFOSTR_PM "" +-#endif +-#if defined(__LZO_INFOSTR_ENDIAN) +-#elif defined(LZO_INFO_ABI_ENDIAN) +-# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN +-#else +-# define __LZO_INFOSTR_ENDIAN "" +-#endif +-#if defined(__LZO_INFOSTR_OSNAME) +-#elif defined(LZO_INFO_OS_CONSOLE) +-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE +-#elif defined(LZO_INFO_OS_POSIX) +-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX +-#else +-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS +-#endif +-#if defined(__LZO_INFOSTR_LIBC) +-#elif defined(LZO_INFO_LIBC) +-# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC +-#else +-# define __LZO_INFOSTR_LIBC "" +-#endif +-#if defined(__LZO_INFOSTR_CCVER) +-#elif defined(LZO_INFO_CCVER) +-# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER +-#else +-# define __LZO_INFOSTR_CCVER "" +-#endif +-#define LZO_INFO_STRING \ +- LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ +- " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER +- +-#endif /* already included */ +- +-/* vim:set ts=4 et: */ +diff --git a/remmina-plugins/vnc/libvncserver/common/minilzo.c b/remmina-plugins/vnc/libvncserver/common/minilzo.c +deleted file mode 100644 +index 6ae8d73..0000000 +--- a/remmina-plugins/vnc/libvncserver/common/minilzo.c ++++ /dev/null +@@ -1,4192 +0,0 @@ +-/* minilzo.c -- mini subset of the LZO real-time data compression library +- +- This file is part of the LZO real-time data compression library. +- +- Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer +- All Rights Reserved. +- +- The LZO library is free software; you can redistribute it and/or +- modify it under the terms of the GNU General Public License as +- published by the Free Software Foundation; either version 2 of +- the License, or (at your option) any later version. +- +- The LZO library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with the LZO library; see the file COPYING. +- If not, write to the Free Software Foundation, Inc., +- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +- +- Markus F.X.J. Oberhumer +- +- http://www.oberhumer.com/opensource/lzo/ +- */ +- +-/* +- * NOTE: +- * the full LZO package can be found at +- * http://www.oberhumer.com/opensource/lzo/ +- */ +- +-#define __LZO_IN_MINILZO 1 +- +-#if defined(LZO_CFG_FREESTANDING) +-# undef MINILZO_HAVE_CONFIG_H +-# define LZO_LIBC_FREESTANDING 1 +-# define LZO_OS_FREESTANDING 1 +-#endif +- +-#ifdef MINILZO_HAVE_CONFIG_H +-# include +-#endif +-#include +-#include +-#if defined(MINILZO_CFG_USE_INTERNAL_LZODEFS) +- +-#ifndef __LZODEFS_H_INCLUDED +-#define __LZODEFS_H_INCLUDED 1 +- +-#if defined(__CYGWIN32__) && !defined(__CYGWIN__) +-# define __CYGWIN__ __CYGWIN32__ +-#endif +-#if defined(__IBMCPP__) && !defined(__IBMC__) +-# define __IBMC__ __IBMCPP__ +-#endif +-#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) +-# define __INTEL_COMPILER __ICL +-#endif +-#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) +-# define _ALL_SOURCE 1 +-#endif +-#if defined(__mips__) && defined(__R5900__) +-# if !defined(__LONG_MAX__) +-# define __LONG_MAX__ 9223372036854775807L +-# endif +-#endif +-#if defined(__INTEL_COMPILER) && defined(__linux__) +-# pragma warning(disable: 193) +-#endif +-#if defined(__KEIL__) && defined(__C166__) +-# pragma warning disable = 322 +-#elif 0 && defined(__C251__) +-# pragma warning disable = 322 +-#endif +-#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) +-# if (_MSC_VER >= 1300) +-# pragma warning(disable: 4668) +-# endif +-#endif +-#if 0 && defined(__WATCOMC__) +-# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) +-# pragma warning 203 9 +-# endif +-#endif +-#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) +-# pragma option -h +-#endif +-#if 0 +-#define LZO_0xffffL 0xfffful +-#define LZO_0xffffffffL 0xfffffffful +-#else +-#define LZO_0xffffL 65535ul +-#define LZO_0xffffffffL 4294967295ul +-#endif +-#if (LZO_0xffffL == LZO_0xffffffffL) +-# error "your preprocessor is broken 1" +-#endif +-#if (16ul * 16384ul != 262144ul) +-# error "your preprocessor is broken 2" +-#endif +-#if 0 +-#if (32767 >= 4294967295ul) +-# error "your preprocessor is broken 3" +-#endif +-#if (65535u >= 4294967295ul) +-# error "your preprocessor is broken 4" +-#endif +-#endif +-#if (UINT_MAX == LZO_0xffffL) +-#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) +-# if !defined(MSDOS) +-# define MSDOS 1 +-# endif +-# if !defined(_MSDOS) +-# define _MSDOS 1 +-# endif +-#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) +-# if (__VERSION == 520) && (MB_LEN_MAX == 1) +-# if !defined(__AZTEC_C__) +-# define __AZTEC_C__ __VERSION +-# endif +-# if !defined(__DOS__) +-# define __DOS__ 1 +-# endif +-# endif +-#endif +-#endif +-#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) +-# define ptrdiff_t long +-# define _PTRDIFF_T_DEFINED 1 +-#endif +-#if (UINT_MAX == LZO_0xffffL) +-# undef __LZO_RENAME_A +-# undef __LZO_RENAME_B +-# if defined(__AZTEC_C__) && defined(__DOS__) +-# define __LZO_RENAME_A 1 +-# elif defined(_MSC_VER) && defined(MSDOS) +-# if (_MSC_VER < 600) +-# define __LZO_RENAME_A 1 +-# elif (_MSC_VER < 700) +-# define __LZO_RENAME_B 1 +-# endif +-# elif defined(__TSC__) && defined(__OS2__) +-# define __LZO_RENAME_A 1 +-# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) +-# define __LZO_RENAME_A 1 +-# elif defined(__PACIFIC__) && defined(DOS) +-# if !defined(__far) +-# define __far far +-# endif +-# if !defined(__near) +-# define __near near +-# endif +-# endif +-# if defined(__LZO_RENAME_A) +-# if !defined(__cdecl) +-# define __cdecl cdecl +-# endif +-# if !defined(__far) +-# define __far far +-# endif +-# if !defined(__huge) +-# define __huge huge +-# endif +-# if !defined(__near) +-# define __near near +-# endif +-# if !defined(__pascal) +-# define __pascal pascal +-# endif +-# if !defined(__huge) +-# define __huge huge +-# endif +-# elif defined(__LZO_RENAME_B) +-# if !defined(__cdecl) +-# define __cdecl _cdecl +-# endif +-# if !defined(__far) +-# define __far _far +-# endif +-# if !defined(__huge) +-# define __huge _huge +-# endif +-# if !defined(__near) +-# define __near _near +-# endif +-# if !defined(__pascal) +-# define __pascal _pascal +-# endif +-# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +-# if !defined(__cdecl) +-# define __cdecl cdecl +-# endif +-# if !defined(__pascal) +-# define __pascal pascal +-# endif +-# endif +-# undef __LZO_RENAME_A +-# undef __LZO_RENAME_B +-#endif +-#if (UINT_MAX == LZO_0xffffL) +-#if defined(__AZTEC_C__) && defined(__DOS__) +-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +-#elif defined(_MSC_VER) && defined(MSDOS) +-# if (_MSC_VER < 600) +-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +-# endif +-# if (_MSC_VER < 700) +-# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +-# define LZO_BROKEN_SIZEOF 1 +-# endif +-#elif defined(__PACIFIC__) && defined(DOS) +-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +-#elif defined(__TURBOC__) && defined(__MSDOS__) +-# if (__TURBOC__ < 0x0150) +-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +-# define LZO_BROKEN_INTEGRAL_PROMOTION 1 +-# endif +-# if (__TURBOC__ < 0x0200) +-# define LZO_BROKEN_SIZEOF 1 +-# endif +-# if (__TURBOC__ < 0x0400) && defined(__cplusplus) +-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +-# endif +-#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) +-# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 +-# define LZO_BROKEN_SIZEOF 1 +-#endif +-#endif +-#if defined(__WATCOMC__) && (__WATCOMC__ < 900) +-# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 +-#endif +-#if defined(_CRAY) && defined(_CRAY1) +-# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 +-#endif +-#define LZO_PP_STRINGIZE(x) #x +-#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) +-#define LZO_PP_CONCAT2(a,b) a ## b +-#define LZO_PP_CONCAT3(a,b,c) a ## b ## c +-#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d +-#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +-#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) +-#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) +-#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) +-#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) +-#if 1 +-#define LZO_CPP_STRINGIZE(x) #x +-#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) +-#define LZO_CPP_CONCAT2(a,b) a ## b +-#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c +-#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d +-#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e +-#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) +-#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) +-#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) +-#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) +-#endif +-#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) +-#if 1 && defined(__cplusplus) +-# if !defined(__STDC_CONSTANT_MACROS) +-# define __STDC_CONSTANT_MACROS 1 +-# endif +-# if !defined(__STDC_LIMIT_MACROS) +-# define __STDC_LIMIT_MACROS 1 +-# endif +-#endif +-#if defined(__cplusplus) +-# define LZO_EXTERN_C extern "C" +-#else +-# define LZO_EXTERN_C extern +-#endif +-#if !defined(__LZO_OS_OVERRIDE) +-#if (LZO_OS_FREESTANDING) +-# define LZO_INFO_OS "freestanding" +-#elif (LZO_OS_EMBEDDED) +-# define LZO_INFO_OS "embedded" +-#elif 1 && defined(__IAR_SYSTEMS_ICC__) +-# define LZO_OS_EMBEDDED 1 +-# define LZO_INFO_OS "embedded" +-#elif defined(__CYGWIN__) && defined(__GNUC__) +-# define LZO_OS_CYGWIN 1 +-# define LZO_INFO_OS "cygwin" +-#elif defined(__EMX__) && defined(__GNUC__) +-# define LZO_OS_EMX 1 +-# define LZO_INFO_OS "emx" +-#elif defined(__BEOS__) +-# define LZO_OS_BEOS 1 +-# define LZO_INFO_OS "beos" +-#elif defined(__Lynx__) +-# define LZO_OS_LYNXOS 1 +-# define LZO_INFO_OS "lynxos" +-#elif defined(__OS400__) +-# define LZO_OS_OS400 1 +-# define LZO_INFO_OS "os400" +-#elif defined(__QNX__) +-# define LZO_OS_QNX 1 +-# define LZO_INFO_OS "qnx" +-#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) +-# define LZO_OS_DOS32 1 +-# define LZO_INFO_OS "dos32" +-#elif defined(__BORLANDC__) && defined(__DPMI16__) +-# define LZO_OS_DOS16 1 +-# define LZO_INFO_OS "dos16" +-#elif defined(__ZTC__) && defined(DOS386) +-# define LZO_OS_DOS32 1 +-# define LZO_INFO_OS "dos32" +-#elif defined(__OS2__) || defined(__OS2V2__) +-# if (UINT_MAX == LZO_0xffffL) +-# define LZO_OS_OS216 1 +-# define LZO_INFO_OS "os216" +-# elif (UINT_MAX == LZO_0xffffffffL) +-# define LZO_OS_OS2 1 +-# define LZO_INFO_OS "os2" +-# else +-# error "check your limits.h header" +-# endif +-#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) +-# define LZO_OS_WIN64 1 +-# define LZO_INFO_OS "win64" +-#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) +-# define LZO_OS_WIN32 1 +-# define LZO_INFO_OS "win32" +-#elif defined(__MWERKS__) && defined(__INTEL__) +-# define LZO_OS_WIN32 1 +-# define LZO_INFO_OS "win32" +-#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) +-# if (UINT_MAX == LZO_0xffffL) +-# define LZO_OS_WIN16 1 +-# define LZO_INFO_OS "win16" +-# elif (UINT_MAX == LZO_0xffffffffL) +-# define LZO_OS_WIN32 1 +-# define LZO_INFO_OS "win32" +-# else +-# error "check your limits.h header" +-# endif +-#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) +-# if (UINT_MAX == LZO_0xffffL) +-# define LZO_OS_DOS16 1 +-# define LZO_INFO_OS "dos16" +-# elif (UINT_MAX == LZO_0xffffffffL) +-# define LZO_OS_DOS32 1 +-# define LZO_INFO_OS "dos32" +-# else +-# error "check your limits.h header" +-# endif +-#elif defined(__WATCOMC__) +-# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) +-# define LZO_OS_DOS16 1 +-# define LZO_INFO_OS "dos16" +-# elif defined(__NT__) && (__WATCOMC__ < 1100) +-# define LZO_OS_WIN32 1 +-# define LZO_INFO_OS "win32" +-# elif defined(__linux__) || defined(__LINUX__) +-# define LZO_OS_POSIX 1 +-# define LZO_INFO_OS "posix" +-# else +-# error "please specify a target using the -bt compiler option" +-# endif +-#elif defined(__palmos__) +-# define LZO_OS_PALMOS 1 +-# define LZO_INFO_OS "palmos" +-#elif defined(__TOS__) || defined(__atarist__) +-# define LZO_OS_TOS 1 +-# define LZO_INFO_OS "tos" +-#elif defined(macintosh) && !defined(__ppc__) +-# define LZO_OS_MACCLASSIC 1 +-# define LZO_INFO_OS "macclassic" +-#elif defined(__VMS) +-# define LZO_OS_VMS 1 +-# define LZO_INFO_OS "vms" +-#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +-# define LZO_OS_CONSOLE 1 +-# define LZO_OS_CONSOLE_PS2 1 +-# define LZO_INFO_OS "console" +-# define LZO_INFO_OS_CONSOLE "ps2" +-#elif (defined(__mips__) && defined(__psp__)) +-# define LZO_OS_CONSOLE 1 +-# define LZO_OS_CONSOLE_PSP 1 +-# define LZO_INFO_OS "console" +-# define LZO_INFO_OS_CONSOLE "psp" +-#else +-# define LZO_OS_POSIX 1 +-# define LZO_INFO_OS "posix" +-#endif +-#if (LZO_OS_POSIX) +-# if defined(_AIX) || defined(__AIX__) || defined(__aix__) +-# define LZO_OS_POSIX_AIX 1 +-# define LZO_INFO_OS_POSIX "aix" +-# elif defined(__FreeBSD__) +-# define LZO_OS_POSIX_FREEBSD 1 +-# define LZO_INFO_OS_POSIX "freebsd" +-# elif defined(__hpux__) || defined(__hpux) +-# define LZO_OS_POSIX_HPUX 1 +-# define LZO_INFO_OS_POSIX "hpux" +-# elif defined(__INTERIX) +-# define LZO_OS_POSIX_INTERIX 1 +-# define LZO_INFO_OS_POSIX "interix" +-# elif defined(__IRIX__) || defined(__irix__) +-# define LZO_OS_POSIX_IRIX 1 +-# define LZO_INFO_OS_POSIX "irix" +-# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) +-# define LZO_OS_POSIX_LINUX 1 +-# define LZO_INFO_OS_POSIX "linux" +-# elif defined(__APPLE__) || defined(__MACOS__) +-# define LZO_OS_POSIX_MACOSX 1 +-# define LZO_INFO_OS_POSIX "macosx" +-# elif defined(__minix__) || defined(__minix) +-# define LZO_OS_POSIX_MINIX 1 +-# define LZO_INFO_OS_POSIX "minix" +-# elif defined(__NetBSD__) +-# define LZO_OS_POSIX_NETBSD 1 +-# define LZO_INFO_OS_POSIX "netbsd" +-# elif defined(__OpenBSD__) +-# define LZO_OS_POSIX_OPENBSD 1 +-# define LZO_INFO_OS_POSIX "openbsd" +-# elif defined(__osf__) +-# define LZO_OS_POSIX_OSF 1 +-# define LZO_INFO_OS_POSIX "osf" +-# elif defined(__solaris__) || defined(__sun) +-# if defined(__SVR4) || defined(__svr4__) +-# define LZO_OS_POSIX_SOLARIS 1 +-# define LZO_INFO_OS_POSIX "solaris" +-# else +-# define LZO_OS_POSIX_SUNOS 1 +-# define LZO_INFO_OS_POSIX "sunos" +-# endif +-# elif defined(__ultrix__) || defined(__ultrix) +-# define LZO_OS_POSIX_ULTRIX 1 +-# define LZO_INFO_OS_POSIX "ultrix" +-# elif defined(_UNICOS) +-# define LZO_OS_POSIX_UNICOS 1 +-# define LZO_INFO_OS_POSIX "unicos" +-# else +-# define LZO_OS_POSIX_UNKNOWN 1 +-# define LZO_INFO_OS_POSIX "unknown" +-# endif +-#endif +-#endif +-#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +-# if (UINT_MAX != LZO_0xffffL) +-# error "this should not happen" +-# endif +-# if (ULONG_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-#endif +-#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) +-# if (UINT_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-# if (ULONG_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-#endif +-#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) +-# define LZO_CC_CILLY 1 +-# define LZO_INFO_CC "Cilly" +-# if defined(__CILLY__) +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) +-# else +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) +-# define LZO_CC_SDCC 1 +-# define LZO_INFO_CC "sdcc" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) +-#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) +-# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) +-# define LZO_INFO_CC "Pathscale C" +-# define LZO_INFO_CCVER __PATHSCALE__ +-#elif defined(__INTEL_COMPILER) +-# define LZO_CC_INTELC 1 +-# define LZO_INFO_CC "Intel C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) +-# if defined(_WIN32) || defined(_WIN64) +-# define LZO_CC_SYNTAX_MSC 1 +-# else +-# define LZO_CC_SYNTAX_GNUC 1 +-# endif +-#elif defined(__POCC__) && defined(_WIN32) +-# define LZO_CC_PELLESC 1 +-# define LZO_INFO_CC "Pelles C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) +-#elif defined(__clang__) && defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) +-# if defined(__GNUC_PATCHLEVEL__) +-# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +-# else +-# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +-# endif +-# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) +-# define LZO_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__) +-# else +-# define LZO_CC_CLANG_CLANG 0x020700L +-# endif +-# define LZO_CC_CLANG LZO_CC_CLANG_GNUC +-# define LZO_INFO_CC "clang" +-# define LZO_INFO_CCVER __VERSION__ +-#elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) +-# if defined(__GNUC_PATCHLEVEL__) +-# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +-# else +-# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +-# endif +-# define LZO_CC_LLVM LZO_CC_LLVM_GNUC +-# define LZO_INFO_CC "llvm-gcc" +-# define LZO_INFO_CCVER __VERSION__ +-#elif defined(__GNUC__) && defined(__VERSION__) +-# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) +-# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) +-# elif defined(__GNUC_MINOR__) +-# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) +-# else +-# define LZO_CC_GNUC (__GNUC__ * 0x10000L) +-# endif +-# define LZO_INFO_CC "gcc" +-# define LZO_INFO_CCVER __VERSION__ +-#elif defined(__ACK__) && defined(_ACK) +-# define LZO_CC_ACK 1 +-# define LZO_INFO_CC "Amsterdam Compiler Kit C" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__AZTEC_C__) +-# define LZO_CC_AZTECC 1 +-# define LZO_INFO_CC "Aztec C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) +-#elif defined(__CODEGEARC__) +-# define LZO_CC_CODEGEARC 1 +-# define LZO_INFO_CC "CodeGear C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) +-#elif defined(__BORLANDC__) +-# define LZO_CC_BORLANDC 1 +-# define LZO_INFO_CC "Borland C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) +-#elif defined(_CRAYC) && defined(_RELEASE) +-# define LZO_CC_CRAYC 1 +-# define LZO_INFO_CC "Cray C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) +-#elif defined(__DMC__) && defined(__SC__) +-# define LZO_CC_DMC 1 +-# define LZO_INFO_CC "Digital Mars C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) +-#elif defined(__DECC) +-# define LZO_CC_DECC 1 +-# define LZO_INFO_CC "DEC C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) +-#elif defined(__HIGHC__) +-# define LZO_CC_HIGHC 1 +-# define LZO_INFO_CC "MetaWare High C" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__IAR_SYSTEMS_ICC__) +-# define LZO_CC_IARC 1 +-# define LZO_INFO_CC "IAR C" +-# if defined(__VER__) +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) +-# else +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif defined(__IBMC__) +-# define LZO_CC_IBMC 1 +-# define LZO_INFO_CC "IBM C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) +-#elif defined(__KEIL__) && defined(__C166__) +-# define LZO_CC_KEILC 1 +-# define LZO_INFO_CC "Keil C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) +-#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) +-# define LZO_CC_LCCWIN32 1 +-# define LZO_INFO_CC "lcc-win32" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__LCC__) +-# define LZO_CC_LCC 1 +-# define LZO_INFO_CC "lcc" +-# if defined(__LCC_VERSION__) +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) +-# else +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif defined(_MSC_VER) +-# define LZO_CC_MSC 1 +-# define LZO_INFO_CC "Microsoft C" +-# if defined(_MSC_FULL_VER) +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) +-# else +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) +-# endif +-#elif defined(__MWERKS__) +-# define LZO_CC_MWERKS 1 +-# define LZO_INFO_CC "Metrowerks C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) +-#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) +-# define LZO_CC_NDPC 1 +-# define LZO_INFO_CC "Microway NDP C" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__PACIFIC__) +-# define LZO_CC_PACIFICC 1 +-# define LZO_INFO_CC "Pacific C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) +-#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) +-# define LZO_CC_PGI 1 +-# define LZO_INFO_CC "Portland Group PGI C" +-# define LZO_INFO_CCVER "unknown" +-#elif defined(__PUREC__) && defined(__TOS__) +-# define LZO_CC_PUREC 1 +-# define LZO_INFO_CC "Pure C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) +-#elif defined(__SC__) && defined(__ZTC__) +-# define LZO_CC_SYMANTECC 1 +-# define LZO_INFO_CC "Symantec C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) +-#elif defined(__SUNPRO_C) +-# define LZO_INFO_CC "SunPro C" +-# if ((__SUNPRO_C)+0 > 0) +-# define LZO_CC_SUNPROC __SUNPRO_C +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) +-# else +-# define LZO_CC_SUNPROC 1 +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif defined(__SUNPRO_CC) +-# define LZO_INFO_CC "SunPro C" +-# if ((__SUNPRO_CC)+0 > 0) +-# define LZO_CC_SUNPROC __SUNPRO_CC +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) +-# else +-# define LZO_CC_SUNPROC 1 +-# define LZO_INFO_CCVER "unknown" +-# endif +-#elif defined(__TINYC__) +-# define LZO_CC_TINYC 1 +-# define LZO_INFO_CC "Tiny C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) +-#elif defined(__TSC__) +-# define LZO_CC_TOPSPEEDC 1 +-# define LZO_INFO_CC "TopSpeed C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) +-#elif defined(__WATCOMC__) +-# define LZO_CC_WATCOMC 1 +-# define LZO_INFO_CC "Watcom C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) +-#elif defined(__TURBOC__) +-# define LZO_CC_TURBOC 1 +-# define LZO_INFO_CC "Turbo C" +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) +-#elif defined(__ZTC__) +-# define LZO_CC_ZORTECHC 1 +-# define LZO_INFO_CC "Zortech C" +-# if (__ZTC__ == 0x310) +-# define LZO_INFO_CCVER "0x310" +-# else +-# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) +-# endif +-#else +-# define LZO_CC_UNKNOWN 1 +-# define LZO_INFO_CC "unknown" +-# define LZO_INFO_CCVER "unknown" +-#endif +-#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) +-# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" +-#endif +-#if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) +-# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) +-# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) +-# define LZO_ARCH_CRAY_MPP 1 +-# elif defined(_CRAY1) +-# define LZO_ARCH_CRAY_PVP 1 +-# endif +-# endif +-#endif +-#if !defined(__LZO_ARCH_OVERRIDE) +-#if (LZO_ARCH_GENERIC) +-# define LZO_INFO_ARCH "generic" +-#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +-# define LZO_ARCH_I086 1 +-# define LZO_ARCH_IA16 1 +-# define LZO_INFO_ARCH "i086" +-#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) +-# define LZO_ARCH_ALPHA 1 +-# define LZO_INFO_ARCH "alpha" +-#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) +-# define LZO_ARCH_ALPHA 1 +-# define LZO_INFO_ARCH "alpha" +-#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) +-# define LZO_ARCH_AMD64 1 +-# define LZO_INFO_ARCH "amd64" +-#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) +-# define LZO_ARCH_ARM 1 +-# define LZO_ARCH_ARM_THUMB 1 +-# define LZO_INFO_ARCH "arm_thumb" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) +-# define LZO_ARCH_ARM 1 +-# if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1) +-# define LZO_ARCH_ARM_THUMB 1 +-# define LZO_INFO_ARCH "arm_thumb" +-# elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2) +-# define LZO_INFO_ARCH "arm" +-# else +-# define LZO_INFO_ARCH "arm" +-# endif +-#elif defined(__arm__) || defined(_M_ARM) +-# define LZO_ARCH_ARM 1 +-# define LZO_INFO_ARCH "arm" +-#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) +-# define LZO_ARCH_AVR 1 +-# define LZO_INFO_ARCH "avr" +-#elif defined(__avr32__) || defined(__AVR32__) +-# define LZO_ARCH_AVR32 1 +-# define LZO_INFO_ARCH "avr32" +-#elif defined(__bfin__) +-# define LZO_ARCH_BLACKFIN 1 +-# define LZO_INFO_ARCH "blackfin" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) +-# define LZO_ARCH_C166 1 +-# define LZO_INFO_ARCH "c166" +-#elif defined(__cris__) +-# define LZO_ARCH_CRIS 1 +-# define LZO_INFO_ARCH "cris" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) +-# define LZO_ARCH_EZ80 1 +-# define LZO_INFO_ARCH "ez80" +-#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +-# define LZO_ARCH_H8300 1 +-# define LZO_INFO_ARCH "h8300" +-#elif defined(__hppa__) || defined(__hppa) +-# define LZO_ARCH_HPPA 1 +-# define LZO_INFO_ARCH "hppa" +-#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) +-# define LZO_ARCH_I386 1 +-# define LZO_ARCH_IA32 1 +-# define LZO_INFO_ARCH "i386" +-#elif (LZO_CC_ZORTECHC && defined(__I86__)) +-# define LZO_ARCH_I386 1 +-# define LZO_ARCH_IA32 1 +-# define LZO_INFO_ARCH "i386" +-#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) +-# define LZO_ARCH_I386 1 +-# define LZO_ARCH_IA32 1 +-# define LZO_INFO_ARCH "i386" +-#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) +-# define LZO_ARCH_IA64 1 +-# define LZO_INFO_ARCH "ia64" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) +-# define LZO_ARCH_M16C 1 +-# define LZO_INFO_ARCH "m16c" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) +-# define LZO_ARCH_M16C 1 +-# define LZO_INFO_ARCH "m16c" +-#elif defined(__m32r__) +-# define LZO_ARCH_M32R 1 +-# define LZO_INFO_ARCH "m32r" +-#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) +-# define LZO_ARCH_M68K 1 +-# define LZO_INFO_ARCH "m68k" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) +-# define LZO_ARCH_MCS251 1 +-# define LZO_INFO_ARCH "mcs251" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) +-# define LZO_ARCH_MCS51 1 +-# define LZO_INFO_ARCH "mcs51" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) +-# define LZO_ARCH_MCS51 1 +-# define LZO_INFO_ARCH "mcs51" +-#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) +-# define LZO_ARCH_MIPS 1 +-# define LZO_INFO_ARCH "mips" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) +-# define LZO_ARCH_MSP430 1 +-# define LZO_INFO_ARCH "msp430" +-#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) +-# define LZO_ARCH_MSP430 1 +-# define LZO_INFO_ARCH "msp430" +-#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) +-# define LZO_ARCH_POWERPC 1 +-# define LZO_INFO_ARCH "powerpc" +-#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) +-# define LZO_ARCH_S390 1 +-# define LZO_INFO_ARCH "s390" +-#elif defined(__sh__) || defined(_M_SH) +-# define LZO_ARCH_SH 1 +-# define LZO_INFO_ARCH "sh" +-#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) +-# define LZO_ARCH_SPARC 1 +-# define LZO_INFO_ARCH "sparc" +-#elif defined(__SPU__) +-# define LZO_ARCH_SPU 1 +-# define LZO_INFO_ARCH "spu" +-#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) +-# define LZO_ARCH_Z80 1 +-# define LZO_INFO_ARCH "z80" +-#elif (LZO_ARCH_CRAY_PVP) +-# if defined(_CRAYSV1) +-# define LZO_ARCH_CRAY_SV1 1 +-# define LZO_INFO_ARCH "cray_sv1" +-# elif (_ADDR64) +-# define LZO_ARCH_CRAY_T90 1 +-# define LZO_INFO_ARCH "cray_t90" +-# elif (_ADDR32) +-# define LZO_ARCH_CRAY_YMP 1 +-# define LZO_INFO_ARCH "cray_ymp" +-# else +-# define LZO_ARCH_CRAY_XMP 1 +-# define LZO_INFO_ARCH "cray_xmp" +-# endif +-#else +-# define LZO_ARCH_UNKNOWN 1 +-# define LZO_INFO_ARCH "unknown" +-#endif +-#endif +-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) +-# error "FIXME - missing define for CPU architecture" +-#endif +-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) +-# error "FIXME - missing WIN32 define for CPU architecture" +-#endif +-#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) +-# error "FIXME - missing WIN64 define for CPU architecture" +-#endif +-#if (LZO_OS_OS216 || LZO_OS_WIN16) +-# define LZO_ARCH_I086PM 1 +-# define LZO_ARCH_IA16PM 1 +-#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) +-# define LZO_ARCH_I086PM 1 +-# define LZO_ARCH_IA16PM 1 +-#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) +-# define LZO_ARCH_I086PM 1 +-# define LZO_ARCH_IA16PM 1 +-#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) +-# define LZO_ARCH_I086PM 1 +-# define LZO_ARCH_IA16PM 1 +-#endif +-#if (LZO_ARCH_ARM_THUMB) && !(LZO_ARCH_ARM) +-# error "this should not happen" +-#endif +-#if (LZO_ARCH_I086PM) && !(LZO_ARCH_I086) +-# error "this should not happen" +-#endif +-#if (LZO_ARCH_I086) +-# if (UINT_MAX != LZO_0xffffL) +-# error "this should not happen" +-# endif +-# if (ULONG_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-#endif +-#if (LZO_ARCH_I386) +-# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) +-# error "this should not happen" +-# endif +-# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) +-# error "this should not happen" +-# endif +-# if (ULONG_MAX != LZO_0xffffffffL) +-# error "this should not happen" +-# endif +-#endif +-#if !defined(__LZO_MM_OVERRIDE) +-#if (LZO_ARCH_I086) +-#if (UINT_MAX != LZO_0xffffL) +-# error "this should not happen" +-#endif +-#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) +-# define LZO_MM_TINY 1 +-#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) +-# define LZO_MM_HUGE 1 +-#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) +-# define LZO_MM_SMALL 1 +-#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) +-# define LZO_MM_MEDIUM 1 +-#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) +-# define LZO_MM_COMPACT 1 +-#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) +-# define LZO_MM_LARGE 1 +-#elif (LZO_CC_AZTECC) +-# if defined(_LARGE_CODE) && defined(_LARGE_DATA) +-# define LZO_MM_LARGE 1 +-# elif defined(_LARGE_CODE) +-# define LZO_MM_MEDIUM 1 +-# elif defined(_LARGE_DATA) +-# define LZO_MM_COMPACT 1 +-# else +-# define LZO_MM_SMALL 1 +-# endif +-#elif (LZO_CC_ZORTECHC && defined(__VCM__)) +-# define LZO_MM_LARGE 1 +-#else +-# error "unknown memory model" +-#endif +-#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +-#define LZO_HAVE_MM_HUGE_PTR 1 +-#define LZO_HAVE_MM_HUGE_ARRAY 1 +-#if (LZO_MM_TINY) +-# undef LZO_HAVE_MM_HUGE_ARRAY +-#endif +-#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) +-# undef LZO_HAVE_MM_HUGE_PTR +-# undef LZO_HAVE_MM_HUGE_ARRAY +-#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +-# undef LZO_HAVE_MM_HUGE_ARRAY +-#elif (LZO_CC_MSC && defined(_QC)) +-# undef LZO_HAVE_MM_HUGE_ARRAY +-# if (_MSC_VER < 600) +-# undef LZO_HAVE_MM_HUGE_PTR +-# endif +-#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) +-# undef LZO_HAVE_MM_HUGE_ARRAY +-#endif +-#if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR) +-# if (LZO_OS_DOS16) +-# error "this should not happen" +-# elif (LZO_CC_ZORTECHC) +-# else +-# error "this should not happen" +-# endif +-#endif +-#ifdef __cplusplus +-extern "C" { +-#endif +-#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) +- extern void __near __cdecl _AHSHIFT(void); +-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +-#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +- extern void __near __cdecl _AHSHIFT(void); +-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +-#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) +- extern void __near __cdecl _AHSHIFT(void); +-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +-#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) +- extern void __near __cdecl _AHSHIFT(void); +-# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) +-#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) +-# define LZO_MM_AHSHIFT 12 +-#elif (LZO_CC_WATCOMC) +- extern unsigned char _HShift; +-# define LZO_MM_AHSHIFT ((unsigned) _HShift) +-#else +-# error "FIXME - implement LZO_MM_AHSHIFT" +-#endif +-#ifdef __cplusplus +-} +-#endif +-#endif +-#elif (LZO_ARCH_C166) +-#if !defined(__MODEL__) +-# error "FIXME - C166 __MODEL__" +-#elif ((__MODEL__) == 0) +-# define LZO_MM_SMALL 1 +-#elif ((__MODEL__) == 1) +-# define LZO_MM_SMALL 1 +-#elif ((__MODEL__) == 2) +-# define LZO_MM_LARGE 1 +-#elif ((__MODEL__) == 3) +-# define LZO_MM_TINY 1 +-#elif ((__MODEL__) == 4) +-# define LZO_MM_XTINY 1 +-#elif ((__MODEL__) == 5) +-# define LZO_MM_XSMALL 1 +-#else +-# error "FIXME - C166 __MODEL__" +-#endif +-#elif (LZO_ARCH_MCS251) +-#if !defined(__MODEL__) +-# error "FIXME - MCS251 __MODEL__" +-#elif ((__MODEL__) == 0) +-# define LZO_MM_SMALL 1 +-#elif ((__MODEL__) == 2) +-# define LZO_MM_LARGE 1 +-#elif ((__MODEL__) == 3) +-# define LZO_MM_TINY 1 +-#elif ((__MODEL__) == 4) +-# define LZO_MM_XTINY 1 +-#elif ((__MODEL__) == 5) +-# define LZO_MM_XSMALL 1 +-#else +-# error "FIXME - MCS251 __MODEL__" +-#endif +-#elif (LZO_ARCH_MCS51) +-#if !defined(__MODEL__) +-# error "FIXME - MCS51 __MODEL__" +-#elif ((__MODEL__) == 1) +-# define LZO_MM_SMALL 1 +-#elif ((__MODEL__) == 2) +-# define LZO_MM_LARGE 1 +-#elif ((__MODEL__) == 3) +-# define LZO_MM_TINY 1 +-#elif ((__MODEL__) == 4) +-# define LZO_MM_XTINY 1 +-#elif ((__MODEL__) == 5) +-# define LZO_MM_XSMALL 1 +-#else +-# error "FIXME - MCS51 __MODEL__" +-#endif +-#elif (LZO_ARCH_CRAY_PVP) +-# define LZO_MM_PVP 1 +-#else +-# define LZO_MM_FLAT 1 +-#endif +-#if (LZO_MM_COMPACT) +-# define LZO_INFO_MM "compact" +-#elif (LZO_MM_FLAT) +-# define LZO_INFO_MM "flat" +-#elif (LZO_MM_HUGE) +-# define LZO_INFO_MM "huge" +-#elif (LZO_MM_LARGE) +-# define LZO_INFO_MM "large" +-#elif (LZO_MM_MEDIUM) +-# define LZO_INFO_MM "medium" +-#elif (LZO_MM_PVP) +-# define LZO_INFO_MM "pvp" +-#elif (LZO_MM_SMALL) +-# define LZO_INFO_MM "small" +-#elif (LZO_MM_TINY) +-# define LZO_INFO_MM "tiny" +-#else +-# error "unknown memory model" +-#endif +-#endif +-#if defined(SIZEOF_SHORT) +-# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) +-#endif +-#if defined(SIZEOF_INT) +-# define LZO_SIZEOF_INT (SIZEOF_INT) +-#endif +-#if defined(SIZEOF_LONG) +-# define LZO_SIZEOF_LONG (SIZEOF_LONG) +-#endif +-#if defined(SIZEOF_LONG_LONG) +-# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) +-#endif +-#if defined(SIZEOF___INT16) +-# define LZO_SIZEOF___INT16 (SIZEOF___INT16) +-#endif +-#if defined(SIZEOF___INT32) +-# define LZO_SIZEOF___INT32 (SIZEOF___INT32) +-#endif +-#if defined(SIZEOF___INT64) +-# define LZO_SIZEOF___INT64 (SIZEOF___INT64) +-#endif +-#if defined(SIZEOF_VOID_P) +-# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) +-#endif +-#if defined(SIZEOF_SIZE_T) +-# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) +-#endif +-#if defined(SIZEOF_PTRDIFF_T) +-# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) +-#endif +-#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) +-#if !defined(LZO_SIZEOF_SHORT) +-# if (LZO_ARCH_CRAY_PVP) +-# define LZO_SIZEOF_SHORT 8 +-# elif (USHRT_MAX == LZO_0xffffL) +-# define LZO_SIZEOF_SHORT 2 +-# elif (__LZO_LSR(USHRT_MAX,7) == 1) +-# define LZO_SIZEOF_SHORT 1 +-# elif (__LZO_LSR(USHRT_MAX,15) == 1) +-# define LZO_SIZEOF_SHORT 2 +-# elif (__LZO_LSR(USHRT_MAX,31) == 1) +-# define LZO_SIZEOF_SHORT 4 +-# elif (__LZO_LSR(USHRT_MAX,63) == 1) +-# define LZO_SIZEOF_SHORT 8 +-# elif (__LZO_LSR(USHRT_MAX,127) == 1) +-# define LZO_SIZEOF_SHORT 16 +-# else +-# error "LZO_SIZEOF_SHORT" +-# endif +-#endif +-#if !defined(LZO_SIZEOF_INT) +-# if (LZO_ARCH_CRAY_PVP) +-# define LZO_SIZEOF_INT 8 +-# elif (UINT_MAX == LZO_0xffffL) +-# define LZO_SIZEOF_INT 2 +-# elif (UINT_MAX == LZO_0xffffffffL) +-# define LZO_SIZEOF_INT 4 +-# elif (__LZO_LSR(UINT_MAX,7) == 1) +-# define LZO_SIZEOF_INT 1 +-# elif (__LZO_LSR(UINT_MAX,15) == 1) +-# define LZO_SIZEOF_INT 2 +-# elif (__LZO_LSR(UINT_MAX,31) == 1) +-# define LZO_SIZEOF_INT 4 +-# elif (__LZO_LSR(UINT_MAX,63) == 1) +-# define LZO_SIZEOF_INT 8 +-# elif (__LZO_LSR(UINT_MAX,127) == 1) +-# define LZO_SIZEOF_INT 16 +-# else +-# error "LZO_SIZEOF_INT" +-# endif +-#endif +-#if !defined(LZO_SIZEOF_LONG) +-# if (ULONG_MAX == LZO_0xffffffffL) +-# define LZO_SIZEOF_LONG 4 +-# elif (__LZO_LSR(ULONG_MAX,7) == 1) +-# define LZO_SIZEOF_LONG 1 +-# elif (__LZO_LSR(ULONG_MAX,15) == 1) +-# define LZO_SIZEOF_LONG 2 +-# elif (__LZO_LSR(ULONG_MAX,31) == 1) +-# define LZO_SIZEOF_LONG 4 +-# elif (__LZO_LSR(ULONG_MAX,63) == 1) +-# define LZO_SIZEOF_LONG 8 +-# elif (__LZO_LSR(ULONG_MAX,127) == 1) +-# define LZO_SIZEOF_LONG 16 +-# else +-# error "LZO_SIZEOF_LONG" +-# endif +-#endif +-#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +-#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +-# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) +-# if (LZO_CC_GNUC >= 0x030300ul) +-# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) +-# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG +-# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) +-# define LZO_SIZEOF_LONG_LONG 4 +-# endif +-# endif +-# endif +-#endif +-#endif +-#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) +-#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) +-#if (LZO_ARCH_I086 && LZO_CC_DMC) +-#elif (LZO_CC_CILLY) && defined(__GNUC__) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_OS_WIN64 || defined(_WIN64)) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) +-# define LZO_SIZEOF___INT64 8 +-#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) +-# define LZO_SIZEOF___INT64 8 +-#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +-# define LZO_SIZEOF_LONG_LONG 8 +-#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) +-#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +-# define LZO_SIZEOF_LONG_LONG 8 +-#endif +-#endif +-#endif +-#if defined(__cplusplus) && (LZO_CC_GNUC) +-# if (LZO_CC_GNUC < 0x020800ul) +-# undef LZO_SIZEOF_LONG_LONG +-# endif +-#endif +-#if (LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) +-# undef LZO_SIZEOF_LONG_LONG +-#endif +-#if !defined(LZO_SIZEOF_VOID_P) +-#if (LZO_ARCH_I086) +-# define __LZO_WORDSIZE 2 +-# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) +-# define LZO_SIZEOF_VOID_P 2 +-# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) +-# define LZO_SIZEOF_VOID_P 4 +-# else +-# error "LZO_MM" +-# endif +-#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) +-# define __LZO_WORDSIZE 1 +-# define LZO_SIZEOF_VOID_P 2 +-#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) +-# define LZO_SIZEOF_VOID_P 2 +-#elif (LZO_ARCH_H8300) +-# if defined(__NORMAL_MODE__) +-# define __LZO_WORDSIZE 4 +-# define LZO_SIZEOF_VOID_P 2 +-# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) +-# define __LZO_WORDSIZE 4 +-# define LZO_SIZEOF_VOID_P 4 +-# else +-# define __LZO_WORDSIZE 2 +-# define LZO_SIZEOF_VOID_P 2 +-# endif +-# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT +-# endif +-#elif (LZO_ARCH_M16C) +-# define __LZO_WORDSIZE 2 +-# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) +-# define LZO_SIZEOF_VOID_P 4 +-# else +-# define LZO_SIZEOF_VOID_P 2 +-# endif +-#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) +-# define __LZO_WORDSIZE 8 +-# define LZO_SIZEOF_VOID_P 4 +-#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) +-# define __LZO_WORDSIZE 8 +-# define LZO_SIZEOF_VOID_P 8 +-#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) +-# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +-#elif (LZO_OS_OS400 || defined(__OS400__)) +-# define __LZO_WORDSIZE LZO_SIZEOF_LONG +-# define LZO_SIZEOF_VOID_P 16 +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +-#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) +-# define LZO_SIZEOF_VOID_P 8 +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG +-#elif (LZO_ARCH_SPU) +-# if 0 +-# define __LZO_WORDSIZE 16 +-# endif +-# define LZO_SIZEOF_VOID_P 4 +-#else +-# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG +-#endif +-#endif +-#if !defined(LZO_WORDSIZE) +-# if defined(__LZO_WORDSIZE) +-# define LZO_WORDSIZE __LZO_WORDSIZE +-# else +-# define LZO_WORDSIZE LZO_SIZEOF_VOID_P +-# endif +-#endif +-#if !defined(LZO_SIZEOF_SIZE_T) +-#if (LZO_ARCH_I086 || LZO_ARCH_M16C) +-# define LZO_SIZEOF_SIZE_T 2 +-#else +-# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P +-#endif +-#endif +-#if !defined(LZO_SIZEOF_PTRDIFF_T) +-#if (LZO_ARCH_I086) +-# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P +-# elif (LZO_MM_COMPACT || LZO_MM_LARGE) +-# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) +-# define LZO_SIZEOF_PTRDIFF_T 4 +-# else +-# define LZO_SIZEOF_PTRDIFF_T 2 +-# endif +-# else +-# error "LZO_MM" +-# endif +-#else +-# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T +-#endif +-#endif +-#if (LZO_ABI_NEUTRAL_ENDIAN) +-# undef LZO_ABI_BIG_ENDIAN +-# undef LZO_ABI_LITTLE_ENDIAN +-#elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN) +-#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) +-# if (__LITTLE_ENDIAN__ == 1) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-# else +-# define LZO_ABI_BIG_ENDIAN 1 +-# endif +-#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) +-# define LZO_ABI_BIG_ENDIAN 1 +-#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) +-# define LZO_ABI_LITTLE_ENDIAN 1 +-#endif +-#endif +-#if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN) +-# error "this should not happen" +-#endif +-#if (LZO_ABI_BIG_ENDIAN) +-# define LZO_INFO_ABI_ENDIAN "be" +-#elif (LZO_ABI_LITTLE_ENDIAN) +-# define LZO_INFO_ABI_ENDIAN "le" +-#elif (LZO_ABI_NEUTRAL_ENDIAN) +-# define LZO_INFO_ABI_ENDIAN "neutral" +-#endif +-#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +-# define LZO_ABI_I8LP16 1 +-# define LZO_INFO_ABI_PM "i8lp16" +-#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) +-# define LZO_ABI_ILP16 1 +-# define LZO_INFO_ABI_PM "ilp16" +-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) +-# define LZO_ABI_ILP32 1 +-# define LZO_INFO_ABI_PM "ilp32" +-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) +-# define LZO_ABI_LLP64 1 +-# define LZO_INFO_ABI_PM "llp64" +-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +-# define LZO_ABI_LP64 1 +-# define LZO_INFO_ABI_PM "lp64" +-#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) +-# define LZO_ABI_ILP64 1 +-# define LZO_INFO_ABI_PM "ilp64" +-#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) +-# define LZO_ABI_IP32L64 1 +-# define LZO_INFO_ABI_PM "ip32l64" +-#endif +-#if !defined(__LZO_LIBC_OVERRIDE) +-#if (LZO_LIBC_NAKED) +-# define LZO_INFO_LIBC "naked" +-#elif (LZO_LIBC_FREESTANDING) +-# define LZO_INFO_LIBC "freestanding" +-#elif (LZO_LIBC_MOSTLY_FREESTANDING) +-# define LZO_INFO_LIBC "mfreestanding" +-#elif (LZO_LIBC_ISOC90) +-# define LZO_INFO_LIBC "isoc90" +-#elif (LZO_LIBC_ISOC99) +-# define LZO_INFO_LIBC "isoc99" +-#elif defined(__dietlibc__) +-# define LZO_LIBC_DIETLIBC 1 +-# define LZO_INFO_LIBC "dietlibc" +-#elif defined(_NEWLIB_VERSION) +-# define LZO_LIBC_NEWLIB 1 +-# define LZO_INFO_LIBC "newlib" +-#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) +-# if defined(__UCLIBC_SUBLEVEL__) +-# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) +-# else +-# define LZO_LIBC_UCLIBC 0x00090bL +-# endif +-# define LZO_INFO_LIBC "uclibc" +-#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) +-# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) +-# define LZO_INFO_LIBC "glibc" +-#elif (LZO_CC_MWERKS) && defined(__MSL__) +-# define LZO_LIBC_MSL __MSL__ +-# define LZO_INFO_LIBC "msl" +-#elif 1 && defined(__IAR_SYSTEMS_ICC__) +-# define LZO_LIBC_ISOC90 1 +-# define LZO_INFO_LIBC "isoc90" +-#else +-# define LZO_LIBC_DEFAULT 1 +-# define LZO_INFO_LIBC "default" +-#endif +-#endif +-#if !defined(__lzo_gnuc_extension__) +-#if (LZO_CC_GNUC >= 0x020800ul) +-# define __lzo_gnuc_extension__ __extension__ +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_gnuc_extension__ __extension__ +-#else +-# define __lzo_gnuc_extension__ /*empty*/ +-#endif +-#endif +-#if !defined(__lzo_ua_volatile) +-# define __lzo_ua_volatile volatile +-#endif +-#if !defined(__lzo_alignof) +-#if (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +-# define __lzo_alignof(e) __alignof__(e) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) +-# define __lzo_alignof(e) __alignof__(e) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +-# define __lzo_alignof(e) __alignof(e) +-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) +-# define __lzo_alignof(e) __alignof__(e) +-#endif +-#endif +-#if defined(__lzo_alignof) +-# define __lzo_HAVE_alignof 1 +-#endif +-#if !defined(__lzo_constructor) +-#if (LZO_CC_GNUC >= 0x030400ul) +-# define __lzo_constructor __attribute__((__constructor__,__used__)) +-#elif (LZO_CC_GNUC >= 0x020700ul) +-# define __lzo_constructor __attribute__((__constructor__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_constructor __attribute__((__constructor__)) +-#endif +-#endif +-#if defined(__lzo_constructor) +-# define __lzo_HAVE_constructor 1 +-#endif +-#if !defined(__lzo_destructor) +-#if (LZO_CC_GNUC >= 0x030400ul) +-# define __lzo_destructor __attribute__((__destructor__,__used__)) +-#elif (LZO_CC_GNUC >= 0x020700ul) +-# define __lzo_destructor __attribute__((__destructor__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_destructor __attribute__((__destructor__)) +-#endif +-#endif +-#if defined(__lzo_destructor) +-# define __lzo_HAVE_destructor 1 +-#endif +-#if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor) +-# error "this should not happen" +-#endif +-#if !defined(__lzo_inline) +-#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) +-#elif defined(__cplusplus) +-# define __lzo_inline inline +-#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) +-# define __lzo_inline __inline +-#elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) +-# define __lzo_inline __inline__ +-#elif (LZO_CC_DMC) +-# define __lzo_inline __inline +-#elif (LZO_CC_INTELC) +-# define __lzo_inline __inline +-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) +-# define __lzo_inline __inline +-#elif (LZO_CC_MSC && (_MSC_VER >= 900)) +-# define __lzo_inline __inline +-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) +-# define __lzo_inline __inline__ +-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +-# define __lzo_inline inline +-#endif +-#endif +-#if defined(__lzo_inline) +-# define __lzo_HAVE_inline 1 +-#else +-# define __lzo_inline /*empty*/ +-#endif +-#if !defined(__lzo_forceinline) +-#if (LZO_CC_GNUC >= 0x030200ul) +-# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) +-# define __lzo_forceinline __forceinline +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +-# define __lzo_forceinline __forceinline +-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) +-# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) +-#endif +-#endif +-#if defined(__lzo_forceinline) +-# define __lzo_HAVE_forceinline 1 +-#else +-# define __lzo_forceinline /*empty*/ +-#endif +-#if !defined(__lzo_noinline) +-#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) +-# define __lzo_noinline __attribute__((__noinline__,__used__)) +-#elif (LZO_CC_GNUC >= 0x030200ul) +-# define __lzo_noinline __attribute__((__noinline__)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC) +-# define __lzo_noinline __declspec(noinline) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_noinline __attribute__((__noinline__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_noinline __attribute__((__noinline__)) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) +-# define __lzo_noinline __declspec(noinline) +-#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) +-# if defined(__cplusplus) +-# else +-# define __lzo_noinline __declspec(noinline) +-# endif +-#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) +-# define __lzo_noinline __attribute__((__noinline__)) +-#endif +-#endif +-#if defined(__lzo_noinline) +-# define __lzo_HAVE_noinline 1 +-#else +-# define __lzo_noinline /*empty*/ +-#endif +-#if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline) +-# error "this should not happen" +-#endif +-#if !defined(__lzo_noreturn) +-#if (LZO_CC_GNUC >= 0x020700ul) +-# define __lzo_noreturn __attribute__((__noreturn__)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) +-# define __lzo_noreturn __declspec(noreturn) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_noreturn __attribute__((__noreturn__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_noreturn __attribute__((__noreturn__)) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) +-# define __lzo_noreturn __declspec(noreturn) +-#endif +-#endif +-#if defined(__lzo_noreturn) +-# define __lzo_HAVE_noreturn 1 +-#else +-# define __lzo_noreturn /*empty*/ +-#endif +-#if !defined(__lzo_nothrow) +-#if (LZO_CC_GNUC >= 0x030300ul) +-# define __lzo_nothrow __attribute__((__nothrow__)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus) +-# define __lzo_nothrow __declspec(nothrow) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 900) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_nothrow __attribute__((__nothrow__)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_nothrow __attribute__((__nothrow__)) +-#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) +-# define __lzo_nothrow __declspec(nothrow) +-#endif +-#endif +-#if defined(__lzo_nothrow) +-# define __lzo_HAVE_nothrow 1 +-#else +-# define __lzo_nothrow /*empty*/ +-#endif +-#if !defined(__lzo_restrict) +-#if (LZO_CC_GNUC >= 0x030400ul) +-# define __lzo_restrict __restrict__ +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) +-# define __lzo_restrict __restrict__ +-#elif (LZO_CC_CLANG || LZO_CC_LLVM) +-# define __lzo_restrict __restrict__ +-#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) +-# define __lzo_restrict __restrict +-#endif +-#endif +-#if defined(__lzo_restrict) +-# define __lzo_HAVE_restrict 1 +-#else +-# define __lzo_restrict /*empty*/ +-#endif +-#if !defined(__lzo_likely) && !defined(__lzo_unlikely) +-#if (LZO_CC_GNUC >= 0x030200ul) +-# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +-#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) +-# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +-#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define __lzo_likely(e) (__builtin_expect(!!(e),1)) +-# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) +-#endif +-#endif +-#if defined(__lzo_likely) +-# define __lzo_HAVE_likely 1 +-#else +-# define __lzo_likely(e) (e) +-#endif +-#if defined(__lzo_unlikely) +-# define __lzo_HAVE_unlikely 1 +-#else +-# define __lzo_unlikely(e) (e) +-#endif +-#if !defined(LZO_UNUSED) +-# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +-# define LZO_UNUSED(var) ((void) &var) +-# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) +-# define LZO_UNUSED(var) if (&var) ; else +-# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define LZO_UNUSED(var) ((void) var) +-# elif (LZO_CC_MSC && (_MSC_VER < 900)) +-# define LZO_UNUSED(var) if (&var) ; else +-# elif (LZO_CC_KEILC) +-# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} +-# elif (LZO_CC_PACIFICC) +-# define LZO_UNUSED(var) ((void) sizeof(var)) +-# elif (LZO_CC_WATCOMC) && defined(__cplusplus) +-# define LZO_UNUSED(var) ((void) var) +-# else +-# define LZO_UNUSED(var) ((void) &var) +-# endif +-#endif +-#if !defined(LZO_UNUSED_FUNC) +-# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) +-# define LZO_UNUSED_FUNC(func) ((void) func) +-# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) +-# define LZO_UNUSED_FUNC(func) if (func) ; else +-# elif (LZO_CC_CLANG || LZO_CC_LLVM) +-# define LZO_UNUSED_FUNC(func) ((void) &func) +-# elif (LZO_CC_MSC && (_MSC_VER < 900)) +-# define LZO_UNUSED_FUNC(func) if (func) ; else +-# elif (LZO_CC_MSC) +-# define LZO_UNUSED_FUNC(func) ((void) &func) +-# elif (LZO_CC_KEILC || LZO_CC_PELLESC) +-# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} +-# else +-# define LZO_UNUSED_FUNC(func) ((void) func) +-# endif +-#endif +-#if !defined(LZO_UNUSED_LABEL) +-# if (LZO_CC_WATCOMC) && defined(__cplusplus) +-# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +-# elif (LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC) +-# define LZO_UNUSED_LABEL(l) if (0) goto l +-# else +-# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l +-# endif +-#endif +-#if !defined(LZO_DEFINE_UNINITIALIZED_VAR) +-# if 0 +-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var +-# elif 0 && (LZO_CC_GNUC) +-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var +-# else +-# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init +-# endif +-#endif +-#if !defined(LZO_UNCONST_CAST) +-# if 0 && defined(__cplusplus) +-# define LZO_UNCONST_CAST(t,e) (const_cast (e)) +-# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) +-# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((lzo_uintptr_t) ((const void *) (e)))))) +-# else +-# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((const void *) (e))))) +-# endif +-#endif +-#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) +-# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) +-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +-# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) +-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; +-# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; +-# else +-# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; +-# endif +-#endif +-#if !defined(LZO_COMPILE_TIME_ASSERT) +-# if (LZO_CC_AZTECC) +-# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} +-# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +-# elif (LZO_CC_MSC && (_MSC_VER < 900)) +-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +-# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) +-# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; +-# else +-# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} +-# endif +-#endif +-#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) +-# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) +-# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) +-# define __lzo_cdecl __cdecl +-# define __lzo_cdecl_atexit /*empty*/ +-# define __lzo_cdecl_main __cdecl +-# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +-# define __lzo_cdecl_qsort __pascal +-# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +-# define __lzo_cdecl_qsort _stdcall +-# else +-# define __lzo_cdecl_qsort __cdecl +-# endif +-# elif (LZO_CC_WATCOMC) +-# define __lzo_cdecl __cdecl +-# else +-# define __lzo_cdecl __cdecl +-# define __lzo_cdecl_atexit __cdecl +-# define __lzo_cdecl_main __cdecl +-# define __lzo_cdecl_qsort __cdecl +-# endif +-# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) +-# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) +-# define __lzo_cdecl_sighandler __pascal +-# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) +-# define __lzo_cdecl_sighandler _stdcall +-# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) +-# define __lzo_cdecl_sighandler __clrcall +-# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) +-# if defined(_DLL) +-# define __lzo_cdecl_sighandler _far _cdecl _loadds +-# elif defined(_MT) +-# define __lzo_cdecl_sighandler _far _cdecl +-# else +-# define __lzo_cdecl_sighandler _cdecl +-# endif +-# else +-# define __lzo_cdecl_sighandler __cdecl +-# endif +-#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) +-# define __lzo_cdecl __cdecl +-#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) +-# define __lzo_cdecl cdecl +-#endif +-#if !defined(__lzo_cdecl) +-# define __lzo_cdecl /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_atexit) +-# define __lzo_cdecl_atexit /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_main) +-# define __lzo_cdecl_main /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_qsort) +-# define __lzo_cdecl_qsort /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_sighandler) +-# define __lzo_cdecl_sighandler /*empty*/ +-#endif +-#if !defined(__lzo_cdecl_va) +-# define __lzo_cdecl_va __lzo_cdecl +-#endif +-#if !(LZO_CFG_NO_WINDOWS_H) +-#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) +-# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) +-# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) +-# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) +-# else +-# define LZO_HAVE_WINDOWS_H 1 +-# endif +-#endif +-#endif +-#if (LZO_ARCH_ALPHA) +-# define LZO_OPT_AVOID_UINT_INDEX 1 +-# define LZO_OPT_AVOID_SHORT 1 +-# define LZO_OPT_AVOID_USHORT 1 +-#elif (LZO_ARCH_AMD64) +-# define LZO_OPT_AVOID_INT_INDEX 1 +-# define LZO_OPT_AVOID_UINT_INDEX 1 +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-# define LZO_OPT_UNALIGNED64 1 +-#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) +-#elif (LZO_ARCH_ARM) +-# define LZO_OPT_AVOID_SHORT 1 +-# define LZO_OPT_AVOID_USHORT 1 +-#elif (LZO_ARCH_CRIS) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-#elif (LZO_ARCH_I386) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-#elif (LZO_ARCH_IA64) +-# define LZO_OPT_AVOID_INT_INDEX 1 +-# define LZO_OPT_AVOID_UINT_INDEX 1 +-# define LZO_OPT_PREFER_POSTINC 1 +-#elif (LZO_ARCH_M68K) +-# define LZO_OPT_PREFER_POSTINC 1 +-# define LZO_OPT_PREFER_PREDEC 1 +-# if defined(__mc68020__) && !defined(__mcoldfire__) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-# endif +-#elif (LZO_ARCH_MIPS) +-# define LZO_OPT_AVOID_UINT_INDEX 1 +-#elif (LZO_ARCH_POWERPC) +-# define LZO_OPT_PREFER_PREINC 1 +-# define LZO_OPT_PREFER_PREDEC 1 +-# if (LZO_ABI_BIG_ENDIAN) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-# endif +-#elif (LZO_ARCH_S390) +-# define LZO_OPT_UNALIGNED16 1 +-# define LZO_OPT_UNALIGNED32 1 +-# if (LZO_SIZEOF_SIZE_T == 8) +-# define LZO_OPT_UNALIGNED64 1 +-# endif +-#elif (LZO_ARCH_SH) +-# define LZO_OPT_PREFER_POSTINC 1 +-# define LZO_OPT_PREFER_PREDEC 1 +-#endif +-#ifndef LZO_CFG_NO_INLINE_ASM +-#if (LZO_CC_LLVM) +-# define LZO_CFG_NO_INLINE_ASM 1 +-#endif +-#endif +-#ifndef LZO_CFG_NO_UNALIGNED +-#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) +-# define LZO_CFG_NO_UNALIGNED 1 +-#endif +-#endif +-#if (LZO_CFG_NO_UNALIGNED) +-# undef LZO_OPT_UNALIGNED16 +-# undef LZO_OPT_UNALIGNED32 +-# undef LZO_OPT_UNALIGNED64 +-#endif +-#if (LZO_CFG_NO_INLINE_ASM) +-#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +-# define LZO_ASM_SYNTAX_MSC 1 +-#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) +-#elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul)) +-#elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +-# define LZO_ASM_SYNTAX_GNUC 1 +-#elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) +-# define LZO_ASM_SYNTAX_GNUC 1 +-#endif +-#if (LZO_ASM_SYNTAX_GNUC) +-#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) +-# define __LZO_ASM_CLOBBER "ax" +-#elif (LZO_CC_INTELC) +-# define __LZO_ASM_CLOBBER "memory" +-#else +-# define __LZO_ASM_CLOBBER "cc", "memory" +-#endif +-#endif +-#if defined(__LZO_INFOSTR_MM) +-#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) +-# define __LZO_INFOSTR_MM "" +-#elif defined(LZO_INFO_MM) +-# define __LZO_INFOSTR_MM "." LZO_INFO_MM +-#else +-# define __LZO_INFOSTR_MM "" +-#endif +-#if defined(__LZO_INFOSTR_PM) +-#elif defined(LZO_INFO_ABI_PM) +-# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM +-#else +-# define __LZO_INFOSTR_PM "" +-#endif +-#if defined(__LZO_INFOSTR_ENDIAN) +-#elif defined(LZO_INFO_ABI_ENDIAN) +-# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN +-#else +-# define __LZO_INFOSTR_ENDIAN "" +-#endif +-#if defined(__LZO_INFOSTR_OSNAME) +-#elif defined(LZO_INFO_OS_CONSOLE) +-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE +-#elif defined(LZO_INFO_OS_POSIX) +-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX +-#else +-# define __LZO_INFOSTR_OSNAME LZO_INFO_OS +-#endif +-#if defined(__LZO_INFOSTR_LIBC) +-#elif defined(LZO_INFO_LIBC) +-# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC +-#else +-# define __LZO_INFOSTR_LIBC "" +-#endif +-#if defined(__LZO_INFOSTR_CCVER) +-#elif defined(LZO_INFO_CCVER) +-# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER +-#else +-# define __LZO_INFOSTR_CCVER "" +-#endif +-#define LZO_INFO_STRING \ +- LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ +- " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER +- +-#endif +- +-#endif +- +-#undef LZO_HAVE_CONFIG_H +-#include "minilzo.h" +- +-#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2040) +-# error "version mismatch in miniLZO source files" +-#endif +- +-#ifdef MINILZO_HAVE_CONFIG_H +-# define LZO_HAVE_CONFIG_H 1 +-#endif +- +-#ifndef __LZO_CONF_H +-#define __LZO_CONF_H 1 +- +-#if !defined(__LZO_IN_MINILZO) +-#if (LZO_CFG_FREESTANDING) +-# define LZO_LIBC_FREESTANDING 1 +-# define LZO_OS_FREESTANDING 1 +-# define ACC_LIBC_FREESTANDING 1 +-# define ACC_OS_FREESTANDING 1 +-#endif +-#if (LZO_CFG_NO_UNALIGNED) +-# define ACC_CFG_NO_UNALIGNED 1 +-#endif +-#if (LZO_ARCH_GENERIC) +-# define ACC_ARCH_GENERIC 1 +-#endif +-#if (LZO_ABI_NEUTRAL_ENDIAN) +-# define ACC_ABI_NEUTRAL_ENDIAN 1 +-#endif +-#if (LZO_HAVE_CONFIG_H) +-# define ACC_CONFIG_NO_HEADER 1 +-#endif +-#if defined(LZO_CFG_EXTRA_CONFIG_HEADER) +-# include LZO_CFG_EXTRA_CONFIG_HEADER +-#endif +-#if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED) +-# error "include this file first" +-#endif +-#include "lzo/lzoconf.h" +-#endif +- +-#if (LZO_VERSION < 0x02000) || !defined(__LZOCONF_H_INCLUDED) +-# error "version mismatch" +-#endif +- +-#if (LZO_CC_BORLANDC && LZO_ARCH_I086) +-# pragma option -h +-#endif +- +-#if (LZO_CC_MSC && (_MSC_VER >= 1000)) +-# pragma warning(disable: 4127 4701) +-#endif +-#if (LZO_CC_MSC && (_MSC_VER >= 1300)) +-# pragma warning(disable: 4820) +-# pragma warning(disable: 4514 4710 4711) +-#endif +- +-#if (LZO_CC_SUNPROC) +-#if !defined(__cplusplus) +-# pragma error_messages(off,E_END_OF_LOOP_CODE_NOT_REACHED) +-# pragma error_messages(off,E_LOOP_NOT_ENTERED_AT_TOP) +-# pragma error_messages(off,E_STATEMENT_NOT_REACHED) +-#endif +-#endif +- +-#if (__LZO_MMODEL_HUGE) && !(LZO_HAVE_MM_HUGE_PTR) +-# error "this should not happen - check defines for __huge" +-#endif +- +-#if defined(__LZO_IN_MINILZO) || defined(LZO_CFG_FREESTANDING) +-#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) +-# define ACC_WANT_ACC_INCD_H 1 +-# define ACC_WANT_ACC_INCE_H 1 +-# define ACC_WANT_ACC_INCI_H 1 +-#elif 1 +-# include +-#else +-# define ACC_WANT_ACC_INCD_H 1 +-#endif +- +-#if (LZO_ARCH_I086) +-# define ACC_MM_AHSHIFT LZO_MM_AHSHIFT +-# define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0]) +-# define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1]) +-# define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o))) +-#endif +- +-#if !defined(lzo_uintptr_t) +-# if defined(__LZO_MMODEL_HUGE) +-# define lzo_uintptr_t unsigned long +-# elif 1 && defined(LZO_OS_OS400) && (LZO_SIZEOF_VOID_P == 16) +-# define __LZO_UINTPTR_T_IS_POINTER 1 +- typedef char* lzo_uintptr_t; +-# define lzo_uintptr_t lzo_uintptr_t +-# elif (LZO_SIZEOF_SIZE_T == LZO_SIZEOF_VOID_P) +-# define lzo_uintptr_t size_t +-# elif (LZO_SIZEOF_LONG == LZO_SIZEOF_VOID_P) +-# define lzo_uintptr_t unsigned long +-# elif (LZO_SIZEOF_INT == LZO_SIZEOF_VOID_P) +-# define lzo_uintptr_t unsigned int +-# elif (LZO_SIZEOF_LONG_LONG == LZO_SIZEOF_VOID_P) +-# define lzo_uintptr_t unsigned long long +-# else +-# define lzo_uintptr_t size_t +-# endif +-#endif +-LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) +- +-#if 1 && !defined(LZO_CFG_FREESTANDING) +-#if 1 && !defined(HAVE_STRING_H) +-#define HAVE_STRING_H 1 +-#endif +-#if 1 && !defined(HAVE_MEMCMP) +-#define HAVE_MEMCMP 1 +-#endif +-#if 1 && !defined(HAVE_MEMCPY) +-#define HAVE_MEMCPY 1 +-#endif +-#if 1 && !defined(HAVE_MEMMOVE) +-#define HAVE_MEMMOVE 1 +-#endif +-#if 1 && !defined(HAVE_MEMSET) +-#define HAVE_MEMSET 1 +-#endif +-#endif +- +-#if 1 && defined(HAVE_STRING_H) +-#include +-#endif +- +-#if (LZO_CFG_FREESTANDING) +-# undef HAVE_MEMCMP +-# undef HAVE_MEMCPY +-# undef HAVE_MEMMOVE +-# undef HAVE_MEMSET +-#endif +- +-#if !(HAVE_MEMCMP) +-# undef memcmp +-# define memcmp(a,b,c) lzo_memcmp(a,b,c) +-#elif !(__LZO_MMODEL_HUGE) +-# undef lzo_memcmp +-# define lzo_memcmp(a,b,c) memcmp(a,b,c) +-#endif +-#if !(HAVE_MEMCPY) +-# undef memcpy +-# define memcpy(a,b,c) lzo_memcpy(a,b,c) +-#elif !(__LZO_MMODEL_HUGE) +-# undef lzo_memcpy +-# define lzo_memcpy(a,b,c) memcpy(a,b,c) +-#endif +-#if !(HAVE_MEMMOVE) +-# undef memmove +-# define memmove(a,b,c) lzo_memmove(a,b,c) +-#elif !(__LZO_MMODEL_HUGE) +-# undef lzo_memmove +-# define lzo_memmove(a,b,c) memmove(a,b,c) +-#endif +-#if !(HAVE_MEMSET) +-# undef memset +-# define memset(a,b,c) lzo_memset(a,b,c) +-#elif !(__LZO_MMODEL_HUGE) +-# undef lzo_memset +-# define lzo_memset(a,b,c) memset(a,b,c) +-#endif +- +-#undef NDEBUG +-#if (LZO_CFG_FREESTANDING) +-# undef LZO_DEBUG +-# define NDEBUG 1 +-# undef assert +-# define assert(e) ((void)0) +-#else +-# if !defined(LZO_DEBUG) +-# define NDEBUG 1 +-# endif +-# include +-#endif +- +-#if 0 && defined(__BOUNDS_CHECKING_ON) +-# include +-#else +-# define BOUNDS_CHECKING_OFF_DURING(stmt) stmt +-# define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr) +-#endif +- +-#if !defined(__lzo_inline) +-# define __lzo_inline /*empty*/ +-#endif +-#if !defined(__lzo_forceinline) +-# define __lzo_forceinline /*empty*/ +-#endif +-#if !defined(__lzo_noinline) +-# define __lzo_noinline /*empty*/ +-#endif +- +-#if (LZO_CFG_PGO) +-# undef __acc_likely +-# undef __acc_unlikely +-# undef __lzo_likely +-# undef __lzo_unlikely +-# define __acc_likely(e) (e) +-# define __acc_unlikely(e) (e) +-# define __lzo_likely(e) (e) +-# define __lzo_unlikely(e) (e) +-#endif +- +-#if 1 +-# define LZO_BYTE(x) ((unsigned char) (x)) +-#else +-# define LZO_BYTE(x) ((unsigned char) ((x) & 0xff)) +-#endif +- +-#define LZO_MAX(a,b) ((a) >= (b) ? (a) : (b)) +-#define LZO_MIN(a,b) ((a) <= (b) ? (a) : (b)) +-#define LZO_MAX3(a,b,c) ((a) >= (b) ? LZO_MAX(a,c) : LZO_MAX(b,c)) +-#define LZO_MIN3(a,b,c) ((a) <= (b) ? LZO_MIN(a,c) : LZO_MIN(b,c)) +- +-#define lzo_sizeof(type) ((lzo_uint) (sizeof(type))) +- +-#define LZO_HIGH(array) ((lzo_uint) (sizeof(array)/sizeof(*(array)))) +- +-#define LZO_SIZE(bits) (1u << (bits)) +-#define LZO_MASK(bits) (LZO_SIZE(bits) - 1) +- +-#define LZO_LSIZE(bits) (1ul << (bits)) +-#define LZO_LMASK(bits) (LZO_LSIZE(bits) - 1) +- +-#define LZO_USIZE(bits) ((lzo_uint) 1 << (bits)) +-#define LZO_UMASK(bits) (LZO_USIZE(bits) - 1) +- +-#if !defined(DMUL) +-#if 0 +- +-# define DMUL(a,b) ((lzo_xint) ((lzo_uint32)(a) * (lzo_uint32)(b))) +-#else +-# define DMUL(a,b) ((lzo_xint) ((a) * (b))) +-#endif +-#endif +- +-#if 1 && !(LZO_CFG_NO_UNALIGNED) +-#if 1 && (LZO_ARCH_AMD64 || LZO_ARCH_I386 || LZO_ARCH_POWERPC) +-# if (LZO_SIZEOF_SHORT == 2) +-# define LZO_UNALIGNED_OK_2 1 +-# endif +-# if (LZO_SIZEOF_INT == 4) +-# define LZO_UNALIGNED_OK_4 1 +-# endif +-#endif +-#endif +- +-#if defined(LZO_UNALIGNED_OK_2) +- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(short) == 2) +-#endif +-#if defined(LZO_UNALIGNED_OK_4) +- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) +-#elif defined(LZO_ALIGNED_OK_4) +- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) +-#endif +- +-#undef COPY4 +-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +-# if 1 && defined(ACC_UA_COPY32) +-# define COPY4(d,s) ACC_UA_COPY32(d,s) +-# else +-# define COPY4(d,s) (* (__lzo_ua_volatile lzo_uint32p)(__lzo_ua_volatile lzo_voidp)(d) = * (__lzo_ua_volatile const lzo_uint32p)(__lzo_ua_volatile const lzo_voidp)(s)) +-# endif +-#endif +- +-#define MEMCPY8_DS(dest,src,len) \ +- lzo_memcpy(dest,src,len); dest += len; src += len +- +-#define BZERO8_PTR(s,l,n) \ +- lzo_memset((lzo_voidp)(s),0,(lzo_uint)(l)*(n)) +- +-#define MEMCPY_DS(dest,src,len) \ +- do *dest++ = *src++; while (--len > 0) +- +-LZO_EXTERN(const lzo_bytep) lzo_copyright(void); +- +-#ifndef __LZO_PTR_H +-#define __LZO_PTR_H 1 +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-#if !defined(lzo_uintptr_t) +-# if (__LZO_MMODEL_HUGE) +-# define lzo_uintptr_t unsigned long +-# else +-# define lzo_uintptr_t acc_uintptr_t +-# ifdef __ACC_INTPTR_T_IS_POINTER +-# define __LZO_UINTPTR_T_IS_POINTER 1 +-# endif +-# endif +-#endif +- +-#if (LZO_ARCH_I086) +-#define PTR(a) ((lzo_bytep) (a)) +-#define PTR_ALIGNED_4(a) ((ACC_PTR_FP_OFF(a) & 3) == 0) +-#define PTR_ALIGNED2_4(a,b) (((ACC_PTR_FP_OFF(a) | ACC_PTR_FP_OFF(b)) & 3) == 0) +-#elif (LZO_MM_PVP) +-#define PTR(a) ((lzo_bytep) (a)) +-#define PTR_ALIGNED_8(a) ((((lzo_uintptr_t)(a)) >> 61) == 0) +-#define PTR_ALIGNED2_8(a,b) ((((lzo_uintptr_t)(a)|(lzo_uintptr_t)(b)) >> 61) == 0) +-#else +-#define PTR(a) ((lzo_uintptr_t) (a)) +-#define PTR_LINEAR(a) PTR(a) +-#define PTR_ALIGNED_4(a) ((PTR_LINEAR(a) & 3) == 0) +-#define PTR_ALIGNED_8(a) ((PTR_LINEAR(a) & 7) == 0) +-#define PTR_ALIGNED2_4(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 3) == 0) +-#define PTR_ALIGNED2_8(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 7) == 0) +-#endif +- +-#define PTR_LT(a,b) (PTR(a) < PTR(b)) +-#define PTR_GE(a,b) (PTR(a) >= PTR(b)) +-#define PTR_DIFF(a,b) (PTR(a) - PTR(b)) +-#define pd(a,b) ((lzo_uint) ((a)-(b))) +- +-LZO_EXTERN(lzo_uintptr_t) +-__lzo_ptr_linear(const lzo_voidp ptr); +- +-typedef union +-{ +- char a_char; +- unsigned char a_uchar; +- short a_short; +- unsigned short a_ushort; +- int a_int; +- unsigned int a_uint; +- long a_long; +- unsigned long a_ulong; +- lzo_int a_lzo_int; +- lzo_uint a_lzo_uint; +- lzo_int32 a_lzo_int32; +- lzo_uint32 a_lzo_uint32; +- ptrdiff_t a_ptrdiff_t; +- lzo_uintptr_t a_lzo_uintptr_t; +- lzo_voidp a_lzo_voidp; +- void * a_void_p; +- lzo_bytep a_lzo_bytep; +- lzo_bytepp a_lzo_bytepp; +- lzo_uintp a_lzo_uintp; +- lzo_uint * a_lzo_uint_p; +- lzo_uint32p a_lzo_uint32p; +- lzo_uint32 * a_lzo_uint32_p; +- unsigned char * a_uchar_p; +- char * a_char_p; +-} +-lzo_full_align_t; +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif +- +-#define LZO_DETERMINISTIC 1 +- +-#define LZO_DICT_USE_PTR 1 +-#if 0 && (LZO_ARCH_I086) +-# undef LZO_DICT_USE_PTR +-#endif +- +-#if (LZO_DICT_USE_PTR) +-# define lzo_dict_t const lzo_bytep +-# define lzo_dict_p lzo_dict_t __LZO_MMODEL * +-#else +-# define lzo_dict_t lzo_uint +-# define lzo_dict_p lzo_dict_t __LZO_MMODEL * +-#endif +- +-#endif +- +-#if !defined(MINILZO_CFG_SKIP_LZO_PTR) +- +-LZO_PUBLIC(lzo_uintptr_t) +-__lzo_ptr_linear(const lzo_voidp ptr) +-{ +- lzo_uintptr_t p; +- +-#if (LZO_ARCH_I086) +- p = (((lzo_uintptr_t)(ACC_PTR_FP_SEG(ptr))) << (16 - ACC_MM_AHSHIFT)) + (ACC_PTR_FP_OFF(ptr)); +-#elif (LZO_MM_PVP) +- p = (lzo_uintptr_t) (ptr); +- p = (p << 3) | (p >> 61); +-#else +- p = (lzo_uintptr_t) PTR_LINEAR(ptr); +-#endif +- +- return p; +-} +- +-LZO_PUBLIC(unsigned) +-__lzo_align_gap(const lzo_voidp ptr, lzo_uint size) +-{ +-#if defined(__LZO_UINTPTR_T_IS_POINTER) +- size_t n = (size_t) ptr; +- n = (((n + size - 1) / size) * size) - n; +-#else +- lzo_uintptr_t p, n; +- p = __lzo_ptr_linear(ptr); +- n = (((p + size - 1) / size) * size) - p; +-#endif +- +- assert(size > 0); +- assert((long)n >= 0); +- assert(n <= size); +- return (unsigned)n; +-} +- +-#endif +-#if !defined(MINILZO_CFG_SKIP_LZO_UTIL) +- +-/* If you use the LZO library in a product, I would appreciate that you +- * keep this copyright string in the executable of your product. +- */ +- +-static const char __lzo_copyright[] = +-#if !defined(__LZO_IN_MINLZO) +- LZO_VERSION_STRING; +-#else +- "\r\n\n" +- "LZO data compression library.\n" +- "$Copyright: LZO Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer\n" +- "\n" +- "http://www.oberhumer.com $\n\n" +- "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n" +- "$Info: " LZO_INFO_STRING " $\n"; +-#endif +- +-LZO_PUBLIC(const lzo_bytep) +-lzo_copyright(void) +-{ +-#if (LZO_OS_DOS16 && LZO_CC_TURBOC) +- return (lzo_voidp) __lzo_copyright; +-#else +- return (const lzo_bytep) __lzo_copyright; +-#endif +-} +- +-LZO_PUBLIC(unsigned) +-lzo_version(void) +-{ +- return LZO_VERSION; +-} +- +-LZO_PUBLIC(const char *) +-lzo_version_string(void) +-{ +- return LZO_VERSION_STRING; +-} +- +-LZO_PUBLIC(const char *) +-lzo_version_date(void) +-{ +- return LZO_VERSION_DATE; +-} +- +-LZO_PUBLIC(const lzo_charp) +-_lzo_version_string(void) +-{ +- return LZO_VERSION_STRING; +-} +- +-LZO_PUBLIC(const lzo_charp) +-_lzo_version_date(void) +-{ +- return LZO_VERSION_DATE; +-} +- +-#define LZO_BASE 65521u +-#define LZO_NMAX 5552 +- +-#define LZO_DO1(buf,i) s1 += buf[i]; s2 += s1 +-#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1); +-#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2); +-#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4); +-#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8); +- +-LZO_PUBLIC(lzo_uint32) +-lzo_adler32(lzo_uint32 adler, const lzo_bytep buf, lzo_uint len) +-{ +- lzo_uint32 s1 = adler & 0xffff; +- lzo_uint32 s2 = (adler >> 16) & 0xffff; +- unsigned k; +- +- if (buf == NULL) +- return 1; +- +- while (len > 0) +- { +- k = len < LZO_NMAX ? (unsigned) len : LZO_NMAX; +- len -= k; +- if (k >= 16) do +- { +- LZO_DO16(buf,0); +- buf += 16; +- k -= 16; +- } while (k >= 16); +- if (k != 0) do +- { +- s1 += *buf++; +- s2 += s1; +- } while (--k > 0); +- s1 %= LZO_BASE; +- s2 %= LZO_BASE; +- } +- return (s2 << 16) | s1; +-} +- +-#undef LZO_DO1 +-#undef LZO_DO2 +-#undef LZO_DO4 +-#undef LZO_DO8 +-#undef LZO_DO16 +- +-#endif +-#if !defined(MINILZO_CFG_SKIP_LZO_STRING) +-#undef lzo_memcmp +-#undef lzo_memcpy +-#undef lzo_memmove +-#undef lzo_memset +-#if !defined(__LZO_MMODEL_HUGE) +-# undef LZO_HAVE_MM_HUGE_PTR +-#endif +-#define lzo_hsize_t lzo_uint +-#define lzo_hvoid_p lzo_voidp +-#define lzo_hbyte_p lzo_bytep +-#define LZOLIB_PUBLIC(r,f) LZO_PUBLIC(r) f +-#define lzo_hmemcmp lzo_memcmp +-#define lzo_hmemcpy lzo_memcpy +-#define lzo_hmemmove lzo_memmove +-#define lzo_hmemset lzo_memset +-#define __LZOLIB_HMEMCPY_CH_INCLUDED 1 +-#if !defined(LZOLIB_PUBLIC) +-# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) +-#endif +-LZOLIB_PUBLIC(int, lzo_hmemcmp) (const lzo_hvoid_p s1, const lzo_hvoid_p s2, lzo_hsize_t len) +-{ +-#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCMP) +- const lzo_hbyte_p p1 = (const lzo_hbyte_p) s1; +- const lzo_hbyte_p p2 = (const lzo_hbyte_p) s2; +- if __lzo_likely(len > 0) do +- { +- int d = *p1 - *p2; +- if (d != 0) +- return d; +- p1++; p2++; +- } while __lzo_likely(--len > 0); +- return 0; +-#else +- return memcmp(s1, s2, len); +-#endif +-} +-LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemcpy) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) +-{ +-#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCPY) +- lzo_hbyte_p p1 = (lzo_hbyte_p) dest; +- const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; +- if (!(len > 0) || p1 == p2) +- return dest; +- do +- *p1++ = *p2++; +- while __lzo_likely(--len > 0); +- return dest; +-#else +- return memcpy(dest, src, len); +-#endif +-} +-LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemmove) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) +-{ +-#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMMOVE) +- lzo_hbyte_p p1 = (lzo_hbyte_p) dest; +- const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; +- if (!(len > 0) || p1 == p2) +- return dest; +- if (p1 < p2) +- { +- do +- *p1++ = *p2++; +- while __lzo_likely(--len > 0); +- } +- else +- { +- p1 += len; +- p2 += len; +- do +- *--p1 = *--p2; +- while __lzo_likely(--len > 0); +- } +- return dest; +-#else +- return memmove(dest, src, len); +-#endif +-} +-LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int c, lzo_hsize_t len) +-{ +-#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMSET) +- lzo_hbyte_p p = (lzo_hbyte_p) s; +- if __lzo_likely(len > 0) do +- *p++ = (unsigned char) c; +- while __lzo_likely(--len > 0); +- return s; +-#else +- return memset(s, c, len); +-#endif +-} +-#undef LZOLIB_PUBLIC +-#endif +-#if !defined(MINILZO_CFG_SKIP_LZO_INIT) +- +-#if !defined(__LZO_IN_MINILZO) +- +-#define ACC_WANT_ACC_CHK_CH 1 +-#undef ACCCHK_ASSERT +- +- ACCCHK_ASSERT_IS_SIGNED_T(lzo_int) +- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint) +- +- ACCCHK_ASSERT_IS_SIGNED_T(lzo_int32) +- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32) +- ACCCHK_ASSERT((LZO_UINT32_C(1) << (int)(8*sizeof(LZO_UINT32_C(1))-1)) > 0) +- ACCCHK_ASSERT(sizeof(lzo_uint32) >= 4) +- +-#if !defined(__LZO_UINTPTR_T_IS_POINTER) +- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uintptr_t) +-#endif +- ACCCHK_ASSERT(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) +- +- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_xint) +- ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint32)) +- ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint)) +- ACCCHK_ASSERT(sizeof(lzo_xint) == sizeof(lzo_uint32) || sizeof(lzo_xint) == sizeof(lzo_uint)) +- +-#endif +-#undef ACCCHK_ASSERT +- +-#if 0 +-#define u2p(ptr,off) ((lzo_voidp) (((lzo_bytep)(lzo_voidp)(ptr)) + (off))) +-#else +-static __lzo_noinline lzo_voidp u2p(lzo_voidp ptr, lzo_uint off) +-{ +- return (lzo_voidp) ((lzo_bytep) ptr + off); +-} +-#endif +- +-LZO_PUBLIC(int) +-_lzo_config_check(void) +-{ +- lzo_bool r = 1; +- union { +- lzo_xint a[2]; unsigned char b[2*sizeof(lzo_xint)]; +- unsigned short x[2]; lzo_uint32 y[2]; lzo_uint z[2]; +- } u; +- lzo_voidp p; +- +- u.a[0] = u.a[1] = 0; +- p = u2p(&u, 0); +- r &= ((* (lzo_bytep) p) == 0); +-#if !defined(LZO_CFG_NO_CONFIG_CHECK) +-#if defined(LZO_ABI_BIG_ENDIAN) +- u.a[0] = u.a[1] = 0; u.b[sizeof(lzo_uint) - 1] = 128; +- p = u2p(&u, 0); +- r &= ((* (lzo_uintp) p) == 128); +-#endif +-#if defined(LZO_ABI_LITTLE_ENDIAN) +- u.a[0] = u.a[1] = 0; u.b[0] = 128; +- p = u2p(&u, 0); +- r &= ((* (lzo_uintp) p) == 128); +-#endif +-#if defined(LZO_UNALIGNED_OK_2) +- u.a[0] = u.a[1] = 0; +- u.b[0] = 1; u.b[sizeof(unsigned short) + 1] = 2; +- p = u2p(&u, 1); +- r &= ((* (lzo_ushortp) p) == 0); +-#endif +-#if defined(LZO_UNALIGNED_OK_4) +- u.a[0] = u.a[1] = 0; +- u.b[0] = 3; u.b[sizeof(lzo_uint32) + 1] = 4; +- p = u2p(&u, 1); +- r &= ((* (lzo_uint32p) p) == 0); +-#endif +-#endif +- +- return r == 1 ? LZO_E_OK : LZO_E_ERROR; +-} +- +-LZO_PUBLIC(int) +-__lzo_init_v2(unsigned v, int s1, int s2, int s3, int s4, int s5, +- int s6, int s7, int s8, int s9) +-{ +- int r; +- +-#if defined(__LZO_IN_MINILZO) +-#elif (LZO_CC_MSC && ((_MSC_VER) < 700)) +-#else +-#define ACC_WANT_ACC_CHK_CH 1 +-#undef ACCCHK_ASSERT +-#define ACCCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr) +-#endif +-#undef ACCCHK_ASSERT +- +- if (v == 0) +- return LZO_E_ERROR; +- +- r = (s1 == -1 || s1 == (int) sizeof(short)) && +- (s2 == -1 || s2 == (int) sizeof(int)) && +- (s3 == -1 || s3 == (int) sizeof(long)) && +- (s4 == -1 || s4 == (int) sizeof(lzo_uint32)) && +- (s5 == -1 || s5 == (int) sizeof(lzo_uint)) && +- (s6 == -1 || s6 == (int) lzo_sizeof_dict_t) && +- (s7 == -1 || s7 == (int) sizeof(char *)) && +- (s8 == -1 || s8 == (int) sizeof(lzo_voidp)) && +- (s9 == -1 || s9 == (int) sizeof(lzo_callback_t)); +- if (!r) +- return LZO_E_ERROR; +- +- r = _lzo_config_check(); +- if (r != LZO_E_OK) +- return r; +- +- return r; +-} +- +-#if !defined(__LZO_IN_MINILZO) +- +-#if (LZO_OS_WIN16 && LZO_CC_WATCOMC) && defined(__SW_BD) +- +-#if 0 +-BOOL FAR PASCAL LibMain ( HANDLE hInstance, WORD wDataSegment, +- WORD wHeapSize, LPSTR lpszCmdLine ) +-#else +-int __far __pascal LibMain ( int a, short b, short c, long d ) +-#endif +-{ +- LZO_UNUSED(a); LZO_UNUSED(b); LZO_UNUSED(c); LZO_UNUSED(d); +- return 1; +-} +- +-#endif +- +-#endif +- +-#endif +- +-#define LZO1X 1 +-#define LZO_EOF_CODE 1 +-#define M2_MAX_OFFSET 0x0800 +- +-#if !defined(MINILZO_CFG_SKIP_LZO1X_1_COMPRESS) +- +-#define LZO_NEED_DICT_H 1 +-#define D_BITS 14 +-#define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5) +-#define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f) +- +-#ifndef __LZO_CONFIG1X_H +-#define __LZO_CONFIG1X_H 1 +- +-#if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z) +-# define LZO1X 1 +-#endif +- +-#if !defined(__LZO_IN_MINILZO) +-#include "lzo/lzo1x.h" +-#endif +- +-#ifndef LZO_EOF_CODE +-#define LZO_EOF_CODE 1 +-#endif +-#undef LZO_DETERMINISTIC +- +-#define M1_MAX_OFFSET 0x0400 +-#ifndef M2_MAX_OFFSET +-#define M2_MAX_OFFSET 0x0800 +-#endif +-#define M3_MAX_OFFSET 0x4000 +-#define M4_MAX_OFFSET 0xbfff +- +-#define MX_MAX_OFFSET (M1_MAX_OFFSET + M2_MAX_OFFSET) +- +-#define M1_MIN_LEN 2 +-#define M1_MAX_LEN 2 +-#define M2_MIN_LEN 3 +-#ifndef M2_MAX_LEN +-#define M2_MAX_LEN 8 +-#endif +-#define M3_MIN_LEN 3 +-#define M3_MAX_LEN 33 +-#define M4_MIN_LEN 3 +-#define M4_MAX_LEN 9 +- +-#define M1_MARKER 0 +-#define M2_MARKER 64 +-#define M3_MARKER 32 +-#define M4_MARKER 16 +- +-#ifndef MIN_LOOKAHEAD +-#define MIN_LOOKAHEAD (M2_MAX_LEN + 1) +-#endif +- +-#if defined(LZO_NEED_DICT_H) +- +-#ifndef LZO_HASH +-#define LZO_HASH LZO_HASH_LZO_INCREMENTAL_B +-#endif +-#define DL_MIN_LEN M2_MIN_LEN +- +-#ifndef __LZO_DICT_H +-#define __LZO_DICT_H 1 +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-#if !defined(D_BITS) && defined(DBITS) +-# define D_BITS DBITS +-#endif +-#if !defined(D_BITS) +-# error "D_BITS is not defined" +-#endif +-#if (D_BITS < 16) +-# define D_SIZE LZO_SIZE(D_BITS) +-# define D_MASK LZO_MASK(D_BITS) +-#else +-# define D_SIZE LZO_USIZE(D_BITS) +-# define D_MASK LZO_UMASK(D_BITS) +-#endif +-#define D_HIGH ((D_MASK >> 1) + 1) +- +-#if !defined(DD_BITS) +-# define DD_BITS 0 +-#endif +-#define DD_SIZE LZO_SIZE(DD_BITS) +-#define DD_MASK LZO_MASK(DD_BITS) +- +-#if !defined(DL_BITS) +-# define DL_BITS (D_BITS - DD_BITS) +-#endif +-#if (DL_BITS < 16) +-# define DL_SIZE LZO_SIZE(DL_BITS) +-# define DL_MASK LZO_MASK(DL_BITS) +-#else +-# define DL_SIZE LZO_USIZE(DL_BITS) +-# define DL_MASK LZO_UMASK(DL_BITS) +-#endif +- +-#if (D_BITS != DL_BITS + DD_BITS) +-# error "D_BITS does not match" +-#endif +-#if (D_BITS < 6 || D_BITS > 18) +-# error "invalid D_BITS" +-#endif +-#if (DL_BITS < 6 || DL_BITS > 20) +-# error "invalid DL_BITS" +-#endif +-#if (DD_BITS < 0 || DD_BITS > 6) +-# error "invalid DD_BITS" +-#endif +- +-#if !defined(DL_MIN_LEN) +-# define DL_MIN_LEN 3 +-#endif +-#if !defined(DL_SHIFT) +-# define DL_SHIFT ((DL_BITS + (DL_MIN_LEN - 1)) / DL_MIN_LEN) +-#endif +- +-#define LZO_HASH_GZIP 1 +-#define LZO_HASH_GZIP_INCREMENTAL 2 +-#define LZO_HASH_LZO_INCREMENTAL_A 3 +-#define LZO_HASH_LZO_INCREMENTAL_B 4 +- +-#if !defined(LZO_HASH) +-# error "choose a hashing strategy" +-#endif +- +-#undef DM +-#undef DX +- +-#if (DL_MIN_LEN == 3) +-# define _DV2_A(p,shift1,shift2) \ +- (((( (lzo_xint)((p)[0]) << shift1) ^ (p)[1]) << shift2) ^ (p)[2]) +-# define _DV2_B(p,shift1,shift2) \ +- (((( (lzo_xint)((p)[2]) << shift1) ^ (p)[1]) << shift2) ^ (p)[0]) +-# define _DV3_B(p,shift1,shift2,shift3) \ +- ((_DV2_B((p)+1,shift1,shift2) << (shift3)) ^ (p)[0]) +-#elif (DL_MIN_LEN == 2) +-# define _DV2_A(p,shift1,shift2) \ +- (( (lzo_xint)(p[0]) << shift1) ^ p[1]) +-# define _DV2_B(p,shift1,shift2) \ +- (( (lzo_xint)(p[1]) << shift1) ^ p[2]) +-#else +-# error "invalid DL_MIN_LEN" +-#endif +-#define _DV_A(p,shift) _DV2_A(p,shift,shift) +-#define _DV_B(p,shift) _DV2_B(p,shift,shift) +-#define DA2(p,s1,s2) \ +- (((((lzo_xint)((p)[2]) << (s2)) + (p)[1]) << (s1)) + (p)[0]) +-#define DS2(p,s1,s2) \ +- (((((lzo_xint)((p)[2]) << (s2)) - (p)[1]) << (s1)) - (p)[0]) +-#define DX2(p,s1,s2) \ +- (((((lzo_xint)((p)[2]) << (s2)) ^ (p)[1]) << (s1)) ^ (p)[0]) +-#define DA3(p,s1,s2,s3) ((DA2((p)+1,s2,s3) << (s1)) + (p)[0]) +-#define DS3(p,s1,s2,s3) ((DS2((p)+1,s2,s3) << (s1)) - (p)[0]) +-#define DX3(p,s1,s2,s3) ((DX2((p)+1,s2,s3) << (s1)) ^ (p)[0]) +-#define DMS(v,s) ((lzo_uint) (((v) & (D_MASK >> (s))) << (s))) +-#define DM(v) DMS(v,0) +- +-#if (LZO_HASH == LZO_HASH_GZIP) +-# define _DINDEX(dv,p) (_DV_A((p),DL_SHIFT)) +- +-#elif (LZO_HASH == LZO_HASH_GZIP_INCREMENTAL) +-# define __LZO_HASH_INCREMENTAL 1 +-# define DVAL_FIRST(dv,p) dv = _DV_A((p),DL_SHIFT) +-# define DVAL_NEXT(dv,p) dv = (((dv) << DL_SHIFT) ^ p[2]) +-# define _DINDEX(dv,p) (dv) +-# define DVAL_LOOKAHEAD DL_MIN_LEN +- +-#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_A) +-# define __LZO_HASH_INCREMENTAL 1 +-# define DVAL_FIRST(dv,p) dv = _DV_A((p),5) +-# define DVAL_NEXT(dv,p) \ +- dv ^= (lzo_xint)(p[-1]) << (2*5); dv = (((dv) << 5) ^ p[2]) +-# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) +-# define DVAL_LOOKAHEAD DL_MIN_LEN +- +-#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_B) +-# define __LZO_HASH_INCREMENTAL 1 +-# define DVAL_FIRST(dv,p) dv = _DV_B((p),5) +-# define DVAL_NEXT(dv,p) \ +- dv ^= p[-1]; dv = (((dv) >> 5) ^ ((lzo_xint)(p[2]) << (2*5))) +-# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) +-# define DVAL_LOOKAHEAD DL_MIN_LEN +- +-#else +-# error "choose a hashing strategy" +-#endif +- +-#ifndef DINDEX +-#define DINDEX(dv,p) ((lzo_uint)((_DINDEX(dv,p)) & DL_MASK) << DD_BITS) +-#endif +-#if !defined(DINDEX1) && defined(D_INDEX1) +-#define DINDEX1 D_INDEX1 +-#endif +-#if !defined(DINDEX2) && defined(D_INDEX2) +-#define DINDEX2 D_INDEX2 +-#endif +- +-#if !defined(__LZO_HASH_INCREMENTAL) +-# define DVAL_FIRST(dv,p) ((void) 0) +-# define DVAL_NEXT(dv,p) ((void) 0) +-# define DVAL_LOOKAHEAD 0 +-#endif +- +-#if !defined(DVAL_ASSERT) +-#if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG) +-#if (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_LLVM) +-static void __attribute__((__unused__)) +-#else +-static void +-#endif +-DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) +-{ +- lzo_xint df; +- DVAL_FIRST(df,(p)); +- assert(DINDEX(dv,p) == DINDEX(df,p)); +-} +-#else +-# define DVAL_ASSERT(dv,p) ((void) 0) +-#endif +-#endif +- +-#if defined(LZO_DICT_USE_PTR) +-# define DENTRY(p,in) (p) +-# define GINDEX(m_pos,m_off,dict,dindex,in) m_pos = dict[dindex] +-#else +-# define DENTRY(p,in) ((lzo_uint) ((p)-(in))) +-# define GINDEX(m_pos,m_off,dict,dindex,in) m_off = dict[dindex] +-#endif +- +-#if (DD_BITS == 0) +- +-# define UPDATE_D(dict,drun,dv,p,in) dict[ DINDEX(dv,p) ] = DENTRY(p,in) +-# define UPDATE_I(dict,drun,index,p,in) dict[index] = DENTRY(p,in) +-# define UPDATE_P(ptr,drun,p,in) (ptr)[0] = DENTRY(p,in) +- +-#else +- +-# define UPDATE_D(dict,drun,dv,p,in) \ +- dict[ DINDEX(dv,p) + drun++ ] = DENTRY(p,in); drun &= DD_MASK +-# define UPDATE_I(dict,drun,index,p,in) \ +- dict[ (index) + drun++ ] = DENTRY(p,in); drun &= DD_MASK +-# define UPDATE_P(ptr,drun,p,in) \ +- (ptr) [ drun++ ] = DENTRY(p,in); drun &= DD_MASK +- +-#endif +- +-#if defined(LZO_DICT_USE_PTR) +- +-#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ +- (m_pos == NULL || (m_off = pd(ip, m_pos)) > max_offset) +- +-#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ +- (BOUNDS_CHECKING_OFF_IN_EXPR(( \ +- m_pos = ip - (lzo_uint) PTR_DIFF(ip,m_pos), \ +- PTR_LT(m_pos,in) || \ +- (m_off = (lzo_uint) PTR_DIFF(ip,m_pos)) == 0 || \ +- m_off > max_offset ))) +- +-#else +- +-#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ +- (m_off == 0 || \ +- ((m_off = pd(ip, in) - m_off) > max_offset) || \ +- (m_pos = (ip) - (m_off), 0) ) +- +-#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ +- (pd(ip, in) <= m_off || \ +- ((m_off = pd(ip, in) - m_off) > max_offset) || \ +- (m_pos = (ip) - (m_off), 0) ) +- +-#endif +- +-#if defined(LZO_DETERMINISTIC) +-# define LZO_CHECK_MPOS LZO_CHECK_MPOS_DET +-#else +-# define LZO_CHECK_MPOS LZO_CHECK_MPOS_NON_DET +-#endif +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif +- +-#endif +- +-#endif +- +-#define do_compress _lzo1x_1_do_compress +-#define DO_COMPRESS lzo1x_1_compress +- +-#if 1 && defined(DO_COMPRESS) && !defined(do_compress) +-# define do_compress LZO_CPP_ECONCAT2(DO_COMPRESS,_core) +-#endif +- +-static __lzo_noinline lzo_uint +-do_compress ( const lzo_bytep in , lzo_uint in_len, +- lzo_bytep out, lzo_uintp out_len, +- lzo_voidp wrkmem ) +-{ +- register const lzo_bytep ip; +- lzo_bytep op; +- const lzo_bytep const in_end = in + in_len; +- const lzo_bytep const ip_end = in + in_len - M2_MAX_LEN - 5; +- const lzo_bytep ii; +- lzo_dict_p const dict = (lzo_dict_p) wrkmem; +- +- op = out; +- ip = in; +- ii = ip; +- +- ip += 4; +- for (;;) +- { +- register const lzo_bytep m_pos; +- LZO_DEFINE_UNINITIALIZED_VAR(lzo_uint, m_off, 0); +- lzo_uint m_len; +- lzo_uint dindex; +- +- DINDEX1(dindex,ip); +- GINDEX(m_pos,m_off,dict,dindex,in); +- if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) +- goto literal; +-#if 1 +- if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) +- goto try_match; +- DINDEX2(dindex,ip); +-#endif +- GINDEX(m_pos,m_off,dict,dindex,in); +- if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) +- goto literal; +- if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) +- goto try_match; +- goto literal; +- +-try_match: +-#if 1 && defined(LZO_UNALIGNED_OK_2) +- if (* (const lzo_ushortp) (const lzo_voidp) m_pos != * (const lzo_ushortp) (const lzo_voidp) ip) +-#else +- if (m_pos[0] != ip[0] || m_pos[1] != ip[1]) +-#endif +- { +- } +- else +- { +- if __lzo_likely(m_pos[2] == ip[2]) +- { +-#if 0 +- if (m_off <= M2_MAX_OFFSET) +- goto match; +- if (lit <= 3) +- goto match; +- if (lit == 3) +- { +- assert(op - 2 > out); op[-2] |= LZO_BYTE(3); +- *op++ = *ii++; *op++ = *ii++; *op++ = *ii++; +- goto code_match; +- } +- if (m_pos[3] == ip[3]) +-#endif +- goto match; +- } +- else +- { +-#if 0 +-#if 0 +- if (m_off <= M1_MAX_OFFSET && lit > 0 && lit <= 3) +-#else +- if (m_off <= M1_MAX_OFFSET && lit == 3) +-#endif +- { +- register lzo_uint t; +- +- t = lit; +- assert(op - 2 > out); op[-2] |= LZO_BYTE(t); +- do *op++ = *ii++; while (--t > 0); +- assert(ii == ip); +- m_off -= 1; +- *op++ = LZO_BYTE(M1_MARKER | ((m_off & 3) << 2)); +- *op++ = LZO_BYTE(m_off >> 2); +- ip += 2; +- goto match_done; +- } +-#endif +- } +- } +- +-literal: +- UPDATE_I(dict,0,dindex,ip,in); +- ++ip; +- if __lzo_unlikely(ip >= ip_end) +- break; +- continue; +- +-match: +- UPDATE_I(dict,0,dindex,ip,in); +- if (pd(ip,ii) > 0) +- { +- register lzo_uint t = pd(ip,ii); +- +- if (t <= 3) +- { +- assert(op - 2 > out); +- op[-2] |= LZO_BYTE(t); +- } +- else if (t <= 18) +- *op++ = LZO_BYTE(t - 3); +- else +- { +- register lzo_uint tt = t - 18; +- +- *op++ = 0; +- while (tt > 255) +- { +- tt -= 255; +- *op++ = 0; +- } +- assert(tt > 0); +- *op++ = LZO_BYTE(tt); +- } +- do *op++ = *ii++; while (--t > 0); +- } +- +- assert(ii == ip); +- ip += 3; +- if (m_pos[3] != *ip++ || m_pos[4] != *ip++ || m_pos[5] != *ip++ || +- m_pos[6] != *ip++ || m_pos[7] != *ip++ || m_pos[8] != *ip++ +-#ifdef LZO1Y +- || m_pos[ 9] != *ip++ || m_pos[10] != *ip++ || m_pos[11] != *ip++ +- || m_pos[12] != *ip++ || m_pos[13] != *ip++ || m_pos[14] != *ip++ +-#endif +- ) +- { +- --ip; +- m_len = pd(ip, ii); +- assert(m_len >= 3); assert(m_len <= M2_MAX_LEN); +- +- if (m_off <= M2_MAX_OFFSET) +- { +- m_off -= 1; +-#if defined(LZO1X) +- *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2)); +- *op++ = LZO_BYTE(m_off >> 3); +-#elif defined(LZO1Y) +- *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2)); +- *op++ = LZO_BYTE(m_off >> 2); +-#endif +- } +- else if (m_off <= M3_MAX_OFFSET) +- { +- m_off -= 1; +- *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); +- goto m3_m4_offset; +- } +- else +-#if defined(LZO1X) +- { +- m_off -= 0x4000; +- assert(m_off > 0); assert(m_off <= 0x7fff); +- *op++ = LZO_BYTE(M4_MARKER | +- ((m_off & 0x4000) >> 11) | (m_len - 2)); +- goto m3_m4_offset; +- } +-#elif defined(LZO1Y) +- goto m4_match; +-#endif +- } +- else +- { +- { +- const lzo_bytep end = in_end; +- const lzo_bytep m = m_pos + M2_MAX_LEN + 1; +- while (ip < end && *m == *ip) +- m++, ip++; +- m_len = pd(ip, ii); +- } +- assert(m_len > M2_MAX_LEN); +- +- if (m_off <= M3_MAX_OFFSET) +- { +- m_off -= 1; +- if (m_len <= 33) +- *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); +- else +- { +- m_len -= 33; +- *op++ = M3_MARKER | 0; +- goto m3_m4_len; +- } +- } +- else +- { +-#if defined(LZO1Y) +-m4_match: +-#endif +- m_off -= 0x4000; +- assert(m_off > 0); assert(m_off <= 0x7fff); +- if (m_len <= M4_MAX_LEN) +- *op++ = LZO_BYTE(M4_MARKER | +- ((m_off & 0x4000) >> 11) | (m_len - 2)); +- else +- { +- m_len -= M4_MAX_LEN; +- *op++ = LZO_BYTE(M4_MARKER | ((m_off & 0x4000) >> 11)); +-m3_m4_len: +- while (m_len > 255) +- { +- m_len -= 255; +- *op++ = 0; +- } +- assert(m_len > 0); +- *op++ = LZO_BYTE(m_len); +- } +- } +- +-m3_m4_offset: +- *op++ = LZO_BYTE((m_off & 63) << 2); +- *op++ = LZO_BYTE(m_off >> 6); +- } +- +-#if 0 +-match_done: +-#endif +- ii = ip; +- if __lzo_unlikely(ip >= ip_end) +- break; +- } +- +- *out_len = pd(op, out); +- return pd(in_end,ii); +-} +- +-LZO_PUBLIC(int) +-DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len, +- lzo_bytep out, lzo_uintp out_len, +- lzo_voidp wrkmem ) +-{ +- lzo_bytep op = out; +- lzo_uint t; +- +- if __lzo_unlikely(in_len <= M2_MAX_LEN + 5) +- t = in_len; +- else +- { +- t = do_compress(in,in_len,op,out_len,wrkmem); +- op += *out_len; +- } +- +- if (t > 0) +- { +- const lzo_bytep ii = in + in_len - t; +- +- if (op == out && t <= 238) +- *op++ = LZO_BYTE(17 + t); +- else if (t <= 3) +- op[-2] |= LZO_BYTE(t); +- else if (t <= 18) +- *op++ = LZO_BYTE(t - 3); +- else +- { +- lzo_uint tt = t - 18; +- +- *op++ = 0; +- while (tt > 255) +- { +- tt -= 255; +- *op++ = 0; +- } +- assert(tt > 0); +- *op++ = LZO_BYTE(tt); +- } +- do *op++ = *ii++; while (--t > 0); +- } +- +- *op++ = M4_MARKER | 1; +- *op++ = 0; +- *op++ = 0; +- +- *out_len = pd(op, out); +- return LZO_E_OK; +-} +- +-#endif +- +-#undef do_compress +-#undef DO_COMPRESS +-#undef LZO_HASH +- +-#undef LZO_TEST_OVERRUN +-#undef DO_DECOMPRESS +-#define DO_DECOMPRESS lzo1x_decompress +- +-#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS) +- +-#if defined(LZO_TEST_OVERRUN) +-# if !defined(LZO_TEST_OVERRUN_INPUT) +-# define LZO_TEST_OVERRUN_INPUT 2 +-# endif +-# if !defined(LZO_TEST_OVERRUN_OUTPUT) +-# define LZO_TEST_OVERRUN_OUTPUT 2 +-# endif +-# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) +-# define LZO_TEST_OVERRUN_LOOKBEHIND 1 +-# endif +-#endif +- +-#undef TEST_IP +-#undef TEST_OP +-#undef TEST_LB +-#undef TEST_LBO +-#undef NEED_IP +-#undef NEED_OP +-#undef HAVE_TEST_IP +-#undef HAVE_TEST_OP +-#undef HAVE_NEED_IP +-#undef HAVE_NEED_OP +-#undef HAVE_ANY_IP +-#undef HAVE_ANY_OP +- +-#if defined(LZO_TEST_OVERRUN_INPUT) +-# if (LZO_TEST_OVERRUN_INPUT >= 1) +-# define TEST_IP (ip < ip_end) +-# endif +-# if (LZO_TEST_OVERRUN_INPUT >= 2) +-# define NEED_IP(x) \ +- if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun +-# endif +-#endif +- +-#if defined(LZO_TEST_OVERRUN_OUTPUT) +-# if (LZO_TEST_OVERRUN_OUTPUT >= 1) +-# define TEST_OP (op <= op_end) +-# endif +-# if (LZO_TEST_OVERRUN_OUTPUT >= 2) +-# undef TEST_OP +-# define NEED_OP(x) \ +- if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun +-# endif +-#endif +- +-#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +-# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun +-# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun +-#else +-# define TEST_LB(m_pos) ((void) 0) +-# define TEST_LBO(m_pos,o) ((void) 0) +-#endif +- +-#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) +-# define TEST_IP (ip < ip_end) +-#endif +- +-#if defined(TEST_IP) +-# define HAVE_TEST_IP 1 +-#else +-# define TEST_IP 1 +-#endif +-#if defined(TEST_OP) +-# define HAVE_TEST_OP 1 +-#else +-# define TEST_OP 1 +-#endif +- +-#if defined(NEED_IP) +-# define HAVE_NEED_IP 1 +-#else +-# define NEED_IP(x) ((void) 0) +-#endif +-#if defined(NEED_OP) +-# define HAVE_NEED_OP 1 +-#else +-# define NEED_OP(x) ((void) 0) +-#endif +- +-#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) +-# define HAVE_ANY_IP 1 +-#endif +-#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) +-# define HAVE_ANY_OP 1 +-#endif +- +-#if defined(DO_DECOMPRESS) +-LZO_PUBLIC(int) +-DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, +- lzo_bytep out, lzo_uintp out_len, +- lzo_voidp wrkmem ) +-#endif +-{ +- register lzo_bytep op; +- register const lzo_bytep ip; +- register lzo_uint t; +-#if defined(COPY_DICT) +- lzo_uint m_off; +- const lzo_bytep dict_end; +-#else +- register const lzo_bytep m_pos; +-#endif +- +- const lzo_bytep const ip_end = in + in_len; +-#if defined(HAVE_ANY_OP) +- lzo_bytep const op_end = out + *out_len; +-#endif +-#if defined(LZO1Z) +- lzo_uint last_m_off = 0; +-#endif +- +- LZO_UNUSED(wrkmem); +- +-#if defined(COPY_DICT) +- if (dict) +- { +- if (dict_len > M4_MAX_OFFSET) +- { +- dict += dict_len - M4_MAX_OFFSET; +- dict_len = M4_MAX_OFFSET; +- } +- dict_end = dict + dict_len; +- } +- else +- { +- dict_len = 0; +- dict_end = NULL; +- } +-#endif +- +- *out_len = 0; +- +- op = out; +- ip = in; +- +- if (*ip > 17) +- { +- t = *ip++ - 17; +- if (t < 4) +- goto match_next; +- assert(t > 0); NEED_OP(t); NEED_IP(t+1); +- do *op++ = *ip++; while (--t > 0); +- goto first_literal_run; +- } +- +- while (TEST_IP && TEST_OP) +- { +- t = *ip++; +- if (t >= 16) +- goto match; +- if (t == 0) +- { +- NEED_IP(1); +- while (*ip == 0) +- { +- t += 255; +- ip++; +- NEED_IP(1); +- } +- t += 15 + *ip++; +- } +- assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); +-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +-#if !defined(LZO_UNALIGNED_OK_4) +- if (PTR_ALIGNED2_4(op,ip)) +- { +-#endif +- COPY4(op,ip); +- op += 4; ip += 4; +- if (--t > 0) +- { +- if (t >= 4) +- { +- do { +- COPY4(op,ip); +- op += 4; ip += 4; t -= 4; +- } while (t >= 4); +- if (t > 0) do *op++ = *ip++; while (--t > 0); +- } +- else +- do *op++ = *ip++; while (--t > 0); +- } +-#if !defined(LZO_UNALIGNED_OK_4) +- } +- else +-#endif +-#endif +-#if !defined(LZO_UNALIGNED_OK_4) +- { +- *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; +- do *op++ = *ip++; while (--t > 0); +- } +-#endif +- +-first_literal_run: +- +- t = *ip++; +- if (t >= 16) +- goto match; +-#if defined(COPY_DICT) +-#if defined(LZO1Z) +- m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); +- last_m_off = m_off; +-#else +- m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); +-#endif +- NEED_OP(3); +- t = 3; COPY_DICT(t,m_off) +-#else +-#if defined(LZO1Z) +- t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); +- m_pos = op - t; +- last_m_off = t; +-#else +- m_pos = op - (1 + M2_MAX_OFFSET); +- m_pos -= t >> 2; +- m_pos -= *ip++ << 2; +-#endif +- TEST_LB(m_pos); NEED_OP(3); +- *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; +-#endif +- goto match_done; +- +- do { +-match: +- if (t >= 64) +- { +-#if defined(COPY_DICT) +-#if defined(LZO1X) +- m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); +- t = (t >> 5) - 1; +-#elif defined(LZO1Y) +- m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); +- t = (t >> 4) - 3; +-#elif defined(LZO1Z) +- m_off = t & 0x1f; +- if (m_off >= 0x1c) +- m_off = last_m_off; +- else +- { +- m_off = 1 + (m_off << 6) + (*ip++ >> 2); +- last_m_off = m_off; +- } +- t = (t >> 5) - 1; +-#endif +-#else +-#if defined(LZO1X) +- m_pos = op - 1; +- m_pos -= (t >> 2) & 7; +- m_pos -= *ip++ << 3; +- t = (t >> 5) - 1; +-#elif defined(LZO1Y) +- m_pos = op - 1; +- m_pos -= (t >> 2) & 3; +- m_pos -= *ip++ << 2; +- t = (t >> 4) - 3; +-#elif defined(LZO1Z) +- { +- lzo_uint off = t & 0x1f; +- m_pos = op; +- if (off >= 0x1c) +- { +- assert(last_m_off > 0); +- m_pos -= last_m_off; +- } +- else +- { +- off = 1 + (off << 6) + (*ip++ >> 2); +- m_pos -= off; +- last_m_off = off; +- } +- } +- t = (t >> 5) - 1; +-#endif +- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +- goto copy_match; +-#endif +- } +- else if (t >= 32) +- { +- t &= 31; +- if (t == 0) +- { +- NEED_IP(1); +- while (*ip == 0) +- { +- t += 255; +- ip++; +- NEED_IP(1); +- } +- t += 31 + *ip++; +- } +-#if defined(COPY_DICT) +-#if defined(LZO1Z) +- m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); +- last_m_off = m_off; +-#else +- m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); +-#endif +-#else +-#if defined(LZO1Z) +- { +- lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); +- m_pos = op - off; +- last_m_off = off; +- } +-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) +- m_pos = op - 1; +- m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; +-#else +- m_pos = op - 1; +- m_pos -= (ip[0] >> 2) + (ip[1] << 6); +-#endif +-#endif +- ip += 2; +- } +- else if (t >= 16) +- { +-#if defined(COPY_DICT) +- m_off = (t & 8) << 11; +-#else +- m_pos = op; +- m_pos -= (t & 8) << 11; +-#endif +- t &= 7; +- if (t == 0) +- { +- NEED_IP(1); +- while (*ip == 0) +- { +- t += 255; +- ip++; +- NEED_IP(1); +- } +- t += 7 + *ip++; +- } +-#if defined(COPY_DICT) +-#if defined(LZO1Z) +- m_off += (ip[0] << 6) + (ip[1] >> 2); +-#else +- m_off += (ip[0] >> 2) + (ip[1] << 6); +-#endif +- ip += 2; +- if (m_off == 0) +- goto eof_found; +- m_off += 0x4000; +-#if defined(LZO1Z) +- last_m_off = m_off; +-#endif +-#else +-#if defined(LZO1Z) +- m_pos -= (ip[0] << 6) + (ip[1] >> 2); +-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) +- m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; +-#else +- m_pos -= (ip[0] >> 2) + (ip[1] << 6); +-#endif +- ip += 2; +- if (m_pos == op) +- goto eof_found; +- m_pos -= 0x4000; +-#if defined(LZO1Z) +- last_m_off = pd((const lzo_bytep)op, m_pos); +-#endif +-#endif +- } +- else +- { +-#if defined(COPY_DICT) +-#if defined(LZO1Z) +- m_off = 1 + (t << 6) + (*ip++ >> 2); +- last_m_off = m_off; +-#else +- m_off = 1 + (t >> 2) + (*ip++ << 2); +-#endif +- NEED_OP(2); +- t = 2; COPY_DICT(t,m_off) +-#else +-#if defined(LZO1Z) +- t = 1 + (t << 6) + (*ip++ >> 2); +- m_pos = op - t; +- last_m_off = t; +-#else +- m_pos = op - 1; +- m_pos -= t >> 2; +- m_pos -= *ip++ << 2; +-#endif +- TEST_LB(m_pos); NEED_OP(2); +- *op++ = *m_pos++; *op++ = *m_pos; +-#endif +- goto match_done; +- } +- +-#if defined(COPY_DICT) +- +- NEED_OP(t+3-1); +- t += 3-1; COPY_DICT(t,m_off) +- +-#else +- +- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +-#if !defined(LZO_UNALIGNED_OK_4) +- if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) +- { +- assert((op - m_pos) >= 4); +-#else +- if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) +- { +-#endif +- COPY4(op,m_pos); +- op += 4; m_pos += 4; t -= 4 - (3 - 1); +- do { +- COPY4(op,m_pos); +- op += 4; m_pos += 4; t -= 4; +- } while (t >= 4); +- if (t > 0) do *op++ = *m_pos++; while (--t > 0); +- } +- else +-#endif +- { +-copy_match: +- *op++ = *m_pos++; *op++ = *m_pos++; +- do *op++ = *m_pos++; while (--t > 0); +- } +- +-#endif +- +-match_done: +-#if defined(LZO1Z) +- t = ip[-1] & 3; +-#else +- t = ip[-2] & 3; +-#endif +- if (t == 0) +- break; +- +-match_next: +- assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); +-#if 0 +- do *op++ = *ip++; while (--t > 0); +-#else +- *op++ = *ip++; +- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } +-#endif +- t = *ip++; +- } while (TEST_IP && TEST_OP); +- } +- +-#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) +- *out_len = pd(op, out); +- return LZO_E_EOF_NOT_FOUND; +-#endif +- +-eof_found: +- assert(t == 1); +- *out_len = pd(op, out); +- return (ip == ip_end ? LZO_E_OK : +- (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); +- +-#if defined(HAVE_NEED_IP) +-input_overrun: +- *out_len = pd(op, out); +- return LZO_E_INPUT_OVERRUN; +-#endif +- +-#if defined(HAVE_NEED_OP) +-output_overrun: +- *out_len = pd(op, out); +- return LZO_E_OUTPUT_OVERRUN; +-#endif +- +-#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +-lookbehind_overrun: +- *out_len = pd(op, out); +- return LZO_E_LOOKBEHIND_OVERRUN; +-#endif +-} +- +-#endif +- +-#define LZO_TEST_OVERRUN 1 +-#undef DO_DECOMPRESS +-#define DO_DECOMPRESS lzo1x_decompress_safe +- +-#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS_SAFE) +- +-#if defined(LZO_TEST_OVERRUN) +-# if !defined(LZO_TEST_OVERRUN_INPUT) +-# define LZO_TEST_OVERRUN_INPUT 2 +-# endif +-# if !defined(LZO_TEST_OVERRUN_OUTPUT) +-# define LZO_TEST_OVERRUN_OUTPUT 2 +-# endif +-# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) +-# define LZO_TEST_OVERRUN_LOOKBEHIND 1 +-# endif +-#endif +- +-#undef TEST_IP +-#undef TEST_OP +-#undef TEST_LB +-#undef TEST_LBO +-#undef NEED_IP +-#undef NEED_OP +-#undef HAVE_TEST_IP +-#undef HAVE_TEST_OP +-#undef HAVE_NEED_IP +-#undef HAVE_NEED_OP +-#undef HAVE_ANY_IP +-#undef HAVE_ANY_OP +- +-#if defined(LZO_TEST_OVERRUN_INPUT) +-# if (LZO_TEST_OVERRUN_INPUT >= 1) +-# define TEST_IP (ip < ip_end) +-# endif +-# if (LZO_TEST_OVERRUN_INPUT >= 2) +-# define NEED_IP(x) \ +- if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun +-# endif +-#endif +- +-#if defined(LZO_TEST_OVERRUN_OUTPUT) +-# if (LZO_TEST_OVERRUN_OUTPUT >= 1) +-# define TEST_OP (op <= op_end) +-# endif +-# if (LZO_TEST_OVERRUN_OUTPUT >= 2) +-# undef TEST_OP +-# define NEED_OP(x) \ +- if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun +-# endif +-#endif +- +-#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +-# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun +-# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun +-#else +-# define TEST_LB(m_pos) ((void) 0) +-# define TEST_LBO(m_pos,o) ((void) 0) +-#endif +- +-#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) +-# define TEST_IP (ip < ip_end) +-#endif +- +-#if defined(TEST_IP) +-# define HAVE_TEST_IP 1 +-#else +-# define TEST_IP 1 +-#endif +-#if defined(TEST_OP) +-# define HAVE_TEST_OP 1 +-#else +-# define TEST_OP 1 +-#endif +- +-#if defined(NEED_IP) +-# define HAVE_NEED_IP 1 +-#else +-# define NEED_IP(x) ((void) 0) +-#endif +-#if defined(NEED_OP) +-# define HAVE_NEED_OP 1 +-#else +-# define NEED_OP(x) ((void) 0) +-#endif +- +-#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) +-# define HAVE_ANY_IP 1 +-#endif +-#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) +-# define HAVE_ANY_OP 1 +-#endif +- +-#if defined(DO_DECOMPRESS) +-LZO_PUBLIC(int) +-DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, +- lzo_bytep out, lzo_uintp out_len, +- lzo_voidp wrkmem ) +-#endif +-{ +- register lzo_bytep op; +- register const lzo_bytep ip; +- register lzo_uint t; +-#if defined(COPY_DICT) +- lzo_uint m_off; +- const lzo_bytep dict_end; +-#else +- register const lzo_bytep m_pos; +-#endif +- +- const lzo_bytep const ip_end = in + in_len; +-#if defined(HAVE_ANY_OP) +- lzo_bytep const op_end = out + *out_len; +-#endif +-#if defined(LZO1Z) +- lzo_uint last_m_off = 0; +-#endif +- +- LZO_UNUSED(wrkmem); +- +-#if defined(COPY_DICT) +- if (dict) +- { +- if (dict_len > M4_MAX_OFFSET) +- { +- dict += dict_len - M4_MAX_OFFSET; +- dict_len = M4_MAX_OFFSET; +- } +- dict_end = dict + dict_len; +- } +- else +- { +- dict_len = 0; +- dict_end = NULL; +- } +-#endif +- +- *out_len = 0; +- +- op = out; +- ip = in; +- +- if (*ip > 17) +- { +- t = *ip++ - 17; +- if (t < 4) +- goto match_next; +- assert(t > 0); NEED_OP(t); NEED_IP(t+1); +- do *op++ = *ip++; while (--t > 0); +- goto first_literal_run; +- } +- +- while (TEST_IP && TEST_OP) +- { +- t = *ip++; +- if (t >= 16) +- goto match; +- if (t == 0) +- { +- NEED_IP(1); +- while (*ip == 0) +- { +- t += 255; +- ip++; +- NEED_IP(1); +- } +- t += 15 + *ip++; +- } +- assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); +-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +-#if !defined(LZO_UNALIGNED_OK_4) +- if (PTR_ALIGNED2_4(op,ip)) +- { +-#endif +- COPY4(op,ip); +- op += 4; ip += 4; +- if (--t > 0) +- { +- if (t >= 4) +- { +- do { +- COPY4(op,ip); +- op += 4; ip += 4; t -= 4; +- } while (t >= 4); +- if (t > 0) do *op++ = *ip++; while (--t > 0); +- } +- else +- do *op++ = *ip++; while (--t > 0); +- } +-#if !defined(LZO_UNALIGNED_OK_4) +- } +- else +-#endif +-#endif +-#if !defined(LZO_UNALIGNED_OK_4) +- { +- *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; +- do *op++ = *ip++; while (--t > 0); +- } +-#endif +- +-first_literal_run: +- +- t = *ip++; +- if (t >= 16) +- goto match; +-#if defined(COPY_DICT) +-#if defined(LZO1Z) +- m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); +- last_m_off = m_off; +-#else +- m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); +-#endif +- NEED_OP(3); +- t = 3; COPY_DICT(t,m_off) +-#else +-#if defined(LZO1Z) +- t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); +- m_pos = op - t; +- last_m_off = t; +-#else +- m_pos = op - (1 + M2_MAX_OFFSET); +- m_pos -= t >> 2; +- m_pos -= *ip++ << 2; +-#endif +- TEST_LB(m_pos); NEED_OP(3); +- *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; +-#endif +- goto match_done; +- +- do { +-match: +- if (t >= 64) +- { +-#if defined(COPY_DICT) +-#if defined(LZO1X) +- m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); +- t = (t >> 5) - 1; +-#elif defined(LZO1Y) +- m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); +- t = (t >> 4) - 3; +-#elif defined(LZO1Z) +- m_off = t & 0x1f; +- if (m_off >= 0x1c) +- m_off = last_m_off; +- else +- { +- m_off = 1 + (m_off << 6) + (*ip++ >> 2); +- last_m_off = m_off; +- } +- t = (t >> 5) - 1; +-#endif +-#else +-#if defined(LZO1X) +- m_pos = op - 1; +- m_pos -= (t >> 2) & 7; +- m_pos -= *ip++ << 3; +- t = (t >> 5) - 1; +-#elif defined(LZO1Y) +- m_pos = op - 1; +- m_pos -= (t >> 2) & 3; +- m_pos -= *ip++ << 2; +- t = (t >> 4) - 3; +-#elif defined(LZO1Z) +- { +- lzo_uint off = t & 0x1f; +- m_pos = op; +- if (off >= 0x1c) +- { +- assert(last_m_off > 0); +- m_pos -= last_m_off; +- } +- else +- { +- off = 1 + (off << 6) + (*ip++ >> 2); +- m_pos -= off; +- last_m_off = off; +- } +- } +- t = (t >> 5) - 1; +-#endif +- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +- goto copy_match; +-#endif +- } +- else if (t >= 32) +- { +- t &= 31; +- if (t == 0) +- { +- NEED_IP(1); +- while (*ip == 0) +- { +- t += 255; +- ip++; +- NEED_IP(1); +- } +- t += 31 + *ip++; +- } +-#if defined(COPY_DICT) +-#if defined(LZO1Z) +- m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); +- last_m_off = m_off; +-#else +- m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); +-#endif +-#else +-#if defined(LZO1Z) +- { +- lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); +- m_pos = op - off; +- last_m_off = off; +- } +-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) +- m_pos = op - 1; +- m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; +-#else +- m_pos = op - 1; +- m_pos -= (ip[0] >> 2) + (ip[1] << 6); +-#endif +-#endif +- ip += 2; +- } +- else if (t >= 16) +- { +-#if defined(COPY_DICT) +- m_off = (t & 8) << 11; +-#else +- m_pos = op; +- m_pos -= (t & 8) << 11; +-#endif +- t &= 7; +- if (t == 0) +- { +- NEED_IP(1); +- while (*ip == 0) +- { +- t += 255; +- ip++; +- NEED_IP(1); +- } +- t += 7 + *ip++; +- } +-#if defined(COPY_DICT) +-#if defined(LZO1Z) +- m_off += (ip[0] << 6) + (ip[1] >> 2); +-#else +- m_off += (ip[0] >> 2) + (ip[1] << 6); +-#endif +- ip += 2; +- if (m_off == 0) +- goto eof_found; +- m_off += 0x4000; +-#if defined(LZO1Z) +- last_m_off = m_off; +-#endif +-#else +-#if defined(LZO1Z) +- m_pos -= (ip[0] << 6) + (ip[1] >> 2); +-#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) +- m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; +-#else +- m_pos -= (ip[0] >> 2) + (ip[1] << 6); +-#endif +- ip += 2; +- if (m_pos == op) +- goto eof_found; +- m_pos -= 0x4000; +-#if defined(LZO1Z) +- last_m_off = pd((const lzo_bytep)op, m_pos); +-#endif +-#endif +- } +- else +- { +-#if defined(COPY_DICT) +-#if defined(LZO1Z) +- m_off = 1 + (t << 6) + (*ip++ >> 2); +- last_m_off = m_off; +-#else +- m_off = 1 + (t >> 2) + (*ip++ << 2); +-#endif +- NEED_OP(2); +- t = 2; COPY_DICT(t,m_off) +-#else +-#if defined(LZO1Z) +- t = 1 + (t << 6) + (*ip++ >> 2); +- m_pos = op - t; +- last_m_off = t; +-#else +- m_pos = op - 1; +- m_pos -= t >> 2; +- m_pos -= *ip++ << 2; +-#endif +- TEST_LB(m_pos); NEED_OP(2); +- *op++ = *m_pos++; *op++ = *m_pos; +-#endif +- goto match_done; +- } +- +-#if defined(COPY_DICT) +- +- NEED_OP(t+3-1); +- t += 3-1; COPY_DICT(t,m_off) +- +-#else +- +- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); +-#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) +-#if !defined(LZO_UNALIGNED_OK_4) +- if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) +- { +- assert((op - m_pos) >= 4); +-#else +- if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) +- { +-#endif +- COPY4(op,m_pos); +- op += 4; m_pos += 4; t -= 4 - (3 - 1); +- do { +- COPY4(op,m_pos); +- op += 4; m_pos += 4; t -= 4; +- } while (t >= 4); +- if (t > 0) do *op++ = *m_pos++; while (--t > 0); +- } +- else +-#endif +- { +-copy_match: +- *op++ = *m_pos++; *op++ = *m_pos++; +- do *op++ = *m_pos++; while (--t > 0); +- } +- +-#endif +- +-match_done: +-#if defined(LZO1Z) +- t = ip[-1] & 3; +-#else +- t = ip[-2] & 3; +-#endif +- if (t == 0) +- break; +- +-match_next: +- assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); +-#if 0 +- do *op++ = *ip++; while (--t > 0); +-#else +- *op++ = *ip++; +- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } +-#endif +- t = *ip++; +- } while (TEST_IP && TEST_OP); +- } +- +-#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) +- *out_len = pd(op, out); +- return LZO_E_EOF_NOT_FOUND; +-#endif +- +-eof_found: +- assert(t == 1); +- *out_len = pd(op, out); +- return (ip == ip_end ? LZO_E_OK : +- (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); +- +-#if defined(HAVE_NEED_IP) +-input_overrun: +- *out_len = pd(op, out); +- return LZO_E_INPUT_OVERRUN; +-#endif +- +-#if defined(HAVE_NEED_OP) +-output_overrun: +- *out_len = pd(op, out); +- return LZO_E_OUTPUT_OVERRUN; +-#endif +- +-#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) +-lookbehind_overrun: +- *out_len = pd(op, out); +- return LZO_E_LOOKBEHIND_OVERRUN; +-#endif +-} +- +-#endif +- +-/***** End of minilzo.c *****/ +- +diff --git a/remmina-plugins/vnc/libvncserver/common/minilzo.h b/remmina-plugins/vnc/libvncserver/common/minilzo.h +deleted file mode 100644 +index bd8ad65..0000000 +--- a/remmina-plugins/vnc/libvncserver/common/minilzo.h ++++ /dev/null +@@ -1,108 +0,0 @@ +-/* minilzo.h -- mini subset of the LZO real-time data compression library +- +- This file is part of the LZO real-time data compression library. +- +- Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer +- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer +- All Rights Reserved. +- +- The LZO library is free software; you can redistribute it and/or +- modify it under the terms of the GNU General Public License as +- published by the Free Software Foundation; either version 2 of +- the License, or (at your option) any later version. +- +- The LZO library is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with the LZO library; see the file COPYING. +- If not, write to the Free Software Foundation, Inc., +- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +- +- Markus F.X.J. Oberhumer +- +- http://www.oberhumer.com/opensource/lzo/ +- */ +- +-/* +- * NOTE: +- * the full LZO package can be found at +- * http://www.oberhumer.com/opensource/lzo/ +- */ +- +- +-#ifndef __MINILZO_H +-#define __MINILZO_H 1 +- +-#define MINILZO_VERSION 0x2040 +- +-#ifdef __LZOCONF_H +-# error "you cannot use both LZO and miniLZO" +-#endif +- +-#undef LZO_HAVE_CONFIG_H +-#include "lzoconf.h" +- +-#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION) +-# error "version mismatch in header files" +-#endif +- +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +- +-/*********************************************************************** +-// +-************************************************************************/ +- +-/* Memory required for the wrkmem parameter. +- * When the required size is 0, you can also pass a NULL pointer. +- */ +- +-#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS +-#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) +-#define LZO1X_MEM_DECOMPRESS (0) +- +- +-/* compression */ +-LZO_EXTERN(int) +-lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len, +- lzo_bytep dst, lzo_uintp dst_len, +- lzo_voidp wrkmem ); +- +-/* decompression */ +-LZO_EXTERN(int) +-lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len, +- lzo_bytep dst, lzo_uintp dst_len, +- lzo_voidp wrkmem /* NOT USED */ ); +- +-/* safe decompression with overrun testing */ +-LZO_EXTERN(int) +-lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len, +- lzo_bytep dst, lzo_uintp dst_len, +- lzo_voidp wrkmem /* NOT USED */ ); +- +- +-#ifdef __cplusplus +-} /* extern "C" */ +-#endif +- +-#endif /* already included */ +- +diff --git a/remmina-plugins/vnc/libvncserver/common/vncauth.c b/remmina-plugins/vnc/libvncserver/common/vncauth.c +deleted file mode 100644 +index 82c1b68..0000000 +--- a/remmina-plugins/vnc/libvncserver/common/vncauth.c ++++ /dev/null +@@ -1,211 +0,0 @@ +-/* +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* +- * vncauth.c - Functions for VNC password management and authentication. +- */ +- +-#ifdef __STRICT_ANSI__ +-#define _BSD_SOURCE +-#define _POSIX_SOURCE +-#endif +-#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H +-#include +-#endif +-#include +-#include +-#include +-#include +-#include "d3des.h" +- +-#include +-#include +- +-#ifdef LIBVNCSERVER_HAVE_SYS_STAT_H +-#include +-#endif +- +-#include +- +-#ifdef WIN32 +-#define srandom srand +-#define random rand +-#else +-#include +-#endif +- +- +-/* libvncclient does not need this */ +-#ifndef rfbEncryptBytes +- +-/* +- * We use a fixed key to store passwords, since we assume that our local +- * file system is secure but nonetheless don't want to store passwords +- * as plaintext. +- */ +- +-static unsigned char fixedkey[8] = {23,82,107,6,35,78,88,7}; +- +- +-/* +- * Encrypt a password and store it in a file. Returns 0 if successful, +- * 1 if the file could not be written. +- */ +- +-int +-rfbEncryptAndStorePasswd(char *passwd, char *fname) +-{ +- FILE *fp; +- unsigned int i; +- unsigned char encryptedPasswd[8]; +- +- if ((fp = fopen(fname,"w")) == NULL) return 1; +- +- /* windows security sux */ +-#ifndef WIN32 +- fchmod(fileno(fp), S_IRUSR|S_IWUSR); +-#endif +- +- /* pad password with nulls */ +- +- for (i = 0; i < 8; i++) { +- if (i < strlen(passwd)) { +- encryptedPasswd[i] = passwd[i]; +- } else { +- encryptedPasswd[i] = 0; +- } +- } +- +- /* Do encryption in-place - this way we overwrite our copy of the plaintext +- password */ +- +- rfbDesKey(fixedkey, EN0); +- rfbDes(encryptedPasswd, encryptedPasswd); +- +- for (i = 0; i < 8; i++) { +- putc(encryptedPasswd[i], fp); +- } +- +- fclose(fp); +- return 0; +-} +- +- +-/* +- * Decrypt a password from a file. Returns a pointer to a newly allocated +- * string containing the password or a null pointer if the password could +- * not be retrieved for some reason. +- */ +- +-char * +-rfbDecryptPasswdFromFile(char *fname) +-{ +- FILE *fp; +- int i, ch; +- unsigned char *passwd = (unsigned char *)malloc(9); +- +- if ((fp = fopen(fname,"r")) == NULL) { +- free(passwd); +- return NULL; +- } +- +- for (i = 0; i < 8; i++) { +- ch = getc(fp); +- if (ch == EOF) { +- fclose(fp); +- free(passwd); +- return NULL; +- } +- passwd[i] = ch; +- } +- +- fclose(fp); +- +- rfbDesKey(fixedkey, DE1); +- rfbDes(passwd, passwd); +- +- passwd[8] = 0; +- +- return (char *)passwd; +-} +- +- +-/* +- * Generate CHALLENGESIZE random bytes for use in challenge-response +- * authentication. +- */ +- +-void +-rfbRandomBytes(unsigned char *bytes) +-{ +- int i; +- static rfbBool s_srandom_called = FALSE; +- +- if (!s_srandom_called) { +- srandom((unsigned int)time(NULL) ^ (unsigned int)getpid()); +- s_srandom_called = TRUE; +- } +- +- for (i = 0; i < CHALLENGESIZE; i++) { +- bytes[i] = (unsigned char)(random() & 255); +- } +-} +- +-#endif +- +-/* +- * Encrypt CHALLENGESIZE bytes in memory using a password. +- */ +- +-void +-rfbEncryptBytes(unsigned char *bytes, char *passwd) +-{ +- unsigned char key[8]; +- unsigned int i; +- +- /* key is simply password padded with nulls */ +- +- for (i = 0; i < 8; i++) { +- if (i < strlen(passwd)) { +- key[i] = passwd[i]; +- } else { +- key[i] = 0; +- } +- } +- +- rfbDesKey(key, EN0); +- +- for (i = 0; i < CHALLENGESIZE; i += 8) { +- rfbDes(bytes+i, bytes+i); +- } +-} +- +-void +-rfbEncryptBytes2(unsigned char *where, const int length, unsigned char *key) { +- int i, j; +- rfbDesKey(key, EN0); +- for (i = 0; i< 8; i++) +- where[i] ^= key[i]; +- rfbDes(where, where); +- for (i = 8; i < length; i += 8) { +- for (j = 0; j < 8; j++) +- where[i + j] ^= where[i + j - 8]; +- rfbDes(where + i, where + i); +- } +-} +diff --git a/remmina-plugins/vnc/libvncserver/common/zywrletemplate.c b/remmina-plugins/vnc/libvncserver/common/zywrletemplate.c +deleted file mode 100644 +index 52b2b0b..0000000 +--- a/remmina-plugins/vnc/libvncserver/common/zywrletemplate.c ++++ /dev/null +@@ -1,824 +0,0 @@ +- +-/******************************************************************** +- * * +- * THIS FILE IS PART OF THE 'ZYWRLE' VNC CODEC SOURCE CODE. * +- * * +- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * +- * GOVERNED BY A FOLLOWING BSD-STYLE SOURCE LICENSE. * +- * PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * +- * * +- * THE 'ZYWRLE' VNC CODEC SOURCE CODE IS (C) COPYRIGHT 2006 * +- * BY Hitachi Systems & Services, Ltd. * +- * (Noriaki Yamazaki, Research & Developement Center) * * +- * * +- ******************************************************************** +-Redistribution and use in source and binary forms, with or without +-modification, are permitted provided that the following conditions +-are met: +- +-- Redistributions of source code must retain the above copyright +-notice, this list of conditions and the following disclaimer. +- +-- Redistributions in binary form must reproduce the above copyright +-notice, this list of conditions and the following disclaimer in the +-documentation and/or other materials provided with the distribution. +- +-- Neither the name of the Hitachi Systems & Services, Ltd. nor +-the names of its contributors may be used to endorse or promote +-products derived from this software without specific prior written +-permission. +- +-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +-``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- ********************************************************************/ +- +-/* Change Log: +- V0.02 : 2008/02/04 : Fix mis encode/decode when width != scanline +- (Thanks Johannes Schindelin, author of LibVNC +- Server/Client) +- V0.01 : 2007/02/06 : Initial release +-*/ +- +-/* #define ZYWRLE_ENCODE */ +-/* #define ZYWRLE_DECODE */ +-#define ZYWRLE_QUANTIZE +- +-/* +-[References] +- PLHarr: +- Senecal, J. G., P. Lindstrom, M. A. Duchaineau, and K. I. Joy, "An Improved N-Bit to N-Bit Reversible Haar-Like Transform," Pacific Graphics 2004, October 2004, pp. 371-380. +- EZW: +- Shapiro, JM: Embedded Image Coding Using Zerotrees of Wavelet Coefficients, IEEE Trans. Signal. Process., Vol.41, pp.3445-3462 (1993). +-*/ +- +- +-/* Template Macro stuffs. */ +-#undef ZYWRLE_ANALYZE +-#undef ZYWRLE_SYNTHESIZE +-#define ZYWRLE_ANALYZE __RFB_CONCAT3E(zywrleAnalyze,BPP,END_FIX) +-#define ZYWRLE_SYNTHESIZE __RFB_CONCAT3E(zywrleSynthesize,BPP,END_FIX) +- +-#define ZYWRLE_RGBYUV __RFB_CONCAT3E(zywrleRGBYUV,BPP,END_FIX) +-#define ZYWRLE_YUVRGB __RFB_CONCAT3E(zywrleYUVRGB,BPP,END_FIX) +-#define ZYWRLE_YMASK __RFB_CONCAT2E(ZYWRLE_YMASK,BPP) +-#define ZYWRLE_UVMASK __RFB_CONCAT2E(ZYWRLE_UVMASK,BPP) +-#define ZYWRLE_LOAD_PIXEL __RFB_CONCAT2E(ZYWRLE_LOAD_PIXEL,BPP) +-#define ZYWRLE_SAVE_PIXEL __RFB_CONCAT2E(ZYWRLE_SAVE_PIXEL,BPP) +- +-/* Packing/Unpacking pixel stuffs. +- Endian conversion stuffs. */ +-#undef S_0 +-#undef S_1 +-#undef L_0 +-#undef L_1 +-#undef L_2 +-#if ZYWRLE_ENDIAN == ENDIAN_BIG +-# define S_0 1 +-# define S_1 0 +-# define L_0 3 +-# define L_1 2 +-# define L_2 1 +-#else +-# define S_0 0 +-# define S_1 1 +-# define L_0 0 +-# define L_1 1 +-# define L_2 2 +-#endif +- +-/* Load/Save pixel stuffs. */ +-#define ZYWRLE_YMASK15 0xFFFFFFF8 +-#define ZYWRLE_UVMASK15 0xFFFFFFF8 +-#define ZYWRLE_LOAD_PIXEL15(pSrc,R,G,B) { \ +- R = (((unsigned char*)pSrc)[S_1]<< 1)& 0xF8; \ +- G = ((((unsigned char*)pSrc)[S_1]<< 6)|(((unsigned char*)pSrc)[S_0]>> 2))& 0xF8; \ +- B = (((unsigned char*)pSrc)[S_0]<< 3)& 0xF8; \ +-} +-#define ZYWRLE_SAVE_PIXEL15(pDst,R,G,B) { \ +- R &= 0xF8; \ +- G &= 0xF8; \ +- B &= 0xF8; \ +- ((unsigned char*)pDst)[S_1] = (unsigned char)( (R>>1)|(G>>6) ); \ +- ((unsigned char*)pDst)[S_0] = (unsigned char)(((B>>3)|(G<<2))& 0xFF); \ +-} +-#define ZYWRLE_YMASK16 0xFFFFFFFC +-#define ZYWRLE_UVMASK16 0xFFFFFFF8 +-#define ZYWRLE_LOAD_PIXEL16(pSrc,R,G,B) { \ +- R = ((unsigned char*)pSrc)[S_1] & 0xF8; \ +- G = ((((unsigned char*)pSrc)[S_1]<< 5)|(((unsigned char*)pSrc)[S_0]>> 3))& 0xFC; \ +- B = (((unsigned char*)pSrc)[S_0]<< 3)& 0xF8; \ +-} +-#define ZYWRLE_SAVE_PIXEL16(pDst,R,G,B) { \ +- R &= 0xF8; \ +- G &= 0xFC; \ +- B &= 0xF8; \ +- ((unsigned char*)pDst)[S_1] = (unsigned char)( R |(G>>5) ); \ +- ((unsigned char*)pDst)[S_0] = (unsigned char)(((B>>3)|(G<<3))& 0xFF); \ +-} +-#define ZYWRLE_YMASK32 0xFFFFFFFF +-#define ZYWRLE_UVMASK32 0xFFFFFFFF +-#define ZYWRLE_LOAD_PIXEL32(pSrc,R,G,B) { \ +- R = ((unsigned char*)pSrc)[L_2]; \ +- G = ((unsigned char*)pSrc)[L_1]; \ +- B = ((unsigned char*)pSrc)[L_0]; \ +-} +-#define ZYWRLE_SAVE_PIXEL32(pDst,R,G,B) { \ +- ((unsigned char*)pDst)[L_2] = (unsigned char)R; \ +- ((unsigned char*)pDst)[L_1] = (unsigned char)G; \ +- ((unsigned char*)pDst)[L_0] = (unsigned char)B; \ +-} +- +-#ifndef ZYWRLE_ONCE +-#define ZYWRLE_ONCE +- +-#ifdef WIN32 +-#define InlineX __inline +-#else +-#define InlineX inline +-#endif +- +-#ifdef ZYWRLE_ENCODE +-/* Tables for Coefficients filtering. */ +-# ifndef ZYWRLE_QUANTIZE +-/* Type A:lower bit omitting of EZW style. */ +-const static unsigned int zywrleParam[3][3]={ +- {0x0000F000,0x00000000,0x00000000}, +- {0x0000C000,0x00F0F0F0,0x00000000}, +- {0x0000C000,0x00C0C0C0,0x00F0F0F0}, +-/* {0x0000FF00,0x00000000,0x00000000}, +- {0x0000FF00,0x00FFFFFF,0x00000000}, +- {0x0000FF00,0x00FFFFFF,0x00FFFFFF}, */ +-}; +-# else +-/* Type B:Non liner quantization filter. */ +-static const signed char zywrleConv[4][256]={ +-{ /* bi=5, bo=5 r=0.0:PSNR=24.849 */ +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +-}, +-{ /* bi=5, bo=5 r=2.0:PSNR=74.031 */ +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 32, +- 32, 32, 32, 32, 32, 32, 32, 32, +- 32, 32, 32, 32, 32, 32, 32, 32, +- 48, 48, 48, 48, 48, 48, 48, 48, +- 48, 48, 48, 56, 56, 56, 56, 56, +- 56, 56, 56, 56, 64, 64, 64, 64, +- 64, 64, 64, 64, 72, 72, 72, 72, +- 72, 72, 72, 72, 80, 80, 80, 80, +- 80, 80, 88, 88, 88, 88, 88, 88, +- 88, 88, 88, 88, 88, 88, 96, 96, +- 96, 96, 96, 104, 104, 104, 104, 104, +- 104, 104, 104, 104, 104, 112, 112, 112, +- 112, 112, 112, 112, 112, 112, 120, 120, +- 120, 120, 120, 120, 120, 120, 120, 120, +- 0, -120, -120, -120, -120, -120, -120, -120, +- -120, -120, -120, -112, -112, -112, -112, -112, +- -112, -112, -112, -112, -104, -104, -104, -104, +- -104, -104, -104, -104, -104, -104, -96, -96, +- -96, -96, -96, -88, -88, -88, -88, -88, +- -88, -88, -88, -88, -88, -88, -88, -80, +- -80, -80, -80, -80, -80, -72, -72, -72, +- -72, -72, -72, -72, -72, -64, -64, -64, +- -64, -64, -64, -64, -64, -56, -56, -56, +- -56, -56, -56, -56, -56, -56, -48, -48, +- -48, -48, -48, -48, -48, -48, -48, -48, +- -48, -32, -32, -32, -32, -32, -32, -32, +- -32, -32, -32, -32, -32, -32, -32, -32, +- -32, -32, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +-}, +-{ /* bi=5, bo=4 r=2.0:PSNR=64.441 */ +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 48, 48, 48, 48, 48, 48, 48, 48, +- 48, 48, 48, 48, 48, 48, 48, 48, +- 48, 48, 48, 48, 48, 48, 48, 48, +- 64, 64, 64, 64, 64, 64, 64, 64, +- 64, 64, 64, 64, 64, 64, 64, 64, +- 80, 80, 80, 80, 80, 80, 80, 80, +- 80, 80, 80, 80, 80, 88, 88, 88, +- 88, 88, 88, 88, 88, 88, 88, 88, +- 104, 104, 104, 104, 104, 104, 104, 104, +- 104, 104, 104, 112, 112, 112, 112, 112, +- 112, 112, 112, 112, 120, 120, 120, 120, +- 120, 120, 120, 120, 120, 120, 120, 120, +- 0, -120, -120, -120, -120, -120, -120, -120, +- -120, -120, -120, -120, -120, -112, -112, -112, +- -112, -112, -112, -112, -112, -112, -104, -104, +- -104, -104, -104, -104, -104, -104, -104, -104, +- -104, -88, -88, -88, -88, -88, -88, -88, +- -88, -88, -88, -88, -80, -80, -80, -80, +- -80, -80, -80, -80, -80, -80, -80, -80, +- -80, -64, -64, -64, -64, -64, -64, -64, +- -64, -64, -64, -64, -64, -64, -64, -64, +- -64, -48, -48, -48, -48, -48, -48, -48, +- -48, -48, -48, -48, -48, -48, -48, -48, +- -48, -48, -48, -48, -48, -48, -48, -48, +- -48, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +-}, +-{ /* bi=5, bo=2 r=2.0:PSNR=43.175 */ +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 88, 88, 88, 88, 88, 88, 88, 88, +- 88, 88, 88, 88, 88, 88, 88, 88, +- 88, 88, 88, 88, 88, 88, 88, 88, +- 88, 88, 88, 88, 88, 88, 88, 88, +- 88, 88, 88, 88, 88, 88, 88, 88, +- 88, 88, 88, 88, 88, 88, 88, 88, +- 88, 88, 88, 88, 88, 88, 88, 88, +- 88, 88, 88, 88, 88, 88, 88, 88, +- 0, -88, -88, -88, -88, -88, -88, -88, +- -88, -88, -88, -88, -88, -88, -88, -88, +- -88, -88, -88, -88, -88, -88, -88, -88, +- -88, -88, -88, -88, -88, -88, -88, -88, +- -88, -88, -88, -88, -88, -88, -88, -88, +- -88, -88, -88, -88, -88, -88, -88, -88, +- -88, -88, -88, -88, -88, -88, -88, -88, +- -88, -88, -88, -88, -88, -88, -88, -88, +- -88, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 0, 0, +-} +-}; +-const static signed char* zywrleParam[3][3][3]={ +- {{zywrleConv[0],zywrleConv[2],zywrleConv[0]},{zywrleConv[0],zywrleConv[0],zywrleConv[0]},{zywrleConv[0],zywrleConv[0],zywrleConv[0]}}, +- {{zywrleConv[0],zywrleConv[3],zywrleConv[0]},{zywrleConv[1],zywrleConv[1],zywrleConv[1]},{zywrleConv[0],zywrleConv[0],zywrleConv[0]}}, +- {{zywrleConv[0],zywrleConv[3],zywrleConv[0]},{zywrleConv[2],zywrleConv[2],zywrleConv[2]},{zywrleConv[1],zywrleConv[1],zywrleConv[1]}}, +-}; +-# endif +-#endif +- +-static InlineX void Harr(signed char* pX0, signed char* pX1) +-{ +- /* Piecewise-Linear Harr(PLHarr) */ +- int X0 = (int)*pX0, X1 = (int)*pX1; +- int orgX0 = X0, orgX1 = X1; +- if ((X0 ^ X1) & 0x80) { +- /* differ sign */ +- X1 += X0; +- if (((X1^orgX1)&0x80)==0) { +- /* |X1| > |X0| */ +- X0 -= X1; /* H = -B */ +- } +- } else { +- /* same sign */ +- X0 -= X1; +- if (((X0 ^ orgX0) & 0x80) == 0) { +- /* |X0| > |X1| */ +- X1 += X0; /* L = A */ +- } +- } +- *pX0 = (signed char)X1; +- *pX1 = (signed char)X0; +-} +-/* +- 1D-Wavelet transform. +- +- In coefficients array, the famous 'pyramid' decomposition is well used. +- +- 1D Model: +- |L0L0L0L0|L0L0L0L0|H0H0H0H0|H0H0H0H0| : level 0 +- |L1L1L1L1|H1H1H1H1|H0H0H0H0|H0H0H0H0| : level 1 +- +- But this method needs line buffer because H/L is different position from X0/X1. +- So, I used 'interleave' decomposition instead of it. +- +- 1D Model: +- |L0H0L0H0|L0H0L0H0|L0H0L0H0|L0H0L0H0| : level 0 +- |L1H0H1H0|L1H0H1H0|L1H0H1H0|L1H0H1H0| : level 1 +- +- In this method, H/L and X0/X1 is always same position. +- This lead us to more speed and less memory. +- Of cause, the result of both method is quite same +- because it's only difference that coefficient position. +-*/ +-static InlineX void WaveletLevel(int* data, int size, int l, int SkipPixel) +-{ +- int s, ofs; +- signed char* pX0; +- signed char* end; +- +- pX0 = (signed char*)data; +- s = (8<>(l+1))*s; +- s -= 2; +- ofs = (4<>1; +- if (r & 0x02) +- pH += (s>>1)*width; +- for (y = 0; y < height / s; y++) { +- for (x = 0; x < width / s; x++) { +- /* +- these are same following code. +- pH[x] = pH[x] / (~pM[x]+1) * (~pM[x]+1); +- ( round pH[x] with pM[x] bit ) +- '&' operator isn't 'round' but is 'floor'. +- So, we must offset when pH[x] is negative. +- */ +- if (((signed char*)pH)[0] & 0x80) +- ((signed char*)pH)[0] += ~((signed char*)pM)[0]; +- if (((signed char*)pH)[1] & 0x80) +- ((signed char*)pH)[1] += ~((signed char*)pM)[1]; +- if (((signed char*)pH)[2] & 0x80) +- ((signed char*)pH)[2] += ~((signed char*)pM)[2]; +- *pH &= *pM; +- pH += s; +- } +- pH += (s-1)*width; +- } +- } +-} +-# else +-/* +- Type B:Non liner quantization filter. +- +- Coefficients have Gaussian curve and smaller value which is +- large part of coefficients isn't more important than larger value. +- So, I use filter of Non liner quantize/dequantize table. +- In general, Non liner quantize formula is explained as following. +- +- y=f(x) = sign(x)*round( ((abs(x)/(2^7))^ r )* 2^(bo-1) )*2^(8-bo) +- x=f-1(y) = sign(y)*round( ((abs(y)/(2^7))^(1/r))* 2^(bi-1) )*2^(8-bi) +- ( r:power coefficient bi:effective MSB in input bo:effective MSB in output ) +- +- r < 1.0 : Smaller value is more important than larger value. +- r > 1.0 : Larger value is more important than smaller value. +- r = 1.0 : Liner quantization which is same with EZW style. +- +- r = 0.75 is famous non liner quantization used in MP3 audio codec. +- In contrast to audio data, larger value is important in wavelet coefficients. +- So, I select r = 2.0 table( quantize is x^2, dequantize sqrt(x) ). +- +- As compared with EZW style liner quantization, this filter tended to be +- more sharp edge and be more compression rate but be more blocking noise and be less quality. +- Especially, the surface of graphic objects has distinguishable noise in middle quality mode. +- +- We need only quantized-dequantized(filtered) value rather than quantized value itself +- because all values are packed or palette-lized in later ZRLE section. +- This lead us not to need to modify client decoder when we change +- the filtering procedure in future. +- Client only decodes coefficients given by encoder. +-*/ +-static InlineX void FilterWaveletSquare(int* pBuf, int width, int height, int level, int l) +-{ +- int r, s; +- int x, y; +- int* pH; +- const signed char** pM; +- +- pM = zywrleParam[level-1][l]; +- s = 2<>1; +- if (r & 0x02) +- pH += (s>>1)*width; +- for (y = 0; y < height / s; y++) { +- for (x = 0; x < width / s; x++) { +- ((signed char*)pH)[0] = pM[0][((unsigned char*)pH)[0]]; +- ((signed char*)pH)[1] = pM[1][((unsigned char*)pH)[1]]; +- ((signed char*)pH)[2] = pM[2][((unsigned char*)pH)[2]]; +- pH += s; +- } +- pH += (s-1)*width; +- } +- } +-} +-# endif +- +-static InlineX void Wavelet(int* pBuf, int width, int height, int level) +-{ +- int l, s; +- int* pTop; +- int* pEnd; +- +- for (l = 0; l < level; l++) { +- pTop = pBuf; +- pEnd = pBuf+height*width; +- s = width<= 0; l--) { +- pTop = pBuf; +- pEnd = pBuf+width; +- s = 1< YUV conversion stuffs. +- YUV coversion is explained as following formula in strict meaning: +- Y = 0.299R + 0.587G + 0.114B ( 0<=Y<=255) +- U = -0.169R - 0.331G + 0.500B (-128<=U<=127) +- V = 0.500R - 0.419G - 0.081B (-128<=V<=127) +- +- I use simple conversion RCT(reversible color transform) which is described +- in JPEG-2000 specification. +- Y = (R + 2G + B)/4 ( 0<=Y<=255) +- U = B-G (-256<=U<=255) +- V = R-G (-256<=V<=255) +-*/ +-#define ROUND(x) (((x)<0)?0:(((x)>255)?255:(x))) +- /* RCT is N-bit RGB to N-bit Y and N+1-bit UV. +- For make Same N-bit, UV is lossy. +- More exact PLHarr, we reduce to odd range(-127<=x<=127). */ +-#define ZYWRLE_RGBYUV1(R,G,B,Y,U,V,ymask,uvmask) { \ +- Y = (R+(G<<1)+B)>>2; \ +- U = B-G; \ +- V = R-G; \ +- Y -= 128; \ +- U >>= 1; \ +- V >>= 1; \ +- Y &= ymask; \ +- U &= uvmask; \ +- V &= uvmask; \ +- if (Y == -128) \ +- Y += (0xFFFFFFFF-ymask+1); \ +- if (U == -128) \ +- U += (0xFFFFFFFF-uvmask+1); \ +- if (V == -128) \ +- V += (0xFFFFFFFF-uvmask+1); \ +-} +-#define ZYWRLE_YUVRGB1(R,G,B,Y,U,V) { \ +- Y += 128; \ +- U <<= 1; \ +- V <<= 1; \ +- G = Y-((U+V)>>2); \ +- B = U+G; \ +- R = V+G; \ +- G = ROUND(G); \ +- B = ROUND(B); \ +- R = ROUND(R); \ +-} +- +-/* +- coefficient packing/unpacking stuffs. +- Wavelet transform makes 4 sub coefficient image from 1 original image. +- +- model with pyramid decomposition: +- +------+------+ +- | | | +- | L | Hx | +- | | | +- +------+------+ +- | | | +- | H | Hxy | +- | | | +- +------+------+ +- +- So, we must transfer each sub images individually in strict meaning. +- But at least ZRLE meaning, following one decompositon image is same as +- avobe individual sub image. I use this format. +- (Strictly saying, transfer order is reverse(Hxy->Hy->Hx->L) +- for simplified procedure for any wavelet level.) +- +- +------+------+ +- | L | +- +------+------+ +- | Hx | +- +------+------+ +- | Hy | +- +------+------+ +- | Hxy | +- +------+------+ +-*/ +-#define INC_PTR(data) \ +- data++; \ +- if( data-pData >= (w+uw) ){ \ +- data += scanline-(w+uw); \ +- pData = data; \ +- } +- +-#define ZYWRLE_TRANSFER_COEFF(pBuf,data,r,w,h,scanline,level,TRANS) \ +- pH = pBuf; \ +- s = 2<>1; \ +- if (r & 0x02) \ +- pH += (s>>1)*w; \ +- pEnd = pH+h*w; \ +- while (pH < pEnd) { \ +- pLine = pH+w; \ +- while (pH < pLine) { \ +- TRANS \ +- INC_PTR(data) \ +- pH += s; \ +- } \ +- pH += (s-1)*w; \ +- } +- +-#define ZYWRLE_PACK_COEFF(pBuf,data,r,width,height,scanline,level) \ +- ZYWRLE_TRANSFER_COEFF(pBuf,data,r,width,height,scanline,level,ZYWRLE_LOAD_COEFF(pH,R,G,B);ZYWRLE_SAVE_PIXEL(data,R,G,B);) +- +-#define ZYWRLE_UNPACK_COEFF(pBuf,data,r,width,height,scanline,level) \ +- ZYWRLE_TRANSFER_COEFF(pBuf,data,r,width,height,scanline,level,ZYWRLE_LOAD_PIXEL(data,R,G,B);ZYWRLE_SAVE_COEFF(pH,R,G,B);) +- +-#define ZYWRLE_SAVE_UNALIGN(data,TRANS) \ +- pTop = pBuf+w*h; \ +- pEnd = pBuf + (w+uw)*(h+uh); \ +- while (pTop < pEnd) { \ +- TRANS \ +- INC_PTR(data) \ +- pTop++; \ +- } +- +-#define ZYWRLE_LOAD_UNALIGN(data,TRANS) \ +- pTop = pBuf+w*h; \ +- if (uw) { \ +- pData= data + w; \ +- pEnd = (int*)(pData+ h*scanline); \ +- while (pData < (PIXEL_T*)pEnd) { \ +- pLine = (int*)(pData + uw); \ +- while (pData < (PIXEL_T*)pLine) { \ +- TRANS \ +- pData++; \ +- pTop++; \ +- } \ +- pData += scanline-uw; \ +- } \ +- } \ +- if (uh) { \ +- pData= data + h*scanline; \ +- pEnd = (int*)(pData+ uh*scanline); \ +- while (pData < (PIXEL_T*)pEnd) { \ +- pLine = (int*)(pData + w); \ +- while (pData < (PIXEL_T*)pLine) { \ +- TRANS \ +- pData++; \ +- pTop++; \ +- } \ +- pData += scanline-w; \ +- } \ +- } \ +- if (uw && uh) { \ +- pData= data + w+ h*scanline; \ +- pEnd = (int*)(pData+ uh*scanline); \ +- while (pData < (PIXEL_T*)pEnd) { \ +- pLine = (int*)(pData + uw); \ +- while (pData < (PIXEL_T*)pLine) { \ +- TRANS \ +- pData++; \ +- pTop++; \ +- } \ +- pData += scanline-uw; \ +- } \ +- } +- +-static InlineX void zywrleCalcSize(int* pW, int* pH, int level) +-{ +- *pW &= ~((1<buffer, hdr.nSubrects * (4 + (BPP / 8)))) +- return FALSE; +- +- ptr = (uint8_t *)client->buffer; +- +- for (i = 0; i < hdr.nSubrects; i++) { +- pix = *(CARDBPP *)ptr; +- ptr += BPP/8; +- x = *ptr++; +- y = *ptr++; +- w = *ptr++; +- h = *ptr++; +- +- FillRectangle(client, rx+x, ry+y, w, h, pix); +- } +- +- return TRUE; +-} +- +-#undef CARDBPP +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/cursor.c b/remmina-plugins/vnc/libvncserver/libvncclient/cursor.c +deleted file mode 100644 +index a48d7c5..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/cursor.c ++++ /dev/null +@@ -1,179 +0,0 @@ +-/* +- * Copyright (C) 2001,2002 Constantin Kaplinsky. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* +- * cursor.c - code to support cursor shape updates (XCursor and +- * RichCursor preudo-encodings). +- */ +- +-#include +- +- +-#define OPER_SAVE 0 +-#define OPER_RESTORE 1 +- +-#define RGB24_TO_PIXEL(bpp,r,g,b) \ +- ((((uint##bpp##_t)(r) & 0xFF) * client->format.redMax + 127) / 255 \ +- << client->format.redShift | \ +- (((uint##bpp##_t)(g) & 0xFF) * client->format.greenMax + 127) / 255 \ +- << client->format.greenShift | \ +- (((uint##bpp##_t)(b) & 0xFF) * client->format.blueMax + 127) / 255 \ +- << client->format.blueShift) +- +- +-/********************************************************************* +- * HandleCursorShape(). Support for XCursor and RichCursor shape +- * updates. We emulate cursor operating on the frame buffer (that is +- * why we call it "software cursor"). +- ********************************************************************/ +- +-rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc) +-{ +- int bytesPerPixel; +- size_t bytesPerRow, bytesMaskData; +- rfbXCursorColors rgb; +- uint32_t colors[2]; +- char *buf; +- uint8_t *ptr; +- int x, y, b; +- +- bytesPerPixel = client->format.bitsPerPixel / 8; +- bytesPerRow = (width + 7) / 8; +- bytesMaskData = bytesPerRow * height; +- +- if (width * height == 0) +- return TRUE; +- +- /* Allocate memory for pixel data and temporary mask data. */ +- if(client->rcSource) +- free(client->rcSource); +- +- client->rcSource = malloc(width * height * bytesPerPixel); +- if (client->rcSource == NULL) +- return FALSE; +- +- buf = malloc(bytesMaskData); +- if (buf == NULL) { +- free(client->rcSource); +- client->rcSource = NULL; +- return FALSE; +- } +- +- /* Read and decode cursor pixel data, depending on the encoding type. */ +- +- if (enc == rfbEncodingXCursor) { +- /* Read and convert background and foreground colors. */ +- if (!ReadFromRFBServer(client, (char *)&rgb, sz_rfbXCursorColors)) { +- free(client->rcSource); +- client->rcSource = NULL; +- free(buf); +- return FALSE; +- } +- colors[0] = RGB24_TO_PIXEL(32, rgb.backRed, rgb.backGreen, rgb.backBlue); +- colors[1] = RGB24_TO_PIXEL(32, rgb.foreRed, rgb.foreGreen, rgb.foreBlue); +- +- /* Read 1bpp pixel data into a temporary buffer. */ +- if (!ReadFromRFBServer(client, buf, bytesMaskData)) { +- free(client->rcSource); +- client->rcSource = NULL; +- free(buf); +- return FALSE; +- } +- +- /* Convert 1bpp data to byte-wide color indices. */ +- ptr = client->rcSource; +- for (y = 0; y < height; y++) { +- for (x = 0; x < width / 8; x++) { +- for (b = 7; b >= 0; b--) { +- *ptr = buf[y * bytesPerRow + x] >> b & 1; +- ptr += bytesPerPixel; +- } +- } +- for (b = 7; b > 7 - width % 8; b--) { +- *ptr = buf[y * bytesPerRow + x] >> b & 1; +- ptr += bytesPerPixel; +- } +- } +- +- /* Convert indices into the actual pixel values. */ +- switch (bytesPerPixel) { +- case 1: +- for (x = 0; x < width * height; x++) +- client->rcSource[x] = (uint8_t)colors[client->rcSource[x]]; +- break; +- case 2: +- for (x = 0; x < width * height; x++) +- ((uint16_t *)client->rcSource)[x] = (uint16_t)colors[client->rcSource[x * 2]]; +- break; +- case 4: +- for (x = 0; x < width * height; x++) +- ((uint32_t *)client->rcSource)[x] = colors[client->rcSource[x * 4]]; +- break; +- } +- +- } else { /* enc == rfbEncodingRichCursor */ +- +- if (!ReadFromRFBServer(client, (char *)client->rcSource, width * height * bytesPerPixel)) { +- free(client->rcSource); +- client->rcSource = NULL; +- free(buf); +- return FALSE; +- } +- +- } +- +- /* Read and decode mask data. */ +- +- if (!ReadFromRFBServer(client, buf, bytesMaskData)) { +- free(client->rcSource); +- client->rcSource = NULL; +- free(buf); +- return FALSE; +- } +- +- client->rcMask = malloc(width * height); +- if (client->rcMask == NULL) { +- free(client->rcSource); +- client->rcSource = NULL; +- free(buf); +- return FALSE; +- } +- +- ptr = client->rcMask; +- for (y = 0; y < height; y++) { +- for (x = 0; x < width / 8; x++) { +- for (b = 7; b >= 0; b--) { +- *ptr++ = buf[y * bytesPerRow + x] >> b & 1; +- } +- } +- for (b = 7; b > 7 - width % 8; b--) { +- *ptr++ = buf[y * bytesPerRow + x] >> b & 1; +- } +- } +- +- if (client->GotCursorShape != NULL) { +- client->GotCursorShape(client, xhot, yhot, width, height, bytesPerPixel); +- } +- +- free(buf); +- +- return TRUE; +-} +- +- +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/hextile.c b/remmina-plugins/vnc/libvncserver/libvncclient/hextile.c +deleted file mode 100644 +index 8698445..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/hextile.c ++++ /dev/null +@@ -1,127 +0,0 @@ +-/* +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* +- * hextile.c - handle hextile encoding. +- * +- * This file shouldn't be compiled directly. It is included multiple times by +- * rfbproto.c, each time with a different definition of the macro BPP. For +- * each value of BPP, this file defines a function which handles a hextile +- * encoded rectangle with BPP bits per pixel. +- */ +- +-#define HandleHextileBPP CONCAT2E(HandleHextile,BPP) +-#define CARDBPP CONCAT3E(uint,BPP,_t) +- +-static rfbBool +-HandleHextileBPP (rfbClient* client, int rx, int ry, int rw, int rh) +-{ +- CARDBPP bg, fg; +- int i; +- uint8_t *ptr; +- int x, y, w, h; +- int sx, sy, sw, sh; +- uint8_t subencoding; +- uint8_t nSubrects; +- +- for (y = ry; y < ry+rh; y += 16) { +- for (x = rx; x < rx+rw; x += 16) { +- w = h = 16; +- if (rx+rw - x < 16) +- w = rx+rw - x; +- if (ry+rh - y < 16) +- h = ry+rh - y; +- +- if (!ReadFromRFBServer(client, (char *)&subencoding, 1)) +- return FALSE; +- +- if (subencoding & rfbHextileRaw) { +- if (!ReadFromRFBServer(client, client->buffer, w * h * (BPP / 8))) +- return FALSE; +- +- CopyRectangle(client, (uint8_t *)client->buffer, x, y, w, h); +- +- continue; +- } +- +- if (subencoding & rfbHextileBackgroundSpecified) +- if (!ReadFromRFBServer(client, (char *)&bg, sizeof(bg))) +- return FALSE; +- +- FillRectangle(client, x, y, w, h, bg); +- +- if (subencoding & rfbHextileForegroundSpecified) +- if (!ReadFromRFBServer(client, (char *)&fg, sizeof(fg))) +- return FALSE; +- +- if (!(subencoding & rfbHextileAnySubrects)) { +- continue; +- } +- +- if (!ReadFromRFBServer(client, (char *)&nSubrects, 1)) +- return FALSE; +- +- ptr = (uint8_t*)client->buffer; +- +- if (subencoding & rfbHextileSubrectsColoured) { +- if (!ReadFromRFBServer(client, client->buffer, nSubrects * (2 + (BPP / 8)))) +- return FALSE; +- +- for (i = 0; i < nSubrects; i++) { +-#if BPP==8 +- GET_PIXEL8(fg, ptr); +-#elif BPP==16 +- GET_PIXEL16(fg, ptr); +-#elif BPP==32 +- GET_PIXEL32(fg, ptr); +-#else +-#error "Invalid BPP" +-#endif +- sx = rfbHextileExtractX(*ptr); +- sy = rfbHextileExtractY(*ptr); +- ptr++; +- sw = rfbHextileExtractW(*ptr); +- sh = rfbHextileExtractH(*ptr); +- ptr++; +- +- FillRectangle(client, x+sx, y+sy, sw, sh, fg); +- } +- +- } else { +- if (!ReadFromRFBServer(client, client->buffer, nSubrects * 2)) +- return FALSE; +- +- for (i = 0; i < nSubrects; i++) { +- sx = rfbHextileExtractX(*ptr); +- sy = rfbHextileExtractY(*ptr); +- ptr++; +- sw = rfbHextileExtractW(*ptr); +- sh = rfbHextileExtractH(*ptr); +- ptr++; +- +- FillRectangle(client, x+sx, y+sy, sw, sh, fg); +- } +- } +- } +- } +- +- return TRUE; +-} +- +-#undef CARDBPP +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/listen.c b/remmina-plugins/vnc/libvncserver/libvncclient/listen.c +deleted file mode 100644 +index 58275a0..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/listen.c ++++ /dev/null +@@ -1,172 +0,0 @@ +-/* +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* +- * listen.c - listen for incoming connections +- */ +- +-#ifdef __STRICT_ANSI__ +-#define _BSD_SOURCE +-#endif +-#include +-#include +-#ifdef __MINGW32__ +-#define close closesocket +-#include +-#undef max +-#else +-#include +-#include +-#endif +-#include +-#include +- +-/* +- * listenForIncomingConnections() - listen for incoming connections from +- * servers, and fork a new process to deal with each connection. +- */ +- +-void +-listenForIncomingConnections(rfbClient* client) +-{ +-#ifdef __MINGW32__ +- /* FIXME */ +- rfbClientErr("listenForIncomingConnections on MinGW32 NOT IMPLEMENTED\n"); +- return; +-#else +- int listenSocket; +- fd_set fds; +- +- client->listenSpecified = TRUE; +- +- listenSocket = ListenAtTcpPort(client->listenPort); +- +- if ((listenSocket < 0)) +- return; +- +- rfbClientLog("%s -listen: Listening on port %d\n", +- client->programName,client->listenPort); +- rfbClientLog("%s -listen: Command line errors are not reported until " +- "a connection comes in.\n", client->programName); +- +- while (TRUE) { +- +- /* reap any zombies */ +- int status, pid; +- while ((pid= wait3(&status, WNOHANG, (struct rusage *)0))>0); +- +- /* TODO: callback for discard any events (like X11 events) */ +- +- FD_ZERO(&fds); +- +- FD_SET(listenSocket, &fds); +- +- select(listenSocket+1, &fds, NULL, NULL, NULL); +- +- if (FD_ISSET(listenSocket, &fds)) { +- client->sock = AcceptTcpConnection(listenSocket); +- if (client->sock < 0) +- return; +- if (!SetNonBlocking(client->sock)) +- return; +- +- /* Now fork off a new process to deal with it... */ +- +- switch (fork()) { +- +- case -1: +- rfbClientErr("fork\n"); +- return; +- +- case 0: +- /* child - return to caller */ +- close(listenSocket); +- return; +- +- default: +- /* parent - go round and listen again */ +- close(client->sock); +- break; +- } +- } +- } +-#endif +-} +- +- +- +-/* +- * listenForIncomingConnectionsNoFork() - listen for incoming connections +- * from servers, but DON'T fork, instead just wait timeout microseconds. +- * If timeout is negative, block indefinitly. +- * Returns 1 on success (there was an incoming connection on the listen socket +- * and we accepted it successfully), -1 on error, 0 on timeout. +- */ +- +-int +-listenForIncomingConnectionsNoFork(rfbClient* client, int timeout) +-{ +- fd_set fds; +- struct timeval to; +- int r; +- +- to.tv_sec= timeout / 1000000; +- to.tv_usec= timeout % 1000000; +- +- client->listenSpecified = TRUE; +- +- if (client->listenSock < 0) +- { +- client->listenSock = ListenAtTcpPort(client->listenPort); +- +- if (client->listenSock < 0) +- return -1; +- +- rfbClientLog("%s -listennofork: Listening on port %d\n", +- client->programName,client->listenPort); +- rfbClientLog("%s -listennofork: Command line errors are not reported until " +- "a connection comes in.\n", client->programName); +- } +- +- FD_ZERO(&fds); +- +- FD_SET(client->listenSock, &fds); +- +- if (timeout < 0) +- r = select(client->listenSock+1, &fds, NULL, NULL, NULL); +- else +- r = select(client->listenSock+1, &fds, NULL, NULL, &to); +- +- if (r > 0) +- { +- client->sock = AcceptTcpConnection(client->listenSock); +- if (client->sock < 0) +- return -1; +- if (!SetNonBlocking(client->sock)) +- return -1; +- +- close(client->listenSock); +- return r; +- } +- +- /* r is now either 0 (timeout) or -1 (error) */ +- return r; +-} +- +- +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/rfbproto.c b/remmina-plugins/vnc/libvncserver/libvncclient/rfbproto.c +deleted file mode 100644 +index a7faab1..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/rfbproto.c ++++ /dev/null +@@ -1,2406 +0,0 @@ +-/* +- * Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved. +- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* +- * rfbproto.c - functions to deal with client side of RFB protocol. +- */ +- +-#ifdef __STRICT_ANSI__ +-#define _BSD_SOURCE +-#define _POSIX_SOURCE +-#endif +-#ifndef WIN32 +-#include +-#include +-#include +-#include +-#endif +-#include +-#include +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-#include +-#ifdef __CHECKER__ +-#undef Z_NULL +-#define Z_NULL NULL +-#endif +-#endif +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +-#ifdef _RPCNDR_H /* This Windows header typedefs 'boolean', jpeglib has to know */ +-#define HAVE_BOOLEAN +-#endif +-#include +-#endif +-#include +-#include +- +-#ifdef LIBVNCSERVER_WITH_CLIENT_GCRYPT +-#ifdef WIN32 +-#undef SOCKET +-#undef socklen_t +-#endif +-#include +-#endif +- +-#include "minilzo.h" +-#include "tls.h" +- +-/* +- * rfbClientLog prints a time-stamped message to the log file (stderr). +- */ +- +-rfbBool rfbEnableClientLogging=TRUE; +- +-static void +-rfbDefaultClientLog(const char *format, ...) +-{ +- va_list args; +- char buf[256]; +- time_t log_clock; +- +- if(!rfbEnableClientLogging) +- return; +- +- va_start(args, format); +- +- time(&log_clock); +- strftime(buf, 255, "%d/%m/%Y %X ", localtime(&log_clock)); +- fprintf(stderr, "%s", buf); +- +- vfprintf(stderr, format, args); +- fflush(stderr); +- +- va_end(args); +-} +- +-rfbClientLogProc rfbClientLog=rfbDefaultClientLog; +-rfbClientLogProc rfbClientErr=rfbDefaultClientLog; +- +-/* extensions */ +- +-rfbClientProtocolExtension* rfbClientExtensions = NULL; +- +-void rfbClientRegisterExtension(rfbClientProtocolExtension* e) +-{ +- e->next = rfbClientExtensions; +- rfbClientExtensions = e; +-} +- +-/* client data */ +- +-void rfbClientSetClientData(rfbClient* client, void* tag, void* data) +-{ +- rfbClientData* clientData = client->clientData; +- +- while(clientData && clientData->tag != tag) +- clientData = clientData->next; +- if(clientData == NULL) { +- clientData = calloc(sizeof(rfbClientData), 1); +- clientData->next = client->clientData; +- client->clientData = clientData; +- clientData->tag = tag; +- } +- +- clientData->data = data; +-} +- +-void* rfbClientGetClientData(rfbClient* client, void* tag) +-{ +- rfbClientData* clientData = client->clientData; +- +- while(clientData) { +- if(clientData->tag == tag) +- return clientData->data; +- clientData = clientData->next; +- } +- +- return NULL; +-} +- +-/* messages */ +- +-static void FillRectangle(rfbClient* client, int x, int y, int w, int h, uint32_t colour) { +- int i,j; +- +-#define FILL_RECT(BPP) \ +- for(j=y*client->width;j<(y+h)*client->width;j+=client->width) \ +- for(i=x;iframeBuffer)[j+i]=colour; +- +- switch(client->format.bitsPerPixel) { +- case 8: FILL_RECT(8); break; +- case 16: FILL_RECT(16); break; +- case 32: FILL_RECT(32); break; +- default: +- rfbClientLog("Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel); +- } +-} +- +-static void CopyRectangle(rfbClient* client, uint8_t* buffer, int x, int y, int w, int h) { +- int j; +- +-#define COPY_RECT(BPP) \ +- { \ +- int rs = w * BPP / 8, rs2 = client->width * BPP / 8; \ +- for (j = ((x * (BPP / 8)) + (y * rs2)); j < (y + h) * rs2; j += rs2) { \ +- memcpy(client->frameBuffer + j, buffer, rs); \ +- buffer += rs; \ +- } \ +- } +- +- switch(client->format.bitsPerPixel) { +- case 8: COPY_RECT(8); break; +- case 16: COPY_RECT(16); break; +- case 32: COPY_RECT(32); break; +- default: +- rfbClientLog("Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel); +- } +-} +- +-/* TODO: test */ +-static void CopyRectangleFromRectangle(rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y) { +- int i,j; +- +-#define COPY_RECT_FROM_RECT(BPP) \ +- { \ +- uint##BPP##_t* _buffer=((uint##BPP##_t*)client->frameBuffer)+(src_y-dest_y)*client->width+src_x-dest_x; \ +- if (dest_y < src_y) { \ +- for(j = dest_y*client->width; j < (dest_y+h)*client->width; j += client->width) { \ +- if (dest_x < src_x) { \ +- for(i = dest_x; i < dest_x+w; i++) { \ +- ((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \ +- } \ +- } else { \ +- for(i = dest_x+w-1; i >= dest_x; i--) { \ +- ((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \ +- } \ +- } \ +- } \ +- } else { \ +- for(j = (dest_y+h-1)*client->width; j >= dest_y*client->width; j-=client->width) { \ +- if (dest_x < src_x) { \ +- for(i = dest_x; i < dest_x+w; i++) { \ +- ((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \ +- } \ +- } else { \ +- for(i = dest_x+w-1; i >= dest_x; i--) { \ +- ((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \ +- } \ +- } \ +- } \ +- } \ +- } +- +- switch(client->format.bitsPerPixel) { +- case 8: COPY_RECT_FROM_RECT(8); break; +- case 16: COPY_RECT_FROM_RECT(16); break; +- case 32: COPY_RECT_FROM_RECT(32); break; +- default: +- rfbClientLog("Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel); +- } +-} +- +-static rfbBool HandleRRE8(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleRRE16(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleRRE32(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleCoRRE8(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleCoRRE16(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleCoRRE32(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleHextile8(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleHextile16(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleHextile32(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleUltra8(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleUltra16(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleUltra32(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleUltraZip8(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleUltraZip16(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleUltraZip32(rfbClient* client, int rx, int ry, int rw, int rh); +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-static rfbBool HandleZlib8(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleZlib16(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleZlib32(rfbClient* client, int rx, int ry, int rw, int rh); +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +-static rfbBool HandleTight8(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleTight16(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleTight32(rfbClient* client, int rx, int ry, int rw, int rh); +- +-static long ReadCompactLen (rfbClient* client); +- +-static void JpegInitSource(j_decompress_ptr cinfo); +-static boolean JpegFillInputBuffer(j_decompress_ptr cinfo); +-static void JpegSkipInputData(j_decompress_ptr cinfo, long num_bytes); +-static void JpegTermSource(j_decompress_ptr cinfo); +-static void JpegSetSrcManager(j_decompress_ptr cinfo, uint8_t *compressedData, +- int compressedLen); +-#endif +-static rfbBool HandleZRLE8(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleZRLE15(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleZRLE16(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleZRLE24(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleZRLE24Up(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleZRLE24Down(rfbClient* client, int rx, int ry, int rw, int rh); +-static rfbBool HandleZRLE32(rfbClient* client, int rx, int ry, int rw, int rh); +-#endif +- +-/* +- * Server Capability Functions +- */ +-rfbBool +-SupportsClient2Server(rfbClient* client, int messageType) +-{ +- return (client->supportedMessages.client2server[((messageType & 0xFF)/8)] & (1<<(messageType % 8)) ? TRUE : FALSE); +-} +- +-rfbBool +-SupportsServer2Client(rfbClient* client, int messageType) +-{ +- return (client->supportedMessages.server2client[((messageType & 0xFF)/8)] & (1<<(messageType % 8)) ? TRUE : FALSE); +-} +- +-void +-SetClient2Server(rfbClient* client, int messageType) +-{ +- client->supportedMessages.client2server[((messageType & 0xFF)/8)] |= (1<<(messageType % 8)); +-} +- +-void +-SetServer2Client(rfbClient* client, int messageType) +-{ +- client->supportedMessages.server2client[((messageType & 0xFF)/8)] |= (1<<(messageType % 8)); +-} +- +-void +-ClearClient2Server(rfbClient* client, int messageType) +-{ +- client->supportedMessages.client2server[((messageType & 0xFF)/8)] &= (!(1<<(messageType % 8))); +-} +- +-void +-ClearServer2Client(rfbClient* client, int messageType) +-{ +- client->supportedMessages.server2client[((messageType & 0xFF)/8)] &= (!(1<<(messageType % 8))); +-} +- +- +-void +-DefaultSupportedMessages(rfbClient* client) +-{ +- memset((char *)&client->supportedMessages,0,sizeof(client->supportedMessages)); +- +- /* Default client supported messages (universal RFB 3.3 protocol) */ +- SetClient2Server(client, rfbSetPixelFormat); +- /* SetClient2Server(client, rfbFixColourMapEntries); Not currently supported */ +- SetClient2Server(client, rfbSetEncodings); +- SetClient2Server(client, rfbFramebufferUpdateRequest); +- SetClient2Server(client, rfbKeyEvent); +- SetClient2Server(client, rfbPointerEvent); +- SetClient2Server(client, rfbClientCutText); +- /* technically, we only care what we can *send* to the server +- * but, we set Server2Client Just in case it ever becomes useful +- */ +- SetServer2Client(client, rfbFramebufferUpdate); +- SetServer2Client(client, rfbSetColourMapEntries); +- SetServer2Client(client, rfbBell); +- SetServer2Client(client, rfbServerCutText); +-} +- +-void +-DefaultSupportedMessagesUltraVNC(rfbClient* client) +-{ +- DefaultSupportedMessages(client); +- SetClient2Server(client, rfbFileTransfer); +- SetClient2Server(client, rfbSetScale); +- SetClient2Server(client, rfbSetServerInput); +- SetClient2Server(client, rfbSetSW); +- SetClient2Server(client, rfbTextChat); +- SetClient2Server(client, rfbPalmVNCSetScaleFactor); +- /* technically, we only care what we can *send* to the server */ +- SetServer2Client(client, rfbResizeFrameBuffer); +- SetServer2Client(client, rfbPalmVNCReSizeFrameBuffer); +- SetServer2Client(client, rfbFileTransfer); +- SetServer2Client(client, rfbTextChat); +-} +- +- +-void +-DefaultSupportedMessagesTightVNC(rfbClient* client) +-{ +- DefaultSupportedMessages(client); +- SetClient2Server(client, rfbFileTransfer); +- SetClient2Server(client, rfbSetServerInput); +- SetClient2Server(client, rfbSetSW); +- /* SetClient2Server(client, rfbTextChat); */ +- /* technically, we only care what we can *send* to the server */ +- SetServer2Client(client, rfbFileTransfer); +- SetServer2Client(client, rfbTextChat); +-} +- +-#ifndef WIN32 +-static rfbBool +-IsUnixSocket(const char *name) +-{ +- struct stat sb; +- if(stat(name, &sb) == 0 && (sb.st_mode & S_IFMT) == S_IFSOCK) +- return TRUE; +- return FALSE; +-} +-#endif +- +-/* +- * ConnectToRFBServer. +- */ +- +-rfbBool +-ConnectToRFBServer(rfbClient* client,const char *hostname, int port) +-{ +- if (client->serverPort==-1) { +- /* serverHost is a file recorded by vncrec. */ +- const char* magic="vncLog0.0"; +- char buffer[10]; +- rfbVNCRec* rec = (rfbVNCRec*)malloc(sizeof(rfbVNCRec)); +- client->vncRec = rec; +- +- rec->file = fopen(client->serverHost,"rb"); +- rec->tv.tv_sec = 0; +- rec->readTimestamp = FALSE; +- rec->doNotSleep = FALSE; +- +- if (!rec->file) { +- rfbClientLog("Could not open %s.\n",client->serverHost); +- return FALSE; +- } +- setbuf(rec->file,NULL); +- fread(buffer,1,strlen(magic),rec->file); +- if (strncmp(buffer,magic,strlen(magic))) { +- rfbClientLog("File %s was not recorded by vncrec.\n",client->serverHost); +- fclose(rec->file); +- return FALSE; +- } +- client->sock = -1; +- return TRUE; +- } +- +-#ifndef WIN32 +- if(IsUnixSocket(hostname)) +- /* serverHost is a UNIX socket. */ +- client->sock = ConnectClientToUnixSock(hostname); +- else +-#endif +- { +-#ifdef LIBVNCSERVER_IPv6 +- client->sock = ConnectClientToTcpAddr6(hostname, port); +- if (client->sock == -1) +-#endif +- { +- unsigned int host; +- +- /* serverHost is a hostname */ +- if (!StringToIPAddr(hostname, &host)) { +- rfbClientLog("Couldn't convert '%s' to host address\n", hostname); +- return FALSE; +- } +- client->sock = ConnectClientToTcpAddr(host, port); +- } +- } +- +- if (client->sock < 0) { +- rfbClientLog("Unable to connect to VNC server\n"); +- return FALSE; +- } +- +- if(client->QoS_DSCP && !SetDSCP(client->sock, client->QoS_DSCP)) +- return FALSE; +- +- return SetNonBlocking(client->sock); +-} +- +-/* +- * ConnectToRFBRepeater. +- */ +- +-rfbBool ConnectToRFBRepeater(rfbClient* client,const char *repeaterHost, int repeaterPort, const char *destHost, int destPort) +-{ +- rfbProtocolVersionMsg pv; +- int major,minor; +- char tmphost[250]; +- +-#ifdef LIBVNCSERVER_IPv6 +- client->sock = ConnectClientToTcpAddr6(repeaterHost, repeaterPort); +- if (client->sock == -1) +-#endif +- { +- unsigned int host; +- if (!StringToIPAddr(repeaterHost, &host)) { +- rfbClientLog("Couldn't convert '%s' to host address\n", repeaterHost); +- return FALSE; +- } +- +- client->sock = ConnectClientToTcpAddr(host, repeaterPort); +- } +- +- if (client->sock < 0) { +- rfbClientLog("Unable to connect to VNC repeater\n"); +- return FALSE; +- } +- +- if (!SetNonBlocking(client->sock)) +- return FALSE; +- +- if (!ReadFromRFBServer(client, pv, sz_rfbProtocolVersionMsg)) +- return FALSE; +- pv[sz_rfbProtocolVersionMsg] = 0; +- +- /* UltraVNC repeater always report version 000.000 to identify itself */ +- if (sscanf(pv,rfbProtocolVersionFormat,&major,&minor) != 2 || major != 0 || minor != 0) { +- rfbClientLog("Not a valid VNC repeater (%s)\n",pv); +- return FALSE; +- } +- +- rfbClientLog("Connected to VNC repeater, using protocol version %d.%d\n", major, minor); +- +- snprintf(tmphost, sizeof(tmphost), "%s:%d", destHost, destPort); +- if (!WriteToRFBServer(client, tmphost, sizeof(tmphost))) +- return FALSE; +- +- return TRUE; +-} +- +-extern void rfbClientEncryptBytes(unsigned char* bytes, char* passwd); +-extern void rfbClientEncryptBytes2(unsigned char *where, const int length, unsigned char *key); +- +-rfbBool +-rfbHandleAuthResult(rfbClient* client) +-{ +- uint32_t authResult=0, reasonLen=0; +- char *reason=NULL; +- +- if (!ReadFromRFBServer(client, (char *)&authResult, 4)) return FALSE; +- +- authResult = rfbClientSwap32IfLE(authResult); +- +- switch (authResult) { +- case rfbVncAuthOK: +- rfbClientLog("VNC authentication succeeded\n"); +- return TRUE; +- break; +- case rfbVncAuthFailed: +- if (client->major==3 && client->minor>7) +- { +- /* we have an error following */ +- if (!ReadFromRFBServer(client, (char *)&reasonLen, 4)) return FALSE; +- reasonLen = rfbClientSwap32IfLE(reasonLen); +- reason = malloc(reasonLen+1); +- if (!ReadFromRFBServer(client, reason, reasonLen)) { free(reason); return FALSE; } +- reason[reasonLen]=0; +- rfbClientLog("VNC connection failed: %s\n",reason); +- free(reason); +- return FALSE; +- } +- rfbClientLog("VNC authentication failed\n"); +- return FALSE; +- case rfbVncAuthTooMany: +- rfbClientLog("VNC authentication failed - too many tries\n"); +- return FALSE; +- } +- +- rfbClientLog("Unknown VNC authentication result: %d\n", +- (int)authResult); +- return FALSE; +-} +- +-static void +-ReadReason(rfbClient* client) +-{ +- uint32_t reasonLen; +- char *reason; +- +- /* we have an error following */ +- if (!ReadFromRFBServer(client, (char *)&reasonLen, 4)) return; +- reasonLen = rfbClientSwap32IfLE(reasonLen); +- reason = malloc(reasonLen+1); +- if (!ReadFromRFBServer(client, reason, reasonLen)) { free(reason); return; } +- reason[reasonLen]=0; +- rfbClientLog("VNC connection failed: %s\n",reason); +- free(reason); +-} +- +-static rfbBool +-ReadSupportedSecurityType(rfbClient* client, uint32_t *result, rfbBool subAuth) +-{ +- uint8_t count=0; +- uint8_t loop=0; +- uint8_t flag=0; +- uint8_t tAuth[256]; +- char buf1[500],buf2[10]; +- uint32_t authScheme; +- +- if (!ReadFromRFBServer(client, (char *)&count, 1)) return FALSE; +- +- if (count==0) +- { +- rfbClientLog("List of security types is ZERO, expecting an error to follow\n"); +- ReadReason(client); +- return FALSE; +- } +- +- rfbClientLog("We have %d security types to read\n", count); +- authScheme=0; +- /* now, we have a list of available security types to read ( uint8_t[] ) */ +- for (loop=0;loopGetCredential) || +- (!subAuth && (tAuth[loop]==rfbTLS || (tAuth[loop]==rfbVeNCrypt && client->GetCredential)))) +- { +- if (!subAuth && client->clientAuthSchemes) +- { +- int i; +- for (i=0;client->clientAuthSchemes[i];i++) +- { +- if (client->clientAuthSchemes[i]==(uint32_t)tAuth[loop]) +- { +- flag++; +- authScheme=tAuth[loop]; +- break; +- } +- } +- } +- else +- { +- flag++; +- authScheme=tAuth[loop]; +- } +- if (flag) +- { +- rfbClientLog("Selecting security type %d (%d/%d in the list)\n", authScheme, loop, count); +- /* send back a single byte indicating which security type to use */ +- if (!WriteToRFBServer(client, (char *)&tAuth[loop], 1)) return FALSE; +- } +- } +- } +- if (authScheme==0) +- { +- memset(buf1, 0, sizeof(buf1)); +- for (loop=0;loop=sizeof(buf1)-1) break; +- snprintf(buf2, sizeof(buf2), (loop>0 ? ", %d" : "%d"), (int)tAuth[loop]); +- strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1); +- } +- rfbClientLog("Unknown authentication scheme from VNC server: %s\n", +- buf1); +- return FALSE; +- } +- *result = authScheme; +- return TRUE; +-} +- +-static rfbBool +-HandleVncAuth(rfbClient *client) +-{ +- uint8_t challenge[CHALLENGESIZE]; +- char *passwd=NULL; +- int i; +- +- if (!ReadFromRFBServer(client, (char *)challenge, CHALLENGESIZE)) return FALSE; +- +- if (client->serverPort!=-1) { /* if not playing a vncrec file */ +- if (client->GetPassword) +- passwd = client->GetPassword(client); +- +- if ((!passwd) || (strlen(passwd) == 0)) { +- rfbClientLog("Reading password failed\n"); +- return FALSE; +- } +- if (strlen(passwd) > 8) { +- passwd[8] = '\0'; +- } +- +- rfbClientEncryptBytes(challenge, passwd); +- +- /* Lose the password from memory */ +- for (i = strlen(passwd); i >= 0; i--) { +- passwd[i] = '\0'; +- } +- free(passwd); +- +- if (!WriteToRFBServer(client, (char *)challenge, CHALLENGESIZE)) return FALSE; +- } +- +- /* Handle the SecurityResult message */ +- if (!rfbHandleAuthResult(client)) return FALSE; +- +- return TRUE; +-} +- +-static void +-FreeUserCredential(rfbCredential *cred) +-{ +- if (cred->userCredential.username) free(cred->userCredential.username); +- if (cred->userCredential.password) free(cred->userCredential.password); +- free(cred); +-} +- +-static rfbBool +-HandlePlainAuth(rfbClient *client) +-{ +- uint32_t ulen, ulensw; +- uint32_t plen, plensw; +- rfbCredential *cred; +- +- if (!client->GetCredential) +- { +- rfbClientLog("GetCredential callback is not set.\n"); +- return FALSE; +- } +- cred = client->GetCredential(client, rfbCredentialTypeUser); +- if (!cred) +- { +- rfbClientLog("Reading credential failed\n"); +- return FALSE; +- } +- +- ulen = (cred->userCredential.username ? strlen(cred->userCredential.username) : 0); +- ulensw = rfbClientSwap32IfLE(ulen); +- plen = (cred->userCredential.password ? strlen(cred->userCredential.password) : 0); +- plensw = rfbClientSwap32IfLE(plen); +- if (!WriteToRFBServer(client, (char *)&ulensw, 4) || +- !WriteToRFBServer(client, (char *)&plensw, 4)) +- { +- FreeUserCredential(cred); +- return FALSE; +- } +- if (ulen > 0) +- { +- if (!WriteToRFBServer(client, cred->userCredential.username, ulen)) +- { +- FreeUserCredential(cred); +- return FALSE; +- } +- } +- if (plen > 0) +- { +- if (!WriteToRFBServer(client, cred->userCredential.password, plen)) +- { +- FreeUserCredential(cred); +- return FALSE; +- } +- } +- +- FreeUserCredential(cred); +- +- /* Handle the SecurityResult message */ +- if (!rfbHandleAuthResult(client)) return FALSE; +- +- return TRUE; +-} +- +-/* Simple 64bit big integer arithmetic implementation */ +-/* (x + y) % m, works even if (x + y) > 64bit */ +-#define rfbAddM64(x,y,m) ((x+y)%m+(x+y0;x>>=1) +- { +- if (x&1) r=rfbAddM64(r,y,m); +- y=rfbAddM64(y,y,m); +- } +- return r; +-} +-/* (x ^ y) % m */ +-static uint64_t +-rfbPowM64(uint64_t b, uint64_t e, uint64_t m) +-{ +- uint64_t r; +- for(r=1;e>0;e>>=1) +- { +- if(e&1) r=rfbMulM64(r,b,m); +- b=rfbMulM64(b,b,m); +- } +- return r; +-} +- +-static rfbBool +-HandleMSLogonAuth(rfbClient *client) +-{ +- uint64_t gen, mod, resp, priv, pub, key; +- uint8_t username[256], password[64]; +- rfbCredential *cred; +- +- if (!ReadFromRFBServer(client, (char *)&gen, 8)) return FALSE; +- if (!ReadFromRFBServer(client, (char *)&mod, 8)) return FALSE; +- if (!ReadFromRFBServer(client, (char *)&resp, 8)) return FALSE; +- gen = rfbClientSwap64IfLE(gen); +- mod = rfbClientSwap64IfLE(mod); +- resp = rfbClientSwap64IfLE(resp); +- +- if (!client->GetCredential) +- { +- rfbClientLog("GetCredential callback is not set.\n"); +- return FALSE; +- } +- rfbClientLog("WARNING! MSLogon security type has very low password encryption! "\ +- "Use it only with SSH tunnel or trusted network.\n"); +- cred = client->GetCredential(client, rfbCredentialTypeUser); +- if (!cred) +- { +- rfbClientLog("Reading credential failed\n"); +- return FALSE; +- } +- +- memset(username, 0, sizeof(username)); +- strncpy((char *)username, cred->userCredential.username, sizeof(username)); +- memset(password, 0, sizeof(password)); +- strncpy((char *)password, cred->userCredential.password, sizeof(password)); +- FreeUserCredential(cred); +- +- srand(time(NULL)); +- priv = ((uint64_t)rand())<<32; +- priv |= (uint64_t)rand(); +- +- pub = rfbPowM64(gen, priv, mod); +- key = rfbPowM64(resp, priv, mod); +- pub = rfbClientSwap64IfLE(pub); +- key = rfbClientSwap64IfLE(key); +- +- rfbClientEncryptBytes2(username, sizeof(username), (unsigned char *)&key); +- rfbClientEncryptBytes2(password, sizeof(password), (unsigned char *)&key); +- +- if (!WriteToRFBServer(client, (char *)&pub, 8)) return FALSE; +- if (!WriteToRFBServer(client, (char *)username, sizeof(username))) return FALSE; +- if (!WriteToRFBServer(client, (char *)password, sizeof(password))) return FALSE; +- +- /* Handle the SecurityResult message */ +- if (!rfbHandleAuthResult(client)) return FALSE; +- +- return TRUE; +-} +- +-#ifdef LIBVNCSERVER_WITH_CLIENT_GCRYPT +-static rfbBool +-rfbMpiToBytes(const gcry_mpi_t value, uint8_t *result, size_t size) +-{ +- gcry_error_t error; +- size_t len; +- int i; +- +- error = gcry_mpi_print(GCRYMPI_FMT_USG, result, size, &len, value); +- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) +- { +- rfbClientLog("gcry_mpi_print error: %s\n", gcry_strerror(error)); +- return FALSE; +- } +- for (i=size-1;i>(int)size-1-(int)len;--i) +- result[i] = result[i-size+len]; +- for (;i>=0;--i) +- result[i] = 0; +- return TRUE; +-} +- +-static rfbBool +-HandleARDAuth(rfbClient *client) +-{ +- uint8_t gen[2], len[2]; +- size_t keylen; +- uint8_t *mod = NULL, *resp, *pub, *key, *shared; +- gcry_mpi_t genmpi = NULL, modmpi = NULL, respmpi = NULL; +- gcry_mpi_t privmpi = NULL, pubmpi = NULL, keympi = NULL; +- gcry_md_hd_t md5 = NULL; +- gcry_cipher_hd_t aes = NULL; +- gcry_error_t error; +- uint8_t userpass[128], ciphertext[128]; +- int passwordLen, usernameLen; +- rfbCredential *cred = NULL; +- rfbBool result = FALSE; +- +- while (1) +- { +- if (!ReadFromRFBServer(client, (char *)gen, 2)) +- break; +- if (!ReadFromRFBServer(client, (char *)len, 2)) +- break; +- +- if (!client->GetCredential) +- { +- rfbClientLog("GetCredential callback is not set.\n"); +- break; +- } +- cred = client->GetCredential(client, rfbCredentialTypeUser); +- if (!cred) +- { +- rfbClientLog("Reading credential failed\n"); +- break; +- } +- +- keylen = 256*len[0]+len[1]; +- mod = (uint8_t*)malloc(keylen*4); +- if (!mod) +- { +- rfbClientLog("malloc out of memory\n"); +- break; +- } +- resp = mod+keylen; +- pub = resp+keylen; +- key = pub+keylen; +- +- if (!ReadFromRFBServer(client, (char *)mod, keylen)) +- break; +- if (!ReadFromRFBServer(client, (char *)resp, keylen)) +- break; +- +- error = gcry_mpi_scan(&genmpi, GCRYMPI_FMT_USG, gen, 2, NULL); +- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) +- { +- rfbClientLog("gcry_mpi_scan error: %s\n", gcry_strerror(error)); +- break; +- } +- error = gcry_mpi_scan(&modmpi, GCRYMPI_FMT_USG, mod, keylen, NULL); +- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) +- { +- rfbClientLog("gcry_mpi_scan error: %s\n", gcry_strerror(error)); +- break; +- } +- error = gcry_mpi_scan(&respmpi, GCRYMPI_FMT_USG, resp, keylen, NULL); +- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) +- { +- rfbClientLog("gcry_mpi_scan error: %s\n", gcry_strerror(error)); +- break; +- } +- +- privmpi = gcry_mpi_new(keylen); +- if (!privmpi) +- { +- rfbClientLog("gcry_mpi_new out of memory\n"); +- break; +- } +- gcry_mpi_randomize(privmpi, (keylen/8)*8, GCRY_STRONG_RANDOM); +- +- pubmpi = gcry_mpi_new(keylen); +- if (!pubmpi) +- { +- rfbClientLog("gcry_mpi_new out of memory\n"); +- break; +- } +- gcry_mpi_powm(pubmpi, genmpi, privmpi, modmpi); +- +- keympi = gcry_mpi_new(keylen); +- if (!keympi) +- { +- rfbClientLog("gcry_mpi_new out of memory\n"); +- break; +- } +- gcry_mpi_powm(keympi, respmpi, privmpi, modmpi); +- +- if (!rfbMpiToBytes(pubmpi, pub, keylen)) +- break; +- if (!rfbMpiToBytes(keympi, key, keylen)) +- break; +- +- error = gcry_md_open(&md5, GCRY_MD_MD5, 0); +- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) +- { +- rfbClientLog("gcry_md_open error: %s\n", gcry_strerror(error)); +- break; +- } +- gcry_md_write(md5, key, keylen); +- error = gcry_md_final(md5); +- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) +- { +- rfbClientLog("gcry_md_final error: %s\n", gcry_strerror(error)); +- break; +- } +- shared = gcry_md_read(md5, GCRY_MD_MD5); +- +- passwordLen = strlen(cred->userCredential.password)+1; +- usernameLen = strlen(cred->userCredential.username)+1; +- if (passwordLen > sizeof(userpass)/2) +- passwordLen = sizeof(userpass)/2; +- if (usernameLen > sizeof(userpass)/2) +- usernameLen = sizeof(userpass)/2; +- +- gcry_randomize(userpass, sizeof(userpass), GCRY_STRONG_RANDOM); +- memcpy(userpass, cred->userCredential.username, usernameLen); +- memcpy(userpass+sizeof(userpass)/2, cred->userCredential.password, passwordLen); +- +- error = gcry_cipher_open(&aes, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_ECB, 0); +- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) +- { +- rfbClientLog("gcry_cipher_open error: %s\n", gcry_strerror(error)); +- break; +- } +- error = gcry_cipher_setkey(aes, shared, 16); +- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) +- { +- rfbClientLog("gcry_cipher_setkey error: %s\n", gcry_strerror(error)); +- break; +- } +- error = gcry_cipher_encrypt(aes, ciphertext, sizeof(ciphertext), userpass, sizeof(userpass)); +- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) +- { +- rfbClientLog("gcry_cipher_encrypt error: %s\n", gcry_strerror(error)); +- break; +- } +- +- if (!WriteToRFBServer(client, (char *)ciphertext, sizeof(ciphertext))) +- break; +- if (!WriteToRFBServer(client, (char *)pub, keylen)) +- break; +- +- /* Handle the SecurityResult message */ +- if (!rfbHandleAuthResult(client)) +- break; +- +- result = TRUE; +- break; +- } +- +- if (cred) +- FreeUserCredential(cred); +- if (mod) +- free(mod); +- if (genmpi) +- gcry_mpi_release(genmpi); +- if (modmpi) +- gcry_mpi_release(modmpi); +- if (respmpi) +- gcry_mpi_release(respmpi); +- if (privmpi) +- gcry_mpi_release(privmpi); +- if (pubmpi) +- gcry_mpi_release(pubmpi); +- if (keympi) +- gcry_mpi_release(keympi); +- if (md5) +- gcry_md_close(md5); +- if (aes) +- gcry_cipher_close(aes); +- return result; +-} +-#endif +- +-/* +- * SetClientAuthSchemes. +- */ +- +-void +-SetClientAuthSchemes(rfbClient* client,const uint32_t *authSchemes, int size) +-{ +- int i; +- +- if (client->clientAuthSchemes) +- { +- free(client->clientAuthSchemes); +- client->clientAuthSchemes = NULL; +- } +- if (authSchemes) +- { +- if (size<0) +- { +- /* If size<0 we assume the passed-in list is also 0-terminate, so we +- * calculate the size here */ +- for (size=0;authSchemes[size];size++) ; +- } +- client->clientAuthSchemes = (uint32_t*)malloc(sizeof(uint32_t)*(size+1)); +- for (i=0;iclientAuthSchemes[i] = authSchemes[i]; +- client->clientAuthSchemes[size] = 0; +- } +-} +- +-/* +- * InitialiseRFBConnection. +- */ +- +-rfbBool +-InitialiseRFBConnection(rfbClient* client) +-{ +- rfbProtocolVersionMsg pv; +- int major,minor; +- uint32_t authScheme; +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- uint32_t subAuthScheme; +-#endif +- rfbClientInitMsg ci; +- +- /* if the connection is immediately closed, don't report anything, so +- that pmw's monitor can make test connections */ +- +- if (client->listenSpecified) +- errorMessageOnReadFailure = FALSE; +- +- if (!ReadFromRFBServer(client, pv, sz_rfbProtocolVersionMsg)) return FALSE; +- pv[sz_rfbProtocolVersionMsg]=0; +- +- errorMessageOnReadFailure = TRUE; +- +- pv[sz_rfbProtocolVersionMsg] = 0; +- +- if (sscanf(pv,rfbProtocolVersionFormat,&major,&minor) != 2) { +- rfbClientLog("Not a valid VNC server (%s)\n",pv); +- return FALSE; +- } +- +- +- DefaultSupportedMessages(client); +- client->major = major; +- client->minor = minor; +- +- /* fall back to viewer supported version */ +- if ((major==rfbProtocolMajorVersion) && (minor>rfbProtocolMinorVersion)) +- client->minor = rfbProtocolMinorVersion; +- +- /* UltraVNC uses minor codes 4 and 6 for the server */ +- if (major==3 && (minor==4 || minor==6)) { +- rfbClientLog("UltraVNC server detected, enabling UltraVNC specific messages\n",pv); +- DefaultSupportedMessagesUltraVNC(client); +- } +- +- /* TightVNC uses minor codes 5 for the server */ +- if (major==3 && minor==5) { +- rfbClientLog("TightVNC server detected, enabling TightVNC specific messages\n",pv); +- DefaultSupportedMessagesTightVNC(client); +- } +- +- /* we do not support > RFB3.8 */ +- if ((major==3 && minor>8) || major>3) +- { +- client->major=3; +- client->minor=8; +- } +- +- rfbClientLog("VNC server supports protocol version %d.%d (viewer %d.%d)\n", +- major, minor, rfbProtocolMajorVersion, rfbProtocolMinorVersion); +- +- sprintf(pv,rfbProtocolVersionFormat,client->major,client->minor); +- +- if (!WriteToRFBServer(client, pv, sz_rfbProtocolVersionMsg)) return FALSE; +- +- +- /* 3.7 and onwards sends a # of security types first */ +- if (client->major==3 && client->minor > 6) +- { +- if (!ReadSupportedSecurityType(client, &authScheme, FALSE)) return FALSE; +- } +- else +- { +- if (!ReadFromRFBServer(client, (char *)&authScheme, 4)) return FALSE; +- authScheme = rfbClientSwap32IfLE(authScheme); +- } +- +- rfbClientLog("Selected Security Scheme %d\n", authScheme); +- client->authScheme = authScheme; +- +- switch (authScheme) { +- +- case rfbConnFailed: +- ReadReason(client); +- return FALSE; +- +- case rfbNoAuth: +- rfbClientLog("No authentication needed\n"); +- +- /* 3.8 and upwards sends a Security Result for rfbNoAuth */ +- if ((client->major==3 && client->minor > 7) || client->major>3) +- if (!rfbHandleAuthResult(client)) return FALSE; +- +- break; +- +- case rfbVncAuth: +- if (!HandleVncAuth(client)) return FALSE; +- break; +- +- case rfbMSLogon: +- if (!HandleMSLogonAuth(client)) return FALSE; +- break; +- +- case rfbARD: +-#ifndef LIBVNCSERVER_WITH_CLIENT_GCRYPT +- rfbClientLog("GCrypt support was not compiled in\n"); +- return FALSE; +-#else +- if (!HandleARDAuth(client)) return FALSE; +-#endif +- break; +- +- case rfbTLS: +-#ifndef LIBVNCSERVER_WITH_CLIENT_TLS +- rfbClientLog("TLS support was not compiled in\n"); +- return FALSE; +-#else +- if (!HandleAnonTLSAuth(client)) return FALSE; +- /* After the TLS session is established, sub auth types are expected. +- * Note that all following reading/writing are through the TLS session from here. +- */ +- if (!ReadSupportedSecurityType(client, &subAuthScheme, TRUE)) return FALSE; +- client->subAuthScheme = subAuthScheme; +- +- switch (subAuthScheme) { +- +- case rfbConnFailed: +- ReadReason(client); +- return FALSE; +- +- case rfbNoAuth: +- rfbClientLog("No sub authentication needed\n"); +- /* 3.8 and upwards sends a Security Result for rfbNoAuth */ +- if ((client->major==3 && client->minor > 7) || client->major>3) +- if (!rfbHandleAuthResult(client)) return FALSE; +- break; +- +- case rfbVncAuth: +- if (!HandleVncAuth(client)) return FALSE; +- break; +- +- default: +- rfbClientLog("Unknown sub authentication scheme from VNC server: %d\n", +- (int)subAuthScheme); +- return FALSE; +- } +-#endif +- +- break; +- +- case rfbVeNCrypt: +-#ifndef LIBVNCSERVER_WITH_CLIENT_TLS +- rfbClientLog("TLS support was not compiled in\n"); +- return FALSE; +-#else +- if (!HandleVeNCryptAuth(client)) return FALSE; +- +- switch (client->subAuthScheme) { +- +- case rfbVeNCryptTLSNone: +- case rfbVeNCryptX509None: +- rfbClientLog("No sub authentication needed\n"); +- if (!rfbHandleAuthResult(client)) return FALSE; +- break; +- +- case rfbVeNCryptTLSVNC: +- case rfbVeNCryptX509VNC: +- if (!HandleVncAuth(client)) return FALSE; +- break; +- +- case rfbVeNCryptTLSPlain: +- case rfbVeNCryptX509Plain: +- if (!HandlePlainAuth(client)) return FALSE; +- break; +- +- default: +- rfbClientLog("Unknown sub authentication scheme from VNC server: %d\n", +- client->subAuthScheme); +- return FALSE; +- } +-#endif +- break; +- +- default: +- rfbClientLog("Unknown authentication scheme from VNC server: %d\n", +- (int)authScheme); +- return FALSE; +- } +- +- ci.shared = (client->appData.shareDesktop ? 1 : 0); +- +- if (!WriteToRFBServer(client, (char *)&ci, sz_rfbClientInitMsg)) return FALSE; +- +- if (!ReadFromRFBServer(client, (char *)&client->si, sz_rfbServerInitMsg)) return FALSE; +- +- client->si.framebufferWidth = rfbClientSwap16IfLE(client->si.framebufferWidth); +- client->si.framebufferHeight = rfbClientSwap16IfLE(client->si.framebufferHeight); +- client->si.format.redMax = rfbClientSwap16IfLE(client->si.format.redMax); +- client->si.format.greenMax = rfbClientSwap16IfLE(client->si.format.greenMax); +- client->si.format.blueMax = rfbClientSwap16IfLE(client->si.format.blueMax); +- client->si.nameLength = rfbClientSwap32IfLE(client->si.nameLength); +- +- client->desktopName = malloc(client->si.nameLength + 1); +- if (!client->desktopName) { +- rfbClientLog("Error allocating memory for desktop name, %lu bytes\n", +- (unsigned long)client->si.nameLength); +- return FALSE; +- } +- +- if (!ReadFromRFBServer(client, client->desktopName, client->si.nameLength)) return FALSE; +- +- client->desktopName[client->si.nameLength] = 0; +- +- rfbClientLog("Desktop name \"%s\"\n",client->desktopName); +- +- rfbClientLog("Connected to VNC server, using protocol version %d.%d\n", +- client->major, client->minor); +- +- rfbClientLog("VNC server default format:\n"); +- PrintPixelFormat(&client->si.format); +- +- return TRUE; +-} +- +- +-/* +- * SetFormatAndEncodings. +- */ +- +-rfbBool +-SetFormatAndEncodings(rfbClient* client) +-{ +- rfbSetPixelFormatMsg spf; +- char buf[sz_rfbSetEncodingsMsg + MAX_ENCODINGS * 4]; +- +- rfbSetEncodingsMsg *se = (rfbSetEncodingsMsg *)buf; +- uint32_t *encs = (uint32_t *)(&buf[sz_rfbSetEncodingsMsg]); +- int len = 0; +- rfbBool requestCompressLevel = FALSE; +- rfbBool requestQualityLevel = FALSE; +- rfbBool requestLastRectEncoding = FALSE; +- rfbClientProtocolExtension* e; +- +- if (!SupportsClient2Server(client, rfbSetPixelFormat)) return TRUE; +- +- spf.type = rfbSetPixelFormat; +- spf.format = client->format; +- spf.format.redMax = rfbClientSwap16IfLE(spf.format.redMax); +- spf.format.greenMax = rfbClientSwap16IfLE(spf.format.greenMax); +- spf.format.blueMax = rfbClientSwap16IfLE(spf.format.blueMax); +- +- if (!WriteToRFBServer(client, (char *)&spf, sz_rfbSetPixelFormatMsg)) +- return FALSE; +- +- +- if (!SupportsClient2Server(client, rfbSetEncodings)) return TRUE; +- +- se->type = rfbSetEncodings; +- se->nEncodings = 0; +- +- if (client->appData.encodingsString) { +- const char *encStr = client->appData.encodingsString; +- int encStrLen; +- do { +- const char *nextEncStr = strchr(encStr, ' '); +- if (nextEncStr) { +- encStrLen = nextEncStr - encStr; +- nextEncStr++; +- } else { +- encStrLen = strlen(encStr); +- } +- +- if (strncasecmp(encStr,"raw",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRaw); +- } else if (strncasecmp(encStr,"copyrect",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCopyRect); +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +- } else if (strncasecmp(encStr,"tight",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingTight); +- requestLastRectEncoding = TRUE; +- if (client->appData.compressLevel >= 0 && client->appData.compressLevel <= 9) +- requestCompressLevel = TRUE; +- if (client->appData.enableJPEG) +- requestQualityLevel = TRUE; +-#endif +-#endif +- } else if (strncasecmp(encStr,"hextile",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingHextile); +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- } else if (strncasecmp(encStr,"zlib",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZlib); +- if (client->appData.compressLevel >= 0 && client->appData.compressLevel <= 9) +- requestCompressLevel = TRUE; +- } else if (strncasecmp(encStr,"zlibhex",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZlibHex); +- if (client->appData.compressLevel >= 0 && client->appData.compressLevel <= 9) +- requestCompressLevel = TRUE; +- } else if (strncasecmp(encStr,"zrle",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZRLE); +- } else if (strncasecmp(encStr,"zywrle",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZYWRLE); +- requestQualityLevel = TRUE; +-#endif +- } else if ((strncasecmp(encStr,"ultra",encStrLen) == 0) || (strncasecmp(encStr,"ultrazip",encStrLen) == 0)) { +- /* There are 2 encodings used in 'ultra' */ +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingUltra); +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingUltraZip); +- } else if (strncasecmp(encStr,"corre",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCoRRE); +- } else if (strncasecmp(encStr,"rre",encStrLen) == 0) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRRE); +- } else { +- rfbClientLog("Unknown encoding '%.*s'\n",encStrLen,encStr); +- } +- +- encStr = nextEncStr; +- } while (encStr && se->nEncodings < MAX_ENCODINGS); +- +- if (se->nEncodings < MAX_ENCODINGS && requestCompressLevel) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(client->appData.compressLevel + +- rfbEncodingCompressLevel0); +- } +- +- if (se->nEncodings < MAX_ENCODINGS && requestQualityLevel) { +- if (client->appData.qualityLevel < 0 || client->appData.qualityLevel > 9) +- client->appData.qualityLevel = 5; +- encs[se->nEncodings++] = rfbClientSwap32IfLE(client->appData.qualityLevel + +- rfbEncodingQualityLevel0); +- } +- } +- else { +- if (SameMachine(client->sock)) { +- /* TODO: +- if (!tunnelSpecified) { +- */ +- rfbClientLog("Same machine: preferring raw encoding\n"); +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRaw); +- /* +- } else { +- rfbClientLog("Tunneling active: preferring tight encoding\n"); +- } +- */ +- } +- +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCopyRect); +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingTight); +- requestLastRectEncoding = TRUE; +-#endif +-#endif +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingHextile); +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZlib); +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZRLE); +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZYWRLE); +-#endif +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingUltra); +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingUltraZip); +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCoRRE); +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRRE); +- +- if (client->appData.compressLevel >= 0 && client->appData.compressLevel <= 9) { +- encs[se->nEncodings++] = rfbClientSwap32IfLE(client->appData.compressLevel + +- rfbEncodingCompressLevel0); +- } else /* if (!tunnelSpecified) */ { +- /* If -tunnel option was provided, we assume that server machine is +- not in the local network so we use default compression level for +- tight encoding instead of fast compression. Thus we are +- requesting level 1 compression only if tunneling is not used. */ +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCompressLevel1); +- } +- +- if (client->appData.enableJPEG) { +- if (client->appData.qualityLevel < 0 || client->appData.qualityLevel > 9) +- client->appData.qualityLevel = 5; +- encs[se->nEncodings++] = rfbClientSwap32IfLE(client->appData.qualityLevel + +- rfbEncodingQualityLevel0); +- } +- } +- +- +- +- /* Remote Cursor Support (local to viewer) */ +- if (client->appData.useRemoteCursor) { +- if (se->nEncodings < MAX_ENCODINGS) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingXCursor); +- if (se->nEncodings < MAX_ENCODINGS) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRichCursor); +- if (se->nEncodings < MAX_ENCODINGS) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingPointerPos); +- } +- +- /* Keyboard State Encodings */ +- if (se->nEncodings < MAX_ENCODINGS) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingKeyboardLedState); +- +- /* New Frame Buffer Size */ +- if (se->nEncodings < MAX_ENCODINGS && client->canHandleNewFBSize) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingNewFBSize); +- +- /* Last Rect */ +- if (se->nEncodings < MAX_ENCODINGS && requestLastRectEncoding) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingLastRect); +- +- /* Server Capabilities */ +- if (se->nEncodings < MAX_ENCODINGS) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingSupportedMessages); +- if (se->nEncodings < MAX_ENCODINGS) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingSupportedEncodings); +- if (se->nEncodings < MAX_ENCODINGS) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingServerIdentity); +- +- /* xvp */ +- if (se->nEncodings < MAX_ENCODINGS) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingXvp); +- +- /* client extensions */ +- for(e = rfbClientExtensions; e; e = e->next) +- if(e->encodings) { +- int* enc; +- for(enc = e->encodings; *enc; enc++) +- encs[se->nEncodings++] = rfbClientSwap32IfLE(*enc); +- } +- +- len = sz_rfbSetEncodingsMsg + se->nEncodings * 4; +- +- se->nEncodings = rfbClientSwap16IfLE(se->nEncodings); +- +- if (!WriteToRFBServer(client, buf, len)) return FALSE; +- +- return TRUE; +-} +- +- +-/* +- * SendIncrementalFramebufferUpdateRequest. +- */ +- +-rfbBool +-SendIncrementalFramebufferUpdateRequest(rfbClient* client) +-{ +- return SendFramebufferUpdateRequest(client, +- client->updateRect.x, client->updateRect.y, +- client->updateRect.w, client->updateRect.h, TRUE); +-} +- +- +-/* +- * SendFramebufferUpdateRequest. +- */ +- +-rfbBool +-SendFramebufferUpdateRequest(rfbClient* client, int x, int y, int w, int h, rfbBool incremental) +-{ +- rfbFramebufferUpdateRequestMsg fur; +- +- if (!SupportsClient2Server(client, rfbFramebufferUpdateRequest)) return TRUE; +- +- fur.type = rfbFramebufferUpdateRequest; +- fur.incremental = incremental ? 1 : 0; +- fur.x = rfbClientSwap16IfLE(x); +- fur.y = rfbClientSwap16IfLE(y); +- fur.w = rfbClientSwap16IfLE(w); +- fur.h = rfbClientSwap16IfLE(h); +- +- if (!WriteToRFBServer(client, (char *)&fur, sz_rfbFramebufferUpdateRequestMsg)) +- return FALSE; +- +- return TRUE; +-} +- +- +-/* +- * SendScaleSetting. +- */ +-rfbBool +-SendScaleSetting(rfbClient* client,int scaleSetting) +-{ +- rfbSetScaleMsg ssm; +- +- ssm.scale = scaleSetting; +- ssm.pad = 0; +- +- /* favor UltraVNC SetScale if both are supported */ +- if (SupportsClient2Server(client, rfbSetScale)) { +- ssm.type = rfbSetScale; +- if (!WriteToRFBServer(client, (char *)&ssm, sz_rfbSetScaleMsg)) +- return FALSE; +- } +- +- if (SupportsClient2Server(client, rfbPalmVNCSetScaleFactor)) { +- ssm.type = rfbPalmVNCSetScaleFactor; +- if (!WriteToRFBServer(client, (char *)&ssm, sz_rfbSetScaleMsg)) +- return FALSE; +- } +- +- return TRUE; +-} +- +-/* +- * TextChatFunctions (UltraVNC) +- * Extremely bandwidth friendly method of communicating with a user +- * (Think HelpDesk type applications) +- */ +- +-rfbBool TextChatSend(rfbClient* client, char *text) +-{ +- rfbTextChatMsg chat; +- int count = strlen(text); +- +- if (!SupportsClient2Server(client, rfbTextChat)) return TRUE; +- chat.type = rfbTextChat; +- chat.pad1 = 0; +- chat.pad2 = 0; +- chat.length = (uint32_t)count; +- chat.length = rfbClientSwap32IfLE(chat.length); +- +- if (!WriteToRFBServer(client, (char *)&chat, sz_rfbTextChatMsg)) +- return FALSE; +- +- if (count>0) { +- if (!WriteToRFBServer(client, text, count)) +- return FALSE; +- } +- return TRUE; +-} +- +-rfbBool TextChatOpen(rfbClient* client) +-{ +- rfbTextChatMsg chat; +- +- if (!SupportsClient2Server(client, rfbTextChat)) return TRUE; +- chat.type = rfbTextChat; +- chat.pad1 = 0; +- chat.pad2 = 0; +- chat.length = rfbClientSwap32IfLE(rfbTextChatOpen); +- return (WriteToRFBServer(client, (char *)&chat, sz_rfbTextChatMsg) ? TRUE : FALSE); +-} +- +-rfbBool TextChatClose(rfbClient* client) +-{ +- rfbTextChatMsg chat; +- if (!SupportsClient2Server(client, rfbTextChat)) return TRUE; +- chat.type = rfbTextChat; +- chat.pad1 = 0; +- chat.pad2 = 0; +- chat.length = rfbClientSwap32IfLE(rfbTextChatClose); +- return (WriteToRFBServer(client, (char *)&chat, sz_rfbTextChatMsg) ? TRUE : FALSE); +-} +- +-rfbBool TextChatFinish(rfbClient* client) +-{ +- rfbTextChatMsg chat; +- if (!SupportsClient2Server(client, rfbTextChat)) return TRUE; +- chat.type = rfbTextChat; +- chat.pad1 = 0; +- chat.pad2 = 0; +- chat.length = rfbClientSwap32IfLE(rfbTextChatFinished); +- return (WriteToRFBServer(client, (char *)&chat, sz_rfbTextChatMsg) ? TRUE : FALSE); +-} +- +-/* +- * UltraVNC Server Input Disable +- * Apparently, the remote client can *prevent* the local user from interacting with the display +- * I would think this is extremely helpful when used in a HelpDesk situation +- */ +-rfbBool PermitServerInput(rfbClient* client, int enabled) +-{ +- rfbSetServerInputMsg msg; +- +- if (!SupportsClient2Server(client, rfbSetServerInput)) return TRUE; +- /* enabled==1, then server input from local keyboard is disabled */ +- msg.type = rfbSetServerInput; +- msg.status = (enabled ? 1 : 0); +- msg.pad = 0; +- return (WriteToRFBServer(client, (char *)&msg, sz_rfbSetServerInputMsg) ? TRUE : FALSE); +-} +- +- +-/* +- * send xvp client message +- * A client supporting the xvp extension sends this to request that the server initiate +- * a clean shutdown, clean reboot or abrupt reset of the system whose framebuffer the +- * client is displaying. +- * +- * only version 1 is defined in the protocol specs +- * +- * possible values for code are: +- * rfbXvp_Shutdown +- * rfbXvp_Reboot +- * rfbXvp_Reset +- */ +- +-rfbBool SendXvpMsg(rfbClient* client, uint8_t version, uint8_t code) +-{ +- rfbXvpMsg xvp; +- +- if (!SupportsClient2Server(client, rfbXvp)) return TRUE; +- xvp.type = rfbXvp; +- xvp.pad = 0; +- xvp.version = version; +- xvp.code = code; +- +- if (!WriteToRFBServer(client, (char *)&xvp, sz_rfbXvpMsg)) +- return FALSE; +- +- return TRUE; +-} +- +- +-/* +- * SendPointerEvent. +- */ +- +-rfbBool +-SendPointerEvent(rfbClient* client,int x, int y, int buttonMask) +-{ +- rfbPointerEventMsg pe; +- +- if (!SupportsClient2Server(client, rfbPointerEvent)) return TRUE; +- +- pe.type = rfbPointerEvent; +- pe.buttonMask = buttonMask; +- if (x < 0) x = 0; +- if (y < 0) y = 0; +- +- pe.x = rfbClientSwap16IfLE(x); +- pe.y = rfbClientSwap16IfLE(y); +- return WriteToRFBServer(client, (char *)&pe, sz_rfbPointerEventMsg); +-} +- +- +-/* +- * SendKeyEvent. +- */ +- +-rfbBool +-SendKeyEvent(rfbClient* client, uint32_t key, rfbBool down) +-{ +- rfbKeyEventMsg ke; +- +- if (!SupportsClient2Server(client, rfbKeyEvent)) return TRUE; +- +- ke.type = rfbKeyEvent; +- ke.down = down ? 1 : 0; +- ke.key = rfbClientSwap32IfLE(key); +- return WriteToRFBServer(client, (char *)&ke, sz_rfbKeyEventMsg); +-} +- +- +-/* +- * SendClientCutText. +- */ +- +-rfbBool +-SendClientCutText(rfbClient* client, char *str, int len) +-{ +- rfbClientCutTextMsg cct; +- +- if (!SupportsClient2Server(client, rfbClientCutText)) return TRUE; +- +- cct.type = rfbClientCutText; +- cct.length = rfbClientSwap32IfLE(len); +- return (WriteToRFBServer(client, (char *)&cct, sz_rfbClientCutTextMsg) && +- WriteToRFBServer(client, str, len)); +-} +- +- +- +-/* +- * HandleRFBServerMessage. +- */ +- +-rfbBool +-HandleRFBServerMessage(rfbClient* client) +-{ +- rfbServerToClientMsg msg; +- +- if (client->serverPort==-1) +- client->vncRec->readTimestamp = TRUE; +- if (!ReadFromRFBServer(client, (char *)&msg, 1)) +- return FALSE; +- +- switch (msg.type) { +- +- case rfbSetColourMapEntries: +- { +- /* TODO: +- int i; +- uint16_t rgb[3]; +- XColor xc; +- +- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, +- sz_rfbSetColourMapEntriesMsg - 1)) +- return FALSE; +- +- msg.scme.firstColour = rfbClientSwap16IfLE(msg.scme.firstColour); +- msg.scme.nColours = rfbClientSwap16IfLE(msg.scme.nColours); +- +- for (i = 0; i < msg.scme.nColours; i++) { +- if (!ReadFromRFBServer(client, (char *)rgb, 6)) +- return FALSE; +- xc.pixel = msg.scme.firstColour + i; +- xc.red = rfbClientSwap16IfLE(rgb[0]); +- xc.green = rfbClientSwap16IfLE(rgb[1]); +- xc.blue = rfbClientSwap16IfLE(rgb[2]); +- xc.flags = DoRed|DoGreen|DoBlue; +- XStoreColor(dpy, cmap, &xc); +- } +- */ +- +- break; +- } +- +- case rfbFramebufferUpdate: +- { +- rfbFramebufferUpdateRectHeader rect; +- int linesToRead; +- int bytesPerLine; +- int i; +- +- if (!ReadFromRFBServer(client, ((char *)&msg.fu) + 1, +- sz_rfbFramebufferUpdateMsg - 1)) +- return FALSE; +- +- msg.fu.nRects = rfbClientSwap16IfLE(msg.fu.nRects); +- +- for (i = 0; i < msg.fu.nRects; i++) { +- if (!ReadFromRFBServer(client, (char *)&rect, sz_rfbFramebufferUpdateRectHeader)) +- return FALSE; +- +- rect.encoding = rfbClientSwap32IfLE(rect.encoding); +- if (rect.encoding == rfbEncodingLastRect) +- break; +- +- rect.r.x = rfbClientSwap16IfLE(rect.r.x); +- rect.r.y = rfbClientSwap16IfLE(rect.r.y); +- rect.r.w = rfbClientSwap16IfLE(rect.r.w); +- rect.r.h = rfbClientSwap16IfLE(rect.r.h); +- +- +- if (rect.encoding == rfbEncodingXCursor || +- rect.encoding == rfbEncodingRichCursor) { +- +- if (!HandleCursorShape(client, +- rect.r.x, rect.r.y, rect.r.w, rect.r.h, +- rect.encoding)) { +- return FALSE; +- } +- continue; +- } +- +- if (rect.encoding == rfbEncodingPointerPos) { +- if (!client->HandleCursorPos(client,rect.r.x, rect.r.y)) { +- return FALSE; +- } +- continue; +- } +- +- if (rect.encoding == rfbEncodingKeyboardLedState) { +- /* OK! We have received a keyboard state message!!! */ +- client->KeyboardLedStateEnabled = 1; +- if (client->HandleKeyboardLedState!=NULL) +- client->HandleKeyboardLedState(client, rect.r.x, 0); +- /* stash it for the future */ +- client->CurrentKeyboardLedState = rect.r.x; +- continue; +- } +- +- if (rect.encoding == rfbEncodingNewFBSize) { +- client->width = rect.r.w; +- client->height = rect.r.h; +- client->updateRect.x = client->updateRect.y = 0; +- client->updateRect.w = client->width; +- client->updateRect.h = client->height; +- client->MallocFrameBuffer(client); +- SendFramebufferUpdateRequest(client, 0, 0, rect.r.w, rect.r.h, FALSE); +- rfbClientLog("Got new framebuffer size: %dx%d\n", rect.r.w, rect.r.h); +- continue; +- } +- +- /* rect.r.w=byte count */ +- if (rect.encoding == rfbEncodingSupportedMessages) { +- int loop; +- if (!ReadFromRFBServer(client, (char *)&client->supportedMessages, sz_rfbSupportedMessages)) +- return FALSE; +- +- /* msgs is two sets of bit flags of supported messages client2server[] and server2client[] */ +- /* currently ignored by this library */ +- +- rfbClientLog("client2server supported messages (bit flags)\n"); +- for (loop=0;loop<32;loop+=8) +- rfbClientLog("%02X: %04x %04x %04x %04x - %04x %04x %04x %04x\n", loop, +- client->supportedMessages.client2server[loop], client->supportedMessages.client2server[loop+1], +- client->supportedMessages.client2server[loop+2], client->supportedMessages.client2server[loop+3], +- client->supportedMessages.client2server[loop+4], client->supportedMessages.client2server[loop+5], +- client->supportedMessages.client2server[loop+6], client->supportedMessages.client2server[loop+7]); +- +- rfbClientLog("server2client supported messages (bit flags)\n"); +- for (loop=0;loop<32;loop+=8) +- rfbClientLog("%02X: %04x %04x %04x %04x - %04x %04x %04x %04x\n", loop, +- client->supportedMessages.server2client[loop], client->supportedMessages.server2client[loop+1], +- client->supportedMessages.server2client[loop+2], client->supportedMessages.server2client[loop+3], +- client->supportedMessages.server2client[loop+4], client->supportedMessages.server2client[loop+5], +- client->supportedMessages.server2client[loop+6], client->supportedMessages.server2client[loop+7]); +- continue; +- } +- +- /* rect.r.w=byte count, rect.r.h=# of encodings */ +- if (rect.encoding == rfbEncodingSupportedEncodings) { +- char *buffer; +- buffer = malloc(rect.r.w); +- if (!ReadFromRFBServer(client, buffer, rect.r.w)) +- { +- free(buffer); +- return FALSE; +- } +- +- /* buffer now contains rect.r.h # of uint32_t encodings that the server supports */ +- /* currently ignored by this library */ +- free(buffer); +- continue; +- } +- +- /* rect.r.w=byte count */ +- if (rect.encoding == rfbEncodingServerIdentity) { +- char *buffer; +- buffer = malloc(rect.r.w+1); +- if (!ReadFromRFBServer(client, buffer, rect.r.w)) +- { +- free(buffer); +- return FALSE; +- } +- buffer[rect.r.w]=0; /* null terminate, just in case */ +- rfbClientLog("Connected to Server \"%s\"\n", buffer); +- free(buffer); +- continue; +- } +- +- /* rfbEncodingUltraZip is a collection of subrects. x = # of subrects, and h is always 0 */ +- if (rect.encoding != rfbEncodingUltraZip) +- { +- if ((rect.r.x + rect.r.w > client->width) || +- (rect.r.y + rect.r.h > client->height)) +- { +- rfbClientLog("Rect too large: %dx%d at (%d, %d)\n", +- rect.r.w, rect.r.h, rect.r.x, rect.r.y); +- return FALSE; +- } +- +- /* UltraVNC with scaling, will send rectangles with a zero W or H +- * +- if ((rect.encoding != rfbEncodingTight) && +- (rect.r.h * rect.r.w == 0)) +- { +- rfbClientLog("Zero size rect - ignoring (encoding=%d (0x%08x) %dx, %dy, %dw, %dh)\n", rect.encoding, rect.encoding, rect.r.x, rect.r.y, rect.r.w, rect.r.h); +- continue; +- } +- */ +- +- /* If RichCursor encoding is used, we should prevent collisions +- between framebuffer updates and cursor drawing operations. */ +- client->SoftCursorLockArea(client, rect.r.x, rect.r.y, rect.r.w, rect.r.h); +- } +- +- switch (rect.encoding) { +- +- case rfbEncodingRaw: { +- int y=rect.r.y, h=rect.r.h; +- +- bytesPerLine = rect.r.w * client->format.bitsPerPixel / 8; +- linesToRead = RFB_BUFFER_SIZE / bytesPerLine; +- +- while (h > 0) { +- if (linesToRead > h) +- linesToRead = h; +- +- if (!ReadFromRFBServer(client, client->buffer,bytesPerLine * linesToRead)) +- return FALSE; +- +- CopyRectangle(client, (uint8_t *)client->buffer, +- rect.r.x, y, rect.r.w,linesToRead); +- +- h -= linesToRead; +- y += linesToRead; +- +- } +- } break; +- +- case rfbEncodingCopyRect: +- { +- rfbCopyRect cr; +- +- if (!ReadFromRFBServer(client, (char *)&cr, sz_rfbCopyRect)) +- return FALSE; +- +- cr.srcX = rfbClientSwap16IfLE(cr.srcX); +- cr.srcY = rfbClientSwap16IfLE(cr.srcY); +- +- /* If RichCursor encoding is used, we should extend our +- "cursor lock area" (previously set to destination +- rectangle) to the source rectangle as well. */ +- client->SoftCursorLockArea(client, +- cr.srcX, cr.srcY, rect.r.w, rect.r.h); +- +- if (client->GotCopyRect != NULL) { +- client->GotCopyRect(client, cr.srcX, cr.srcY, rect.r.w, rect.r.h, +- rect.r.x, rect.r.y); +- } else +- CopyRectangleFromRectangle(client, +- cr.srcX, cr.srcY, rect.r.w, rect.r.h, +- rect.r.x, rect.r.y); +- +- break; +- } +- +- case rfbEncodingRRE: +- { +- switch (client->format.bitsPerPixel) { +- case 8: +- if (!HandleRRE8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 16: +- if (!HandleRRE16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 32: +- if (!HandleRRE32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- } +- break; +- } +- +- case rfbEncodingCoRRE: +- { +- switch (client->format.bitsPerPixel) { +- case 8: +- if (!HandleCoRRE8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 16: +- if (!HandleCoRRE16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 32: +- if (!HandleCoRRE32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- } +- break; +- } +- +- case rfbEncodingHextile: +- { +- switch (client->format.bitsPerPixel) { +- case 8: +- if (!HandleHextile8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 16: +- if (!HandleHextile16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 32: +- if (!HandleHextile32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- } +- break; +- } +- +- case rfbEncodingUltra: +- { +- switch (client->format.bitsPerPixel) { +- case 8: +- if (!HandleUltra8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 16: +- if (!HandleUltra16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 32: +- if (!HandleUltra32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- } +- break; +- } +- case rfbEncodingUltraZip: +- { +- switch (client->format.bitsPerPixel) { +- case 8: +- if (!HandleUltraZip8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 16: +- if (!HandleUltraZip16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 32: +- if (!HandleUltraZip32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- } +- break; +- } +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- case rfbEncodingZlib: +- { +- switch (client->format.bitsPerPixel) { +- case 8: +- if (!HandleZlib8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 16: +- if (!HandleZlib16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 32: +- if (!HandleZlib32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- } +- break; +- } +- +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +- case rfbEncodingTight: +- { +- switch (client->format.bitsPerPixel) { +- case 8: +- if (!HandleTight8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 16: +- if (!HandleTight16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 32: +- if (!HandleTight32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- } +- break; +- } +-#endif +- case rfbEncodingZRLE: +- /* Fail safe for ZYWRLE unsupport VNC server. */ +- client->appData.qualityLevel = 9; +- /* fall through */ +- case rfbEncodingZYWRLE: +- { +- switch (client->format.bitsPerPixel) { +- case 8: +- if (!HandleZRLE8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- case 16: +- if (client->si.format.greenMax > 0x1F) { +- if (!HandleZRLE16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- } else { +- if (!HandleZRLE15(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- } +- break; +- case 32: +- { +- uint32_t maxColor=(client->format.redMax<format.redShift)| +- (client->format.greenMax<format.greenShift)| +- (client->format.blueMax<format.blueShift); +- if ((client->format.bigEndian && (maxColor&0xff)==0) || +- (!client->format.bigEndian && (maxColor&0xff000000)==0)) { +- if (!HandleZRLE24(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- } else if (!client->format.bigEndian && (maxColor&0xff)==0) { +- if (!HandleZRLE24Up(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- } else if (client->format.bigEndian && (maxColor&0xff000000)==0) { +- if (!HandleZRLE24Down(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- } else if (!HandleZRLE32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) +- return FALSE; +- break; +- } +- } +- break; +- } +- +-#endif +- +- default: +- { +- rfbBool handled = FALSE; +- rfbClientProtocolExtension* e; +- +- for(e = rfbClientExtensions; !handled && e; e = e->next) +- if(e->handleEncoding && e->handleEncoding(client, &rect)) +- handled = TRUE; +- +- if(!handled) { +- rfbClientLog("Unknown rect encoding %d\n", +- (int)rect.encoding); +- return FALSE; +- } +- } +- } +- +- /* Now we may discard "soft cursor locks". */ +- client->SoftCursorUnlockScreen(client); +- +- client->GotFrameBufferUpdate(client, rect.r.x, rect.r.y, rect.r.w, rect.r.h); +- } +- +- if (!SendIncrementalFramebufferUpdateRequest(client)) +- return FALSE; +- +- if (client->FinishedFrameBufferUpdate) +- client->FinishedFrameBufferUpdate(client); +- +- break; +- } +- +- case rfbBell: +- { +- client->Bell(client); +- +- break; +- } +- +- case rfbServerCutText: +- { +- char *buffer; +- +- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, +- sz_rfbServerCutTextMsg - 1)) +- return FALSE; +- +- msg.sct.length = rfbClientSwap32IfLE(msg.sct.length); +- +- buffer = malloc(msg.sct.length+1); +- +- if (!ReadFromRFBServer(client, buffer, msg.sct.length)) +- return FALSE; +- +- buffer[msg.sct.length] = 0; +- +- if (client->GotXCutText) +- client->GotXCutText(client, buffer, msg.sct.length); +- +- free(buffer); +- +- break; +- } +- +- case rfbTextChat: +- { +- char *buffer=NULL; +- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, +- sz_rfbTextChatMsg- 1)) +- return FALSE; +- msg.tc.length = rfbClientSwap32IfLE(msg.sct.length); +- switch(msg.tc.length) { +- case rfbTextChatOpen: +- rfbClientLog("Received TextChat Open\n"); +- if (client->HandleTextChat!=NULL) +- client->HandleTextChat(client, (int)rfbTextChatOpen, NULL); +- break; +- case rfbTextChatClose: +- rfbClientLog("Received TextChat Close\n"); +- if (client->HandleTextChat!=NULL) +- client->HandleTextChat(client, (int)rfbTextChatClose, NULL); +- break; +- case rfbTextChatFinished: +- rfbClientLog("Received TextChat Finished\n"); +- if (client->HandleTextChat!=NULL) +- client->HandleTextChat(client, (int)rfbTextChatFinished, NULL); +- break; +- default: +- buffer=malloc(msg.tc.length+1); +- if (!ReadFromRFBServer(client, buffer, msg.tc.length)) +- { +- free(buffer); +- return FALSE; +- } +- /* Null Terminate */ +- buffer[msg.tc.length]=0; +- rfbClientLog("Received TextChat \"%s\"\n", buffer); +- if (client->HandleTextChat!=NULL) +- client->HandleTextChat(client, (int)msg.tc.length, buffer); +- free(buffer); +- break; +- } +- break; +- } +- +- case rfbXvp: +- { +- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, +- sz_rfbXvpMsg -1)) +- return FALSE; +- +- SetClient2Server(client, rfbXvp); +- /* technically, we only care what we can *send* to the server +- * but, we set Server2Client Just in case it ever becomes useful +- */ +- SetServer2Client(client, rfbXvp); +- +- if(client->HandleXvpMsg) +- client->HandleXvpMsg(client, msg.xvp.version, msg.xvp.code); +- +- break; +- } +- +- case rfbResizeFrameBuffer: +- { +- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, +- sz_rfbResizeFrameBufferMsg -1)) +- return FALSE; +- client->width = rfbClientSwap16IfLE(msg.rsfb.framebufferWidth); +- client->height = rfbClientSwap16IfLE(msg.rsfb.framebufferHeigth); +- client->updateRect.x = client->updateRect.y = 0; +- client->updateRect.w = client->width; +- client->updateRect.h = client->height; +- client->MallocFrameBuffer(client); +- SendFramebufferUpdateRequest(client, 0, 0, client->width, client->height, FALSE); +- rfbClientLog("Got new framebuffer size: %dx%d\n", client->width, client->height); +- break; +- } +- +- case rfbPalmVNCReSizeFrameBuffer: +- { +- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, +- sz_rfbPalmVNCReSizeFrameBufferMsg -1)) +- return FALSE; +- client->width = rfbClientSwap16IfLE(msg.prsfb.buffer_w); +- client->height = rfbClientSwap16IfLE(msg.prsfb.buffer_h); +- client->updateRect.x = client->updateRect.y = 0; +- client->updateRect.w = client->width; +- client->updateRect.h = client->height; +- client->MallocFrameBuffer(client); +- SendFramebufferUpdateRequest(client, 0, 0, client->width, client->height, FALSE); +- rfbClientLog("Got new framebuffer size: %dx%d\n", client->width, client->height); +- break; +- } +- +- default: +- { +- rfbBool handled = FALSE; +- rfbClientProtocolExtension* e; +- +- for(e = rfbClientExtensions; !handled && e; e = e->next) +- if(e->handleMessage && e->handleMessage(client, &msg)) +- handled = TRUE; +- +- if(!handled) { +- char buffer[256]; +- rfbClientLog("Unknown message type %d from VNC server\n",msg.type); +- ReadFromRFBServer(client, buffer, 256); +- return FALSE; +- } +- } +- } +- +- return TRUE; +-} +- +- +-#define GET_PIXEL8(pix, ptr) ((pix) = *(ptr)++) +- +-#define GET_PIXEL16(pix, ptr) (((uint8_t*)&(pix))[0] = *(ptr)++, \ +- ((uint8_t*)&(pix))[1] = *(ptr)++) +- +-#define GET_PIXEL32(pix, ptr) (((uint8_t*)&(pix))[0] = *(ptr)++, \ +- ((uint8_t*)&(pix))[1] = *(ptr)++, \ +- ((uint8_t*)&(pix))[2] = *(ptr)++, \ +- ((uint8_t*)&(pix))[3] = *(ptr)++) +- +-/* CONCAT2 concatenates its two arguments. CONCAT2E does the same but also +- expands its arguments if they are macros */ +- +-#define CONCAT2(a,b) a##b +-#define CONCAT2E(a,b) CONCAT2(a,b) +-#define CONCAT3(a,b,c) a##b##c +-#define CONCAT3E(a,b,c) CONCAT3(a,b,c) +- +-#define BPP 8 +-#include "rre.c" +-#include "corre.c" +-#include "hextile.c" +-#include "ultra.c" +-#include "zlib.c" +-#include "tight.c" +-#include "zrle.c" +-#undef BPP +-#define BPP 16 +-#include "rre.c" +-#include "corre.c" +-#include "hextile.c" +-#include "ultra.c" +-#include "zlib.c" +-#include "tight.c" +-#include "zrle.c" +-#define REALBPP 15 +-#include "zrle.c" +-#undef BPP +-#define BPP 32 +-#include "rre.c" +-#include "corre.c" +-#include "hextile.c" +-#include "ultra.c" +-#include "zlib.c" +-#include "tight.c" +-#include "zrle.c" +-#define REALBPP 24 +-#include "zrle.c" +-#define REALBPP 24 +-#define UNCOMP 8 +-#include "zrle.c" +-#define REALBPP 24 +-#define UNCOMP -8 +-#include "zrle.c" +-#undef BPP +- +- +-/* +- * PrintPixelFormat. +- */ +- +-void +-PrintPixelFormat(rfbPixelFormat *format) +-{ +- if (format->bitsPerPixel == 1) { +- rfbClientLog(" Single bit per pixel.\n"); +- rfbClientLog( +- " %s significant bit in each byte is leftmost on the screen.\n", +- (format->bigEndian ? "Most" : "Least")); +- } else { +- rfbClientLog(" %d bits per pixel.\n",format->bitsPerPixel); +- if (format->bitsPerPixel != 8) { +- rfbClientLog(" %s significant byte first in each pixel.\n", +- (format->bigEndian ? "Most" : "Least")); +- } +- if (format->trueColour) { +- rfbClientLog(" TRUE colour: max red %d green %d blue %d" +- ", shift red %d green %d blue %d\n", +- format->redMax, format->greenMax, format->blueMax, +- format->redShift, format->greenShift, format->blueShift); +- } else { +- rfbClientLog(" Colour map (not true colour).\n"); +- } +- } +-} +- +-/* avoid name clashes with LibVNCServer */ +- +-#define rfbEncryptBytes rfbClientEncryptBytes +-#define rfbEncryptBytes2 rfbClientEncryptBytes2 +-#define rfbDes rfbClientDes +-#define rfbDesKey rfbClientDesKey +-#define rfbUseKey rfbClientUseKey +-#define rfbCPKey rfbClientCPKey +- +-#include "vncauth.c" +-#include "d3des.c" +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/rre.c b/remmina-plugins/vnc/libvncserver/libvncclient/rre.c +deleted file mode 100644 +index 94158c9..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/rre.c ++++ /dev/null +@@ -1,68 +0,0 @@ +-/* +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* +- * rre.c - handle RRE encoding. +- * +- * This file shouldn't be compiled directly. It is included multiple times by +- * rfbproto.c, each time with a different definition of the macro BPP. For +- * each value of BPP, this file defines a function which handles an RRE +- * encoded rectangle with BPP bits per pixel. +- */ +- +-#define HandleRREBPP CONCAT2E(HandleRRE,BPP) +-#define CARDBPP CONCAT3E(uint,BPP,_t) +- +-static rfbBool +-HandleRREBPP (rfbClient* client, int rx, int ry, int rw, int rh) +-{ +- rfbRREHeader hdr; +- int i; +- CARDBPP pix; +- rfbRectangle subrect; +- +- if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbRREHeader)) +- return FALSE; +- +- hdr.nSubrects = rfbClientSwap32IfLE(hdr.nSubrects); +- +- if (!ReadFromRFBServer(client, (char *)&pix, sizeof(pix))) +- return FALSE; +- +- FillRectangle(client, rx, ry, rw, rh, pix); +- +- for (i = 0; i < hdr.nSubrects; i++) { +- if (!ReadFromRFBServer(client, (char *)&pix, sizeof(pix))) +- return FALSE; +- +- if (!ReadFromRFBServer(client, (char *)&subrect, sz_rfbRectangle)) +- return FALSE; +- +- subrect.x = rfbClientSwap16IfLE(subrect.x); +- subrect.y = rfbClientSwap16IfLE(subrect.y); +- subrect.w = rfbClientSwap16IfLE(subrect.w); +- subrect.h = rfbClientSwap16IfLE(subrect.h); +- +- FillRectangle(client, rx+subrect.x, ry+subrect.y, subrect.w, subrect.h, pix); +- } +- +- return TRUE; +-} +- +-#undef CARDBPP +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/sockets.c b/remmina-plugins/vnc/libvncserver/libvncclient/sockets.c +deleted file mode 100644 +index 6c8cec1..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/sockets.c ++++ /dev/null +@@ -1,743 +0,0 @@ +-/* +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* +- * sockets.c - functions to deal with sockets. +- */ +- +-#ifdef __STRICT_ANSI__ +-#define _BSD_SOURCE +-#endif +-#include +-#include +-#include +-#include +-#include +-#ifdef WIN32 +-#undef SOCKET +-#include +-#define EWOULDBLOCK WSAEWOULDBLOCK +-#define close closesocket +-#define read(sock,buf,len) recv(sock,buf,len,0) +-#define write(sock,buf,len) send(sock,buf,len,0) +-#define socklen_t int +-#ifdef LIBVNCSERVER_HAVE_WS2TCPIP_H +-#undef socklen_t +-#include +-#endif +-#else +-#include +-#include +-#include +-#include +-#include +-#include +-#endif +-#include "tls.h" +- +-void PrintInHex(char *buf, int len); +- +-rfbBool errorMessageOnReadFailure = TRUE; +- +-/* +- * ReadFromRFBServer is called whenever we want to read some data from the RFB +- * server. It is non-trivial for two reasons: +- * +- * 1. For efficiency it performs some intelligent buffering, avoiding invoking +- * the read() system call too often. For small chunks of data, it simply +- * copies the data out of an internal buffer. For large amounts of data it +- * reads directly into the buffer provided by the caller. +- * +- * 2. Whenever read() would block, it invokes the Xt event dispatching +- * mechanism to process X events. In fact, this is the only place these +- * events are processed, as there is no XtAppMainLoop in the program. +- */ +- +-rfbBool +-ReadFromRFBServer(rfbClient* client, char *out, unsigned int n) +-{ +-#undef DEBUG_READ_EXACT +-#ifdef DEBUG_READ_EXACT +- char* oout=out; +- int nn=n; +- rfbClientLog("ReadFromRFBServer %d bytes\n",n); +-#endif +- if (client->serverPort==-1) { +- /* vncrec playing */ +- rfbVNCRec* rec = client->vncRec; +- struct timeval tv; +- +- if (rec->readTimestamp) { +- rec->readTimestamp = FALSE; +- if (!fread(&tv,sizeof(struct timeval),1,rec->file)) +- return FALSE; +- +- tv.tv_sec = rfbClientSwap32IfLE (tv.tv_sec); +- tv.tv_usec = rfbClientSwap32IfLE (tv.tv_usec); +- +- if (rec->tv.tv_sec!=0 && !rec->doNotSleep) { +- struct timeval diff; +- diff.tv_sec = tv.tv_sec - rec->tv.tv_sec; +- diff.tv_usec = tv.tv_usec - rec->tv.tv_usec; +- if(diff.tv_usec<0) { +- diff.tv_sec--; +- diff.tv_usec+=1000000; +- } +-#ifndef __MINGW32__ +- sleep (diff.tv_sec); +- usleep (diff.tv_usec); +-#else +- Sleep (diff.tv_sec * 1000 + diff.tv_usec/1000); +-#endif +- } +- +- rec->tv=tv; +- } +- +- return (fread(out,1,n,rec->file)<0?FALSE:TRUE); +- } +- +- if (n <= client->buffered) { +- memcpy(out, client->bufoutptr, n); +- client->bufoutptr += n; +- client->buffered -= n; +-#ifdef DEBUG_READ_EXACT +- goto hexdump; +-#endif +- return TRUE; +- } +- +- memcpy(out, client->bufoutptr, client->buffered); +- +- out += client->buffered; +- n -= client->buffered; +- +- client->bufoutptr = client->buf; +- client->buffered = 0; +- +- if (n <= RFB_BUF_SIZE) { +- +- while (client->buffered < n) { +- int i; +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- if (client->tlsSession) { +- i = ReadFromTLS(client, client->buf + client->buffered, RFB_BUF_SIZE - client->buffered); +- } else { +-#endif +- i = read(client->sock, client->buf + client->buffered, RFB_BUF_SIZE - client->buffered); +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- } +-#endif +- if (i <= 0) { +- if (i < 0) { +-#ifdef WIN32 +- errno=WSAGetLastError(); +-#endif +- if (errno == EWOULDBLOCK || errno == EAGAIN) { +- /* TODO: +- ProcessXtEvents(); +- */ +- WaitForMessage(client, 100000); +- i = 0; +- } else { +- rfbClientErr("read (%d: %s)\n",errno,strerror(errno)); +- return FALSE; +- } +- } else { +- if (errorMessageOnReadFailure) { +- rfbClientLog("VNC server closed connection\n"); +- } +- return FALSE; +- } +- } +- client->buffered += i; +- } +- +- memcpy(out, client->bufoutptr, n); +- client->bufoutptr += n; +- client->buffered -= n; +- +- } else { +- +- while (n > 0) { +- int i; +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- if (client->tlsSession) { +- i = ReadFromTLS(client, out, n); +- } else { +-#endif +- i = read(client->sock, out, n); +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- } +-#endif +- if (i <= 0) { +- if (i < 0) { +-#ifdef WIN32 +- errno=WSAGetLastError(); +-#endif +- if (errno == EWOULDBLOCK || errno == EAGAIN) { +- /* TODO: +- ProcessXtEvents(); +- */ +- WaitForMessage(client, 100000); +- i = 0; +- } else { +- rfbClientErr("read (%s)\n",strerror(errno)); +- return FALSE; +- } +- } else { +- if (errorMessageOnReadFailure) { +- rfbClientLog("VNC server closed connection\n"); +- } +- return FALSE; +- } +- } +- out += i; +- n -= i; +- } +- } +- +-#ifdef DEBUG_READ_EXACT +-hexdump: +- { int ii; +- for(ii=0;iiserverPort==-1) +- return TRUE; /* vncrec playing */ +- +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- if (client->tlsSession) { +- /* WriteToTLS() will guarantee either everything is written, or error/eof returns */ +- i = WriteToTLS(client, buf, n); +- if (i <= 0) return FALSE; +- +- return TRUE; +- } +-#endif +- +- while (i < n) { +- j = write(client->sock, buf + i, (n - i)); +- if (j <= 0) { +- if (j < 0) { +-#ifdef WIN32 +- errno=WSAGetLastError(); +-#endif +- if (errno == EWOULDBLOCK || +-#ifdef LIBVNCSERVER_ENOENT_WORKAROUND +- errno == ENOENT || +-#endif +- errno == EAGAIN) { +- FD_ZERO(&fds); +- FD_SET(client->sock,&fds); +- +- if (select(client->sock+1, NULL, &fds, NULL, NULL) <= 0) { +- rfbClientErr("select\n"); +- return FALSE; +- } +- j = 0; +- } else { +- rfbClientErr("write\n"); +- return FALSE; +- } +- } else { +- rfbClientLog("write failed\n"); +- return FALSE; +- } +- } +- i += j; +- } +- return TRUE; +-} +- +- +- +-static int initSockets() { +-#ifdef WIN32 +- WSADATA trash; +- static rfbBool WSAinitted=FALSE; +- if(!WSAinitted) { +- int i=WSAStartup(MAKEWORD(2,0),&trash); +- if(i!=0) { +- rfbClientErr("Couldn't init Windows Sockets\n"); +- return 0; +- } +- WSAinitted=TRUE; +- } +-#endif +- return 1; +-} +- +-/* +- * ConnectToTcpAddr connects to the given TCP port. +- */ +- +-int +-ConnectClientToTcpAddr(unsigned int host, int port) +-{ +- int sock; +- struct sockaddr_in addr; +- int one = 1; +- +- if (!initSockets()) +- return -1; +- +- addr.sin_family = AF_INET; +- addr.sin_port = htons(port); +- addr.sin_addr.s_addr = host; +- +- sock = socket(AF_INET, SOCK_STREAM, 0); +- if (sock < 0) { +-#ifdef WIN32 +- errno=WSAGetLastError(); +-#endif +- rfbClientErr("ConnectToTcpAddr: socket (%s)\n",strerror(errno)); +- return -1; +- } +- +- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) { +- rfbClientErr("ConnectToTcpAddr: connect\n"); +- close(sock); +- return -1; +- } +- +- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, +- (char *)&one, sizeof(one)) < 0) { +- rfbClientErr("ConnectToTcpAddr: setsockopt\n"); +- close(sock); +- return -1; +- } +- +- return sock; +-} +- +-int +-ConnectClientToTcpAddr6(const char *hostname, int port) +-{ +-#ifdef LIBVNCSERVER_IPv6 +- int sock; +- int n; +- struct addrinfo hints, *res, *ressave; +- char port_s[10]; +- int one = 1; +- +- if (!initSockets()) +- return -1; +- +- snprintf(port_s, 10, "%d", port); +- memset(&hints, 0, sizeof(struct addrinfo)); +- hints.ai_family = AF_UNSPEC; +- hints.ai_socktype = SOCK_STREAM; +- if ((n = getaddrinfo(hostname, port_s, &hints, &res))) +- { +- rfbClientErr("ConnectClientToTcpAddr6: getaddrinfo (%s)\n", gai_strerror(n)); +- return -1; +- } +- +- ressave = res; +- sock = -1; +- while (res) +- { +- sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol); +- if (sock >= 0) +- { +- if (connect(sock, res->ai_addr, res->ai_addrlen) == 0) +- break; +- close(sock); +- sock = -1; +- } +- res = res->ai_next; +- } +- freeaddrinfo(ressave); +- +- if (sock == -1) +- { +- rfbClientErr("ConnectClientToTcpAddr6: connect\n"); +- return -1; +- } +- +- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, +- (char *)&one, sizeof(one)) < 0) { +- rfbClientErr("ConnectToTcpAddr: setsockopt\n"); +- close(sock); +- return -1; +- } +- +- return sock; +- +-#else +- +- rfbClientErr("ConnectClientToTcpAddr6: IPv6 disabled\n"); +- return -1; +- +-#endif +-} +- +-int +-ConnectClientToUnixSock(const char *sockFile) +-{ +-#ifdef WIN32 +- rfbClientErr("Windows doesn't support UNIX sockets\n"); +- return -1; +-#else +- int sock; +- struct sockaddr_un addr; +- addr.sun_family = AF_UNIX; +- strcpy(addr.sun_path, sockFile); +- +- sock = socket(AF_UNIX, SOCK_STREAM, 0); +- if (sock < 0) { +- rfbClientErr("ConnectToUnixSock: socket (%s)\n",strerror(errno)); +- return -1; +- } +- +- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr.sun_family) + strlen(addr.sun_path)) < 0) { +- rfbClientErr("ConnectToUnixSock: connect\n"); +- close(sock); +- return -1; +- } +- +- return sock; +-#endif +-} +- +- +- +-/* +- * FindFreeTcpPort tries to find unused TCP port in the range +- * (TUNNEL_PORT_OFFSET, TUNNEL_PORT_OFFSET + 99]. Returns 0 on failure. +- */ +- +-int +-FindFreeTcpPort(void) +-{ +- int sock, port; +- struct sockaddr_in addr; +- +- addr.sin_family = AF_INET; +- addr.sin_addr.s_addr = htonl(INADDR_ANY); +- +- if (!initSockets()) +- return -1; +- +- sock = socket(AF_INET, SOCK_STREAM, 0); +- if (sock < 0) { +- rfbClientErr(": FindFreeTcpPort: socket\n"); +- return 0; +- } +- +- for (port = TUNNEL_PORT_OFFSET + 99; port > TUNNEL_PORT_OFFSET; port--) { +- addr.sin_port = htons((unsigned short)port); +- if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0) { +- close(sock); +- return port; +- } +- } +- +- close(sock); +- return 0; +-} +- +- +-/* +- * ListenAtTcpPort starts listening at the given TCP port. +- */ +- +-int +-ListenAtTcpPort(int port) +-{ +- int sock; +- struct sockaddr_in addr; +- int one = 1; +- +- addr.sin_family = AF_INET; +- addr.sin_port = htons(port); +- addr.sin_addr.s_addr = htonl(INADDR_ANY); +- +- if (!initSockets()) +- return -1; +- +- sock = socket(AF_INET, SOCK_STREAM, 0); +- if (sock < 0) { +- rfbClientErr("ListenAtTcpPort: socket\n"); +- return -1; +- } +- +- if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, +- (const char *)&one, sizeof(one)) < 0) { +- rfbClientErr("ListenAtTcpPort: setsockopt\n"); +- close(sock); +- return -1; +- } +- +- if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) { +- rfbClientErr("ListenAtTcpPort: bind\n"); +- close(sock); +- return -1; +- } +- +- if (listen(sock, 5) < 0) { +- rfbClientErr("ListenAtTcpPort: listen\n"); +- close(sock); +- return -1; +- } +- +- return sock; +-} +- +- +-/* +- * AcceptTcpConnection accepts a TCP connection. +- */ +- +-int +-AcceptTcpConnection(int listenSock) +-{ +- int sock; +- struct sockaddr_in addr; +- socklen_t addrlen = sizeof(addr); +- int one = 1; +- +- sock = accept(listenSock, (struct sockaddr *) &addr, &addrlen); +- if (sock < 0) { +- rfbClientErr("AcceptTcpConnection: accept\n"); +- return -1; +- } +- +- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, +- (char *)&one, sizeof(one)) < 0) { +- rfbClientErr("AcceptTcpConnection: setsockopt\n"); +- close(sock); +- return -1; +- } +- +- return sock; +-} +- +- +-/* +- * SetNonBlocking sets a socket into non-blocking mode. +- */ +- +-rfbBool +-SetNonBlocking(int sock) +-{ +-#ifdef WIN32 +- unsigned long block=1; +- if(ioctlsocket(sock, FIONBIO, &block) == SOCKET_ERROR) { +- errno=WSAGetLastError(); +-#else +- int flags = fcntl(sock, F_GETFL); +- if(flags < 0 || fcntl(sock, F_SETFL, flags | O_NONBLOCK) < 0) { +-#endif +- rfbClientErr("Setting socket to non-blocking failed: %s\n",strerror(errno)); +- return FALSE; +- } +- return TRUE; +-} +- +- +- +-/* +- * SetDSCP sets a socket's IP QoS parameters aka Differentiated Services Code Point field +- */ +- +-rfbBool +-SetDSCP(int sock, int dscp) +-{ +-#ifdef WIN32 +- rfbClientErr("Setting of QoS IP DSCP not implemented for Windows\n"); +- return TRUE; +-#else +- int level, cmd; +- struct sockaddr addr; +- socklen_t addrlen = sizeof(addr); +- +- if(getsockname(sock, &addr, &addrlen) != 0) { +- rfbClientErr("Setting socket QoS failed while getting socket address: %s\n",strerror(errno)); +- return FALSE; +- } +- +- switch(addr.sa_family) +- { +-#if defined LIBVNCSERVER_IPv6 && defined IPV6_TCLASS +- case AF_INET6: +- level = IPPROTO_IPV6; +- cmd = IPV6_TCLASS; +- break; +-#endif +- case AF_INET: +- level = IPPROTO_IP; +- cmd = IP_TOS; +- break; +- default: +- rfbClientErr("Setting socket QoS failed: Not bound to IP address"); +- return FALSE; +- } +- +- if(setsockopt(sock, level, cmd, (void*)&dscp, sizeof(dscp)) != 0) { +- rfbClientErr("Setting socket QoS failed: %s\n", strerror(errno)); +- return FALSE; +- } +- +- return TRUE; +-#endif +-} +- +- +- +-/* +- * StringToIPAddr - convert a host string to an IP address. +- */ +- +-rfbBool +-StringToIPAddr(const char *str, unsigned int *addr) +-{ +- struct hostent *hp; +- +- if (strcmp(str,"") == 0) { +- *addr = htonl(INADDR_LOOPBACK); /* local */ +- return TRUE; +- } +- +- *addr = inet_addr(str); +- +- if (*addr != -1) +- return TRUE; +- +- if (!initSockets()) +- return -1; +- +- hp = gethostbyname(str); +- +- if (hp) { +- *addr = *(unsigned int *)hp->h_addr; +- return TRUE; +- } +- +- return FALSE; +-} +- +- +-/* +- * Test if the other end of a socket is on the same machine. +- */ +- +-rfbBool +-SameMachine(int sock) +-{ +- struct sockaddr_in peeraddr, myaddr; +- socklen_t addrlen = sizeof(struct sockaddr_in); +- +- getpeername(sock, (struct sockaddr *)&peeraddr, &addrlen); +- getsockname(sock, (struct sockaddr *)&myaddr, &addrlen); +- +- return (peeraddr.sin_addr.s_addr == myaddr.sin_addr.s_addr); +-} +- +- +-/* +- * Print out the contents of a packet for debugging. +- */ +- +-void +-PrintInHex(char *buf, int len) +-{ +- int i, j; +- char c, str[17]; +- +- str[16] = 0; +- +- rfbClientLog("ReadExact: "); +- +- for (i = 0; i < len; i++) +- { +- if ((i % 16 == 0) && (i != 0)) { +- rfbClientLog(" "); +- } +- c = buf[i]; +- str[i % 16] = (((c > 31) && (c < 127)) ? c : '.'); +- rfbClientLog("%02x ",(unsigned char)c); +- if ((i % 4) == 3) +- rfbClientLog(" "); +- if ((i % 16) == 15) +- { +- rfbClientLog("%s\n",str); +- } +- } +- if ((i % 16) != 0) +- { +- for (j = i % 16; j < 16; j++) +- { +- rfbClientLog(" "); +- if ((j % 4) == 3) rfbClientLog(" "); +- } +- str[i % 16] = 0; +- rfbClientLog("%s\n",str); +- } +- +- fflush(stderr); +-} +- +-int WaitForMessage(rfbClient* client,unsigned int usecs) +-{ +- fd_set fds; +- struct timeval timeout; +- int num; +- +- if (client->serverPort==-1) +- /* playing back vncrec file */ +- return 1; +- +- timeout.tv_sec=(usecs/1000000); +- timeout.tv_usec=(usecs%1000000); +- +- FD_ZERO(&fds); +- FD_SET(client->sock,&fds); +- +- num=select(client->sock+1, &fds, NULL, NULL, &timeout); +- if(num<0) { +-#ifdef WIN32 +- errno=WSAGetLastError(); +-#endif +- rfbClientLog("Waiting for message failed: %d (%s)\n",errno,strerror(errno)); +- } +- +- return num; +-} +- +- +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/tight.c b/remmina-plugins/vnc/libvncserver/libvncclient/tight.c +deleted file mode 100644 +index 2f9fbab..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/tight.c ++++ /dev/null +@@ -1,688 +0,0 @@ +-/* +- * Copyright (C) 2000, 2001 Const Kaplinsky. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +- +-/* +- * tight.c - handle ``tight'' encoding. +- * +- * This file shouldn't be compiled directly. It is included multiple +- * times by rfbproto.c, each time with a different definition of the +- * macro BPP. For each value of BPP, this file defines a function +- * which handles a tight-encoded rectangle with BPP bits per pixel. +- * +- */ +- +-#define TIGHT_MIN_TO_COMPRESS 12 +- +-#define CARDBPP CONCAT3E(uint,BPP,_t) +-#define filterPtrBPP CONCAT2E(filterPtr,BPP) +- +-#define HandleTightBPP CONCAT2E(HandleTight,BPP) +-#define InitFilterCopyBPP CONCAT2E(InitFilterCopy,BPP) +-#define InitFilterPaletteBPP CONCAT2E(InitFilterPalette,BPP) +-#define InitFilterGradientBPP CONCAT2E(InitFilterGradient,BPP) +-#define FilterCopyBPP CONCAT2E(FilterCopy,BPP) +-#define FilterPaletteBPP CONCAT2E(FilterPalette,BPP) +-#define FilterGradientBPP CONCAT2E(FilterGradient,BPP) +- +-#if BPP != 8 +-#define DecompressJpegRectBPP CONCAT2E(DecompressJpegRect,BPP) +-#endif +- +-#ifndef RGB_TO_PIXEL +- +-#define RGB_TO_PIXEL(bpp,r,g,b) \ +- (((CARD##bpp)(r) & client->format.redMax) << client->format.redShift | \ +- ((CARD##bpp)(g) & client->format.greenMax) << client->format.greenShift | \ +- ((CARD##bpp)(b) & client->format.blueMax) << client->format.blueShift) +- +-#define RGB24_TO_PIXEL(bpp,r,g,b) \ +- ((((CARD##bpp)(r) & 0xFF) * client->format.redMax + 127) / 255 \ +- << client->format.redShift | \ +- (((CARD##bpp)(g) & 0xFF) * client->format.greenMax + 127) / 255 \ +- << client->format.greenShift | \ +- (((CARD##bpp)(b) & 0xFF) * client->format.blueMax + 127) / 255 \ +- << client->format.blueShift) +- +-#define RGB24_TO_PIXEL32(r,g,b) \ +- (((uint32_t)(r) & 0xFF) << client->format.redShift | \ +- ((uint32_t)(g) & 0xFF) << client->format.greenShift | \ +- ((uint32_t)(b) & 0xFF) << client->format.blueShift) +- +-#endif +- +-/* Type declarations */ +- +-typedef void (*filterPtrBPP)(rfbClient* client, int, CARDBPP *); +- +-/* Prototypes */ +- +-static int InitFilterCopyBPP (rfbClient* client, int rw, int rh); +-static int InitFilterPaletteBPP (rfbClient* client, int rw, int rh); +-static int InitFilterGradientBPP (rfbClient* client, int rw, int rh); +-static void FilterCopyBPP (rfbClient* client, int numRows, CARDBPP *destBuffer); +-static void FilterPaletteBPP (rfbClient* client, int numRows, CARDBPP *destBuffer); +-static void FilterGradientBPP (rfbClient* client, int numRows, CARDBPP *destBuffer); +- +-#if BPP != 8 +-static rfbBool DecompressJpegRectBPP(rfbClient* client, int x, int y, int w, int h); +-#endif +- +-/* Definitions */ +- +-static rfbBool +-HandleTightBPP (rfbClient* client, int rx, int ry, int rw, int rh) +-{ +- CARDBPP fill_colour; +- uint8_t comp_ctl; +- uint8_t filter_id; +- filterPtrBPP filterFn; +- z_streamp zs; +- char *buffer2; +- int err, stream_id, compressedLen, bitsPixel; +- int bufferSize, rowSize, numRows, portionLen, rowsProcessed, extraBytes; +- +- if (!ReadFromRFBServer(client, (char *)&comp_ctl, 1)) +- return FALSE; +- +- /* Flush zlib streams if we are told by the server to do so. */ +- for (stream_id = 0; stream_id < 4; stream_id++) { +- if ((comp_ctl & 1) && client->zlibStreamActive[stream_id]) { +- if (inflateEnd (&client->zlibStream[stream_id]) != Z_OK && +- client->zlibStream[stream_id].msg != NULL) +- rfbClientLog("inflateEnd: %s\n", client->zlibStream[stream_id].msg); +- client->zlibStreamActive[stream_id] = FALSE; +- } +- comp_ctl >>= 1; +- } +- +- /* Handle solid rectangles. */ +- if (comp_ctl == rfbTightFill) { +-#if BPP == 32 +- if (client->format.depth == 24 && client->format.redMax == 0xFF && +- client->format.greenMax == 0xFF && client->format.blueMax == 0xFF) { +- if (!ReadFromRFBServer(client, client->buffer, 3)) +- return FALSE; +- fill_colour = RGB24_TO_PIXEL32(client->buffer[0], client->buffer[1], client->buffer[2]); +- } else { +- if (!ReadFromRFBServer(client, (char*)&fill_colour, sizeof(fill_colour))) +- return FALSE; +- } +-#else +- if (!ReadFromRFBServer(client, (char*)&fill_colour, sizeof(fill_colour))) +- return FALSE; +-#endif +- +- FillRectangle(client, rx, ry, rw, rh, fill_colour); +- +- return TRUE; +- } +- +-#if BPP == 8 +- if (comp_ctl == rfbTightJpeg) { +- rfbClientLog("Tight encoding: JPEG is not supported in 8 bpp mode.\n"); +- return FALSE; +- } +-#else +- if (comp_ctl == rfbTightJpeg) { +- return DecompressJpegRectBPP(client, rx, ry, rw, rh); +- } +-#endif +- +- /* Quit on unsupported subencoding value. */ +- if (comp_ctl > rfbTightMaxSubencoding) { +- rfbClientLog("Tight encoding: bad subencoding value received.\n"); +- return FALSE; +- } +- +- /* +- * Here primary compression mode handling begins. +- * Data was processed with optional filter + zlib compression. +- */ +- +- /* First, we should identify a filter to use. */ +- if ((comp_ctl & rfbTightExplicitFilter) != 0) { +- if (!ReadFromRFBServer(client, (char*)&filter_id, 1)) +- return FALSE; +- +- switch (filter_id) { +- case rfbTightFilterCopy: +- filterFn = FilterCopyBPP; +- bitsPixel = InitFilterCopyBPP(client, rw, rh); +- break; +- case rfbTightFilterPalette: +- filterFn = FilterPaletteBPP; +- bitsPixel = InitFilterPaletteBPP(client, rw, rh); +- break; +- case rfbTightFilterGradient: +- filterFn = FilterGradientBPP; +- bitsPixel = InitFilterGradientBPP(client, rw, rh); +- break; +- default: +- rfbClientLog("Tight encoding: unknown filter code received.\n"); +- return FALSE; +- } +- } else { +- filterFn = FilterCopyBPP; +- bitsPixel = InitFilterCopyBPP(client, rw, rh); +- } +- if (bitsPixel == 0) { +- rfbClientLog("Tight encoding: error receiving palette.\n"); +- return FALSE; +- } +- +- /* Determine if the data should be decompressed or just copied. */ +- rowSize = (rw * bitsPixel + 7) / 8; +- if (rh * rowSize < TIGHT_MIN_TO_COMPRESS) { +- if (!ReadFromRFBServer(client, (char*)client->buffer, rh * rowSize)) +- return FALSE; +- +- buffer2 = &client->buffer[TIGHT_MIN_TO_COMPRESS * 4]; +- filterFn(client, rh, (CARDBPP *)buffer2); +- +- CopyRectangle(client, (uint8_t *)buffer2, rx, ry, rw, rh); +- +- return TRUE; +- } +- +- /* Read the length (1..3 bytes) of compressed data following. */ +- compressedLen = (int)ReadCompactLen(client); +- if (compressedLen <= 0) { +- rfbClientLog("Incorrect data received from the server.\n"); +- return FALSE; +- } +- +- /* Now let's initialize compression stream if needed. */ +- stream_id = comp_ctl & 0x03; +- zs = &client->zlibStream[stream_id]; +- if (!client->zlibStreamActive[stream_id]) { +- zs->zalloc = Z_NULL; +- zs->zfree = Z_NULL; +- zs->opaque = Z_NULL; +- err = inflateInit(zs); +- if (err != Z_OK) { +- if (zs->msg != NULL) +- rfbClientLog("InflateInit error: %s.\n", zs->msg); +- return FALSE; +- } +- client->zlibStreamActive[stream_id] = TRUE; +- } +- +- /* Read, decode and draw actual pixel data in a loop. */ +- +- bufferSize = RFB_BUFFER_SIZE * bitsPixel / (bitsPixel + BPP) & 0xFFFFFFFC; +- buffer2 = &client->buffer[bufferSize]; +- if (rowSize > bufferSize) { +- /* Should be impossible when RFB_BUFFER_SIZE >= 16384 */ +- rfbClientLog("Internal error: incorrect buffer size.\n"); +- return FALSE; +- } +- +- rowsProcessed = 0; +- extraBytes = 0; +- +- while (compressedLen > 0) { +- if (compressedLen > ZLIB_BUFFER_SIZE) +- portionLen = ZLIB_BUFFER_SIZE; +- else +- portionLen = compressedLen; +- +- if (!ReadFromRFBServer(client, (char*)client->zlib_buffer, portionLen)) +- return FALSE; +- +- compressedLen -= portionLen; +- +- zs->next_in = (Bytef *)client->zlib_buffer; +- zs->avail_in = portionLen; +- +- do { +- zs->next_out = (Bytef *)&client->buffer[extraBytes]; +- zs->avail_out = bufferSize - extraBytes; +- +- err = inflate(zs, Z_SYNC_FLUSH); +- if (err == Z_BUF_ERROR) /* Input exhausted -- no problem. */ +- break; +- if (err != Z_OK && err != Z_STREAM_END) { +- if (zs->msg != NULL) { +- rfbClientLog("Inflate error: %s.\n", zs->msg); +- } else { +- rfbClientLog("Inflate error: %d.\n", err); +- } +- return FALSE; +- } +- +- numRows = (bufferSize - zs->avail_out) / rowSize; +- +- filterFn(client, numRows, (CARDBPP *)buffer2); +- +- extraBytes = bufferSize - zs->avail_out - numRows * rowSize; +- if (extraBytes > 0) +- memcpy(client->buffer, &client->buffer[numRows * rowSize], extraBytes); +- +- CopyRectangle(client, (uint8_t *)buffer2, rx, ry+rowsProcessed, rw, numRows); +- +- rowsProcessed += numRows; +- } +- while (zs->avail_out == 0); +- } +- +- if (rowsProcessed != rh) { +- rfbClientLog("Incorrect number of scan lines after decompression.\n"); +- return FALSE; +- } +- +- return TRUE; +-} +- +-/*---------------------------------------------------------------------------- +- * +- * Filter stuff. +- * +- */ +- +-static int +-InitFilterCopyBPP (rfbClient* client, int rw, int rh) +-{ +- client->rectWidth = rw; +- +-#if BPP == 32 +- if (client->format.depth == 24 && client->format.redMax == 0xFF && +- client->format.greenMax == 0xFF && client->format.blueMax == 0xFF) { +- client->cutZeros = TRUE; +- return 24; +- } else { +- client->cutZeros = FALSE; +- } +-#endif +- +- return BPP; +-} +- +-static void +-FilterCopyBPP (rfbClient* client, int numRows, CARDBPP *dst) +-{ +- +-#if BPP == 32 +- int x, y; +- +- if (client->cutZeros) { +- for (y = 0; y < numRows; y++) { +- for (x = 0; x < client->rectWidth; x++) { +- dst[y*client->rectWidth+x] = +- RGB24_TO_PIXEL32(client->buffer[(y*client->rectWidth+x)*3], +- client->buffer[(y*client->rectWidth+x)*3+1], +- client->buffer[(y*client->rectWidth+x)*3+2]); +- } +- } +- return; +- } +-#endif +- +- memcpy (dst, client->buffer, numRows * client->rectWidth * (BPP / 8)); +-} +- +-static int +-InitFilterGradientBPP (rfbClient* client, int rw, int rh) +-{ +- int bits; +- +- bits = InitFilterCopyBPP(client, rw, rh); +- if (client->cutZeros) +- memset(client->tightPrevRow, 0, rw * 3); +- else +- memset(client->tightPrevRow, 0, rw * 3 * sizeof(uint16_t)); +- +- return bits; +-} +- +-#if BPP == 32 +- +-static void +-FilterGradient24 (rfbClient* client, int numRows, uint32_t *dst) +-{ +- int x, y, c; +- uint8_t thisRow[2048*3]; +- uint8_t pix[3]; +- int est[3]; +- +- for (y = 0; y < numRows; y++) { +- +- /* First pixel in a row */ +- for (c = 0; c < 3; c++) { +- pix[c] = client->tightPrevRow[c] + client->buffer[y*client->rectWidth*3+c]; +- thisRow[c] = pix[c]; +- } +- dst[y*client->rectWidth] = RGB24_TO_PIXEL32(pix[0], pix[1], pix[2]); +- +- /* Remaining pixels of a row */ +- for (x = 1; x < client->rectWidth; x++) { +- for (c = 0; c < 3; c++) { +- est[c] = (int)client->tightPrevRow[x*3+c] + (int)pix[c] - +- (int)client->tightPrevRow[(x-1)*3+c]; +- if (est[c] > 0xFF) { +- est[c] = 0xFF; +- } else if (est[c] < 0x00) { +- est[c] = 0x00; +- } +- pix[c] = (uint8_t)est[c] + client->buffer[(y*client->rectWidth+x)*3+c]; +- thisRow[x*3+c] = pix[c]; +- } +- dst[y*client->rectWidth+x] = RGB24_TO_PIXEL32(pix[0], pix[1], pix[2]); +- } +- +- memcpy(client->tightPrevRow, thisRow, client->rectWidth * 3); +- } +-} +- +-#endif +- +-static void +-FilterGradientBPP (rfbClient* client, int numRows, CARDBPP *dst) +-{ +- int x, y, c; +- CARDBPP *src = (CARDBPP *)client->buffer; +- uint16_t *thatRow = (uint16_t *)client->tightPrevRow; +- uint16_t thisRow[2048*3]; +- uint16_t pix[3]; +- uint16_t max[3]; +- int shift[3]; +- int est[3]; +- +-#if BPP == 32 +- if (client->cutZeros) { +- FilterGradient24(client, numRows, dst); +- return; +- } +-#endif +- +- max[0] = client->format.redMax; +- max[1] = client->format.greenMax; +- max[2] = client->format.blueMax; +- +- shift[0] = client->format.redShift; +- shift[1] = client->format.greenShift; +- shift[2] = client->format.blueShift; +- +- for (y = 0; y < numRows; y++) { +- +- /* First pixel in a row */ +- for (c = 0; c < 3; c++) { +- pix[c] = (uint16_t)(((src[y*client->rectWidth] >> shift[c]) + thatRow[c]) & max[c]); +- thisRow[c] = pix[c]; +- } +- dst[y*client->rectWidth] = RGB_TO_PIXEL(BPP, pix[0], pix[1], pix[2]); +- +- /* Remaining pixels of a row */ +- for (x = 1; x < client->rectWidth; x++) { +- for (c = 0; c < 3; c++) { +- est[c] = (int)thatRow[x*3+c] + (int)pix[c] - (int)thatRow[(x-1)*3+c]; +- if (est[c] > (int)max[c]) { +- est[c] = (int)max[c]; +- } else if (est[c] < 0) { +- est[c] = 0; +- } +- pix[c] = (uint16_t)(((src[y*client->rectWidth+x] >> shift[c]) + est[c]) & max[c]); +- thisRow[x*3+c] = pix[c]; +- } +- dst[y*client->rectWidth+x] = RGB_TO_PIXEL(BPP, pix[0], pix[1], pix[2]); +- } +- memcpy(thatRow, thisRow, client->rectWidth * 3 * sizeof(uint16_t)); +- } +-} +- +-static int +-InitFilterPaletteBPP (rfbClient* client, int rw, int rh) +-{ +- uint8_t numColors; +-#if BPP == 32 +- int i; +- CARDBPP *palette = (CARDBPP *)client->tightPalette; +-#endif +- +- client->rectWidth = rw; +- +- if (!ReadFromRFBServer(client, (char*)&numColors, 1)) +- return 0; +- +- client->rectColors = (int)numColors; +- if (++client->rectColors < 2) +- return 0; +- +-#if BPP == 32 +- if (client->format.depth == 24 && client->format.redMax == 0xFF && +- client->format.greenMax == 0xFF && client->format.blueMax == 0xFF) { +- if (!ReadFromRFBServer(client, (char*)&client->tightPalette, client->rectColors * 3)) +- return 0; +- for (i = client->rectColors - 1; i >= 0; i--) { +- palette[i] = RGB24_TO_PIXEL32(client->tightPalette[i*3], +- client->tightPalette[i*3+1], +- client->tightPalette[i*3+2]); +- } +- return (client->rectColors == 2) ? 1 : 8; +- } +-#endif +- +- if (!ReadFromRFBServer(client, (char*)&client->tightPalette, client->rectColors * (BPP / 8))) +- return 0; +- +- return (client->rectColors == 2) ? 1 : 8; +-} +- +-static void +-FilterPaletteBPP (rfbClient* client, int numRows, CARDBPP *dst) +-{ +- int x, y, b, w; +- uint8_t *src = (uint8_t *)client->buffer; +- CARDBPP *palette = (CARDBPP *)client->tightPalette; +- +- if (client->rectColors == 2) { +- w = (client->rectWidth + 7) / 8; +- for (y = 0; y < numRows; y++) { +- for (x = 0; x < client->rectWidth / 8; x++) { +- for (b = 7; b >= 0; b--) +- dst[y*client->rectWidth+x*8+7-b] = palette[src[y*w+x] >> b & 1]; +- } +- for (b = 7; b >= 8 - client->rectWidth % 8; b--) { +- dst[y*client->rectWidth+x*8+7-b] = palette[src[y*w+x] >> b & 1]; +- } +- } +- } else { +- for (y = 0; y < numRows; y++) +- for (x = 0; x < client->rectWidth; x++) +- dst[y*client->rectWidth+x] = palette[(int)src[y*client->rectWidth+x]]; +- } +-} +- +-#if BPP != 8 +- +-/*---------------------------------------------------------------------------- +- * +- * JPEG decompression. +- * +- */ +- +-static rfbBool +-DecompressJpegRectBPP(rfbClient* client, int x, int y, int w, int h) +-{ +- struct jpeg_decompress_struct cinfo; +- struct jpeg_error_mgr jerr; +- int compressedLen; +- uint8_t *compressedData; +- CARDBPP *pixelPtr; +- JSAMPROW rowPointer[1]; +- int dx, dy; +- +- compressedLen = (int)ReadCompactLen(client); +- if (compressedLen <= 0) { +- rfbClientLog("Incorrect data received from the server.\n"); +- return FALSE; +- } +- +- compressedData = malloc(compressedLen); +- if (compressedData == NULL) { +- rfbClientLog("Memory allocation error.\n"); +- return FALSE; +- } +- +- if (!ReadFromRFBServer(client, (char*)compressedData, compressedLen)) { +- free(compressedData); +- return FALSE; +- } +- +- cinfo.err = jpeg_std_error(&jerr); +- cinfo.client_data = client; +- jpeg_create_decompress(&cinfo); +- +- JpegSetSrcManager(&cinfo, compressedData, compressedLen); +- +- jpeg_read_header(&cinfo, TRUE); +- cinfo.out_color_space = JCS_RGB; +- +- jpeg_start_decompress(&cinfo); +- if (cinfo.output_width != w || cinfo.output_height != h || +- cinfo.output_components != 3) { +- rfbClientLog("Tight Encoding: Wrong JPEG data received.\n"); +- jpeg_destroy_decompress(&cinfo); +- free(compressedData); +- return FALSE; +- } +- +- rowPointer[0] = (JSAMPROW)client->buffer; +- dy = 0; +- while (cinfo.output_scanline < cinfo.output_height) { +- jpeg_read_scanlines(&cinfo, rowPointer, 1); +- if (client->jpegError) { +- break; +- } +- pixelPtr = (CARDBPP *)&client->buffer[RFB_BUFFER_SIZE / 2]; +- for (dx = 0; dx < w; dx++) { +- *pixelPtr++ = +- RGB24_TO_PIXEL(BPP, client->buffer[dx*3], client->buffer[dx*3+1], client->buffer[dx*3+2]); +- } +- CopyRectangle(client, (uint8_t *)&client->buffer[RFB_BUFFER_SIZE / 2], x, y + dy, w, 1); +- dy++; +- } +- +- if (!client->jpegError) +- jpeg_finish_decompress(&cinfo); +- +- jpeg_destroy_decompress(&cinfo); +- free(compressedData); +- +- return !client->jpegError; +-} +- +-#else +- +-static long +-ReadCompactLen (rfbClient* client) +-{ +- long len; +- uint8_t b; +- +- if (!ReadFromRFBServer(client, (char *)&b, 1)) +- return -1; +- len = (int)b & 0x7F; +- if (b & 0x80) { +- if (!ReadFromRFBServer(client, (char *)&b, 1)) +- return -1; +- len |= ((int)b & 0x7F) << 7; +- if (b & 0x80) { +- if (!ReadFromRFBServer(client, (char *)&b, 1)) +- return -1; +- len |= ((int)b & 0xFF) << 14; +- } +- } +- return len; +-} +- +-/* +- * JPEG source manager functions for JPEG decompression in Tight decoder. +- */ +- +-static void +-JpegInitSource(j_decompress_ptr cinfo) +-{ +- rfbClient* client=(rfbClient*)cinfo->client_data; +- client->jpegError = FALSE; +-} +- +-static boolean +-JpegFillInputBuffer(j_decompress_ptr cinfo) +-{ +- rfbClient* client=(rfbClient*)cinfo->client_data; +- client->jpegError = TRUE; +- client->jpegSrcManager->bytes_in_buffer = client->jpegBufferLen; +- client->jpegSrcManager->next_input_byte = (JOCTET *)client->jpegBufferPtr; +- +- return TRUE; +-} +- +-static void +-JpegSkipInputData(j_decompress_ptr cinfo, long num_bytes) +-{ +- rfbClient* client=(rfbClient*)cinfo->client_data; +- if (num_bytes < 0 || num_bytes > client->jpegSrcManager->bytes_in_buffer) { +- client->jpegError = TRUE; +- client->jpegSrcManager->bytes_in_buffer = client->jpegBufferLen; +- client->jpegSrcManager->next_input_byte = (JOCTET *)client->jpegBufferPtr; +- } else { +- client->jpegSrcManager->next_input_byte += (size_t) num_bytes; +- client->jpegSrcManager->bytes_in_buffer -= (size_t) num_bytes; +- } +-} +- +-static void +-JpegTermSource(j_decompress_ptr cinfo) +-{ +- /* nothing to do here. */ +-} +- +-static void +-JpegSetSrcManager(j_decompress_ptr cinfo, +- uint8_t *compressedData, +- int compressedLen) +-{ +- rfbClient* client=(rfbClient*)cinfo->client_data; +- client->jpegBufferPtr = compressedData; +- client->jpegBufferLen = (size_t)compressedLen; +- +- if(client->jpegSrcManager == NULL) +- client->jpegSrcManager = malloc(sizeof(struct jpeg_source_mgr)); +- client->jpegSrcManager->init_source = JpegInitSource; +- client->jpegSrcManager->fill_input_buffer = JpegFillInputBuffer; +- client->jpegSrcManager->skip_input_data = JpegSkipInputData; +- client->jpegSrcManager->resync_to_restart = jpeg_resync_to_restart; +- client->jpegSrcManager->term_source = JpegTermSource; +- client->jpegSrcManager->next_input_byte = (JOCTET*)client->jpegBufferPtr; +- client->jpegSrcManager->bytes_in_buffer = client->jpegBufferLen; +- +- cinfo->src = client->jpegSrcManager; +-} +- +-#endif +- +-#undef CARDBPP +- +-/* LIBVNCSERVER_HAVE_LIBZ and LIBVNCSERVER_HAVE_LIBJPEG */ +-#endif +-#endif +- +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/tls.c b/remmina-plugins/vnc/libvncserver/libvncclient/tls.c +deleted file mode 100644 +index a926c8c..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/tls.c ++++ /dev/null +@@ -1,536 +0,0 @@ +-/* +- * Copyright (C) 2009 Vic Lee. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-#include +-#include +-#ifdef WIN32 +-#undef SOCKET +-#include /* for Sleep() */ +-#define sleep(X) Sleep(1000*X) /* MinGW32 has no sleep() */ +-#include +-#define read(sock,buf,len) recv(sock,buf,len,0) +-#define write(sock,buf,len) send(sock,buf,len,0) +-#endif +-#include "tls.h" +- +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- +-static const int rfbCertTypePriority[] = { GNUTLS_CRT_X509, 0 }; +-static const int rfbProtoPriority[]= { GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 }; +-static const int rfbKXPriority[] = {GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, 0}; +-static const int rfbKXAnon[] = {GNUTLS_KX_ANON_DH, 0}; +- +-#define DH_BITS 1024 +-static gnutls_dh_params_t rfbDHParams; +- +-static rfbBool rfbTLSInitialized = FALSE; +- +-static rfbBool +-InitializeTLS(void) +-{ +- int ret; +- +- if (rfbTLSInitialized) return TRUE; +- if ((ret = gnutls_global_init()) < 0 || +- (ret = gnutls_dh_params_init(&rfbDHParams)) < 0 || +- (ret = gnutls_dh_params_generate2(rfbDHParams, DH_BITS)) < 0) +- { +- rfbClientLog("Failed to initialized GnuTLS: %s.\n", gnutls_strerror(ret)); +- return FALSE; +- } +- rfbClientLog("GnuTLS initialized.\n"); +- rfbTLSInitialized = TRUE; +- return TRUE; +-} +- +-/* +- * On Windows, translate WSAGetLastError() to errno values as GNU TLS does it +- * internally too. This is necessary because send() and recv() on Windows +- * don't set errno when they fail but GNUTLS expects a proper errno value. +- * +- * Use gnutls_transport_set_global_errno() like the GNU TLS documentation +- * suggests to avoid problems with different errno variables when GNU TLS and +- * libvncclient are linked to different versions of msvcrt.dll. +- */ +-#ifdef WIN32 +-static void WSAtoTLSErrno() +-{ +- switch(WSAGetLastError()) { +- case WSAEWOULDBLOCK: +- gnutls_transport_set_global_errno(EAGAIN); +- break; +- case WSAEINTR: +- gnutls_transport_set_global_errno(EINTR); +- break; +- default: +- gnutls_transport_set_global_errno(EIO); +- break; +- } +-} +-#endif +- +- +-static ssize_t +-PushTLS(gnutls_transport_ptr_t transport, const void *data, size_t len) +-{ +- rfbClient *client = (rfbClient*)transport; +- int ret; +- +- while (1) +- { +- ret = write(client->sock, data, len); +- if (ret < 0) +- { +-#ifdef WIN32 +- WSAtoTLSErrno(); +-#endif +- if (errno == EINTR) continue; +- return -1; +- } +- return ret; +- } +-} +- +- +-static ssize_t +-PullTLS(gnutls_transport_ptr_t transport, void *data, size_t len) +-{ +- rfbClient *client = (rfbClient*)transport; +- int ret; +- +- while (1) +- { +- ret = read(client->sock, data, len); +- if (ret < 0) +- { +-#ifdef WIN32 +- WSAtoTLSErrno(); +-#endif +- if (errno == EINTR) continue; +- return -1; +- } +- return ret; +- } +-} +- +-static rfbBool +-InitializeTLSSession(rfbClient* client, rfbBool anonTLS) +-{ +- int ret; +- +- if (client->tlsSession) return TRUE; +- +- if ((ret = gnutls_init(&client->tlsSession, GNUTLS_CLIENT)) < 0) +- { +- rfbClientLog("Failed to initialized TLS session: %s.\n", gnutls_strerror(ret)); +- return FALSE; +- } +- +- if ((ret = gnutls_set_default_priority(client->tlsSession)) < 0 || +- (ret = gnutls_kx_set_priority(client->tlsSession, anonTLS ? rfbKXAnon : rfbKXPriority)) < 0 || +- (ret = gnutls_certificate_type_set_priority(client->tlsSession, rfbCertTypePriority)) < 0 || +- (ret = gnutls_protocol_set_priority(client->tlsSession, rfbProtoPriority)) < 0) +- { +- rfbClientLog("Warning: Failed to set TLS priority: %s.\n", gnutls_strerror(ret)); +- } +- +- gnutls_transport_set_ptr(client->tlsSession, (gnutls_transport_ptr_t)client); +- gnutls_transport_set_push_function(client->tlsSession, PushTLS); +- gnutls_transport_set_pull_function(client->tlsSession, PullTLS); +- +- rfbClientLog("TLS session initialized.\n"); +- +- return TRUE; +-} +- +-static rfbBool +-SetTLSAnonCredential(rfbClient* client) +-{ +- gnutls_anon_client_credentials anonCred; +- int ret; +- +- if ((ret = gnutls_anon_allocate_client_credentials(&anonCred)) < 0 || +- (ret = gnutls_credentials_set(client->tlsSession, GNUTLS_CRD_ANON, anonCred)) < 0) +- { +- FreeTLS(client); +- rfbClientLog("Failed to create anonymous credentials: %s", gnutls_strerror(ret)); +- return FALSE; +- } +- rfbClientLog("TLS anonymous credential created.\n"); +- return TRUE; +-} +- +-static rfbBool +-HandshakeTLS(rfbClient* client) +-{ +- int timeout = 15; +- int ret; +- +- while (timeout > 0 && (ret = gnutls_handshake(client->tlsSession)) < 0) +- { +- if (!gnutls_error_is_fatal(ret)) +- { +- rfbClientLog("TLS handshake blocking.\n"); +- sleep(1); +- timeout--; +- continue; +- } +- rfbClientLog("TLS handshake failed: %s.\n", gnutls_strerror(ret)); +- FreeTLS(client); +- return FALSE; +- } +- +- if (timeout <= 0) +- { +- rfbClientLog("TLS handshake timeout.\n"); +- FreeTLS(client); +- return FALSE; +- } +- +- rfbClientLog("TLS handshake done.\n"); +- return TRUE; +-} +- +-/* VeNCrypt sub auth. 1 byte auth count, followed by count * 4 byte integers */ +-static rfbBool +-ReadVeNCryptSecurityType(rfbClient* client, uint32_t *result) +-{ +- uint8_t count=0; +- uint8_t loop=0; +- uint8_t flag=0; +- uint32_t tAuth[256], t; +- char buf1[500],buf2[10]; +- uint32_t authScheme; +- +- if (!ReadFromRFBServer(client, (char *)&count, 1)) return FALSE; +- +- if (count==0) +- { +- rfbClientLog("List of security types is ZERO. Giving up.\n"); +- return FALSE; +- } +- +- if (count>sizeof(tAuth)) +- { +- rfbClientLog("%d security types are too many; maximum is %d\n", count, sizeof(tAuth)); +- return FALSE; +- } +- +- rfbClientLog("We have %d security types to read\n", count); +- authScheme=0; +- /* now, we have a list of available security types to read ( uint8_t[] ) */ +- for (loop=0;loop=sizeof(buf1)-1) break; +- snprintf(buf2, sizeof(buf2), (loop>0 ? ", %d" : "%d"), (int)tAuth[loop]); +- strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1); +- } +- rfbClientLog("Unknown VeNCrypt authentication scheme from VNC server: %s\n", +- buf1); +- return FALSE; +- } +- *result = authScheme; +- return TRUE; +-} +- +-static void +-FreeX509Credential(rfbCredential *cred) +-{ +- if (cred->x509Credential.x509CACertFile) free(cred->x509Credential.x509CACertFile); +- if (cred->x509Credential.x509CACrlFile) free(cred->x509Credential.x509CACrlFile); +- if (cred->x509Credential.x509ClientCertFile) free(cred->x509Credential.x509ClientCertFile); +- if (cred->x509Credential.x509ClientKeyFile) free(cred->x509Credential.x509ClientKeyFile); +- free(cred); +-} +- +-static gnutls_certificate_credentials_t +-CreateX509CertCredential(rfbCredential *cred) +-{ +- gnutls_certificate_credentials_t x509_cred; +- int ret; +- +- if (!cred->x509Credential.x509CACertFile) +- { +- rfbClientLog("No CA certificate provided.\n"); +- return NULL; +- } +- +- if ((ret = gnutls_certificate_allocate_credentials(&x509_cred)) < 0) +- { +- rfbClientLog("Cannot allocate credentials: %s.\n", gnutls_strerror(ret)); +- return NULL; +- } +- if ((ret = gnutls_certificate_set_x509_trust_file(x509_cred, +- cred->x509Credential.x509CACertFile, GNUTLS_X509_FMT_PEM)) < 0) +- { +- rfbClientLog("Cannot load CA credentials: %s.\n", gnutls_strerror(ret)); +- gnutls_certificate_free_credentials (x509_cred); +- return NULL; +- } +- if (cred->x509Credential.x509ClientCertFile && cred->x509Credential.x509ClientKeyFile) +- { +- if ((ret = gnutls_certificate_set_x509_key_file(x509_cred, +- cred->x509Credential.x509ClientCertFile, cred->x509Credential.x509ClientKeyFile, +- GNUTLS_X509_FMT_PEM)) < 0) +- { +- rfbClientLog("Cannot load client certificate or key: %s.\n", gnutls_strerror(ret)); +- gnutls_certificate_free_credentials (x509_cred); +- return NULL; +- } +- } else +- { +- rfbClientLog("No client certificate or key provided.\n"); +- } +- if (cred->x509Credential.x509CACrlFile) +- { +- if ((ret = gnutls_certificate_set_x509_crl_file(x509_cred, +- cred->x509Credential.x509CACrlFile, GNUTLS_X509_FMT_PEM)) < 0) +- { +- rfbClientLog("Cannot load CRL: %s.\n", gnutls_strerror(ret)); +- gnutls_certificate_free_credentials (x509_cred); +- return NULL; +- } +- } else +- { +- rfbClientLog("No CRL provided.\n"); +- } +- gnutls_certificate_set_dh_params (x509_cred, rfbDHParams); +- return x509_cred; +-} +- +-#endif +- +-rfbBool +-HandleAnonTLSAuth(rfbClient* client) +-{ +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- +- if (!InitializeTLS() || !InitializeTLSSession(client, TRUE)) return FALSE; +- +- if (!SetTLSAnonCredential(client)) return FALSE; +- +- if (!HandshakeTLS(client)) return FALSE; +- +- return TRUE; +- +-#else +- rfbClientLog("TLS is not supported.\n"); +- return FALSE; +-#endif +-} +- +-rfbBool +-HandleVeNCryptAuth(rfbClient* client) +-{ +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- uint8_t major, minor, status; +- uint32_t authScheme; +- rfbBool anonTLS; +- gnutls_certificate_credentials_t x509_cred = NULL; +- int ret; +- +- if (!InitializeTLS()) return FALSE; +- +- /* Read VeNCrypt version */ +- if (!ReadFromRFBServer(client, (char *)&major, 1) || +- !ReadFromRFBServer(client, (char *)&minor, 1)) +- { +- return FALSE; +- } +- rfbClientLog("Got VeNCrypt version %d.%d from server.\n", (int)major, (int)minor); +- +- if (major != 0 && minor != 2) +- { +- rfbClientLog("Unsupported VeNCrypt version.\n"); +- return FALSE; +- } +- +- if (!WriteToRFBServer(client, (char *)&major, 1) || +- !WriteToRFBServer(client, (char *)&minor, 1) || +- !ReadFromRFBServer(client, (char *)&status, 1)) +- { +- return FALSE; +- } +- +- if (status != 0) +- { +- rfbClientLog("Server refused VeNCrypt version %d.%d.\n", (int)major, (int)minor); +- return FALSE; +- } +- +- if (!ReadVeNCryptSecurityType(client, &authScheme)) return FALSE; +- if (!ReadFromRFBServer(client, (char *)&status, 1) || status != 1) +- { +- rfbClientLog("Server refused VeNCrypt authentication %d (%d).\n", authScheme, (int)status); +- return FALSE; +- } +- client->subAuthScheme = authScheme; +- +- /* Some VeNCrypt security types are anonymous TLS, others are X509 */ +- switch (authScheme) +- { +- case rfbVeNCryptTLSNone: +- case rfbVeNCryptTLSVNC: +- case rfbVeNCryptTLSPlain: +- anonTLS = TRUE; +- break; +- default: +- anonTLS = FALSE; +- break; +- } +- +- /* Get X509 Credentials if it's not anonymous */ +- if (!anonTLS) +- { +- rfbCredential *cred; +- +- if (!client->GetCredential) +- { +- rfbClientLog("GetCredential callback is not set.\n"); +- return FALSE; +- } +- cred = client->GetCredential(client, rfbCredentialTypeX509); +- if (!cred) +- { +- rfbClientLog("Reading credential failed\n"); +- return FALSE; +- } +- +- x509_cred = CreateX509CertCredential(cred); +- FreeX509Credential(cred); +- if (!x509_cred) return FALSE; +- } +- +- /* Start up the TLS session */ +- if (!InitializeTLSSession(client, anonTLS)) return FALSE; +- +- if (anonTLS) +- { +- if (!SetTLSAnonCredential(client)) return FALSE; +- } +- else +- { +- if ((ret = gnutls_credentials_set(client->tlsSession, GNUTLS_CRD_CERTIFICATE, x509_cred)) < 0) +- { +- rfbClientLog("Cannot set x509 credential: %s.\n", gnutls_strerror(ret)); +- FreeTLS(client); +- return FALSE; +- } +- } +- +- if (!HandshakeTLS(client)) return FALSE; +- +- /* TODO: validate certificate */ +- +- /* We are done here. The caller should continue with client->subAuthScheme +- * to do actual sub authentication. +- */ +- return TRUE; +- +-#else +- rfbClientLog("TLS is not supported.\n"); +- return FALSE; +-#endif +-} +- +-int +-ReadFromTLS(rfbClient* client, char *out, unsigned int n) +-{ +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- ssize_t ret; +- +- ret = gnutls_record_recv(client->tlsSession, out, n); +- if (ret >= 0) return ret; +- if (ret == GNUTLS_E_REHANDSHAKE || ret == GNUTLS_E_AGAIN) +- { +- errno = EAGAIN; +- } else +- { +- rfbClientLog("Error reading from TLS: %s.\n", gnutls_strerror(ret)); +- errno = EINTR; +- } +- return -1; +-#else +- rfbClientLog("TLS is not supported.\n"); +- errno = EINTR; +- return -1; +-#endif +-} +- +-int +-WriteToTLS(rfbClient* client, char *buf, unsigned int n) +-{ +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- unsigned int offset = 0; +- ssize_t ret; +- +- while (offset < n) +- { +- ret = gnutls_record_send(client->tlsSession, buf+offset, (size_t)(n-offset)); +- if (ret == 0) continue; +- if (ret < 0) +- { +- if (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED) continue; +- rfbClientLog("Error writing to TLS: %s.\n", gnutls_strerror(ret)); +- return -1; +- } +- offset += (unsigned int)ret; +- } +- return offset; +-#else +- rfbClientLog("TLS is not supported.\n"); +- errno = EINTR; +- return -1; +-#endif +-} +- +-void FreeTLS(rfbClient* client) +-{ +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- if (client->tlsSession) +- { +- gnutls_deinit(client->tlsSession); +- client->tlsSession = NULL; +- } +-#endif +-} +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/tls.h b/remmina-plugins/vnc/libvncserver/libvncclient/tls.h +deleted file mode 100644 +index 48d159b..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/tls.h ++++ /dev/null +@@ -1,51 +0,0 @@ +-#ifndef TLS_H +-#define TLS_H +- +-/* +- * Copyright (C) 2009 Vic Lee. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* Handle Anonymous TLS Authentication (18) with the server. +- * After authentication, client->tlsSession will be set. +- */ +-rfbBool HandleAnonTLSAuth(rfbClient* client); +- +-/* Handle VeNCrypt Authentication (19) with the server. +- * The callback function GetX509Credential will be called. +- * After authentication, client->tlsSession will be set. +- */ +-rfbBool HandleVeNCryptAuth(rfbClient* client); +- +-/* Read desired bytes from TLS session. +- * It's a wrapper function over gnutls_record_recv() and return values +- * are same as read(), that is, >0 for actual bytes read, 0 for EOF, +- * or EAGAIN, EINTR. +- * This should be a non-blocking call. Blocking is handled in sockets.c. +- */ +-int ReadFromTLS(rfbClient* client, char *out, unsigned int n); +- +-/* Write desired bytes to TLS session. +- * It's a wrapper function over gnutls_record_send() and it will be +- * blocking call, until all bytes are written or error returned. +- */ +-int WriteToTLS(rfbClient* client, char *buf, unsigned int n); +- +-/* Free TLS resources */ +-void FreeTLS(rfbClient* client); +- +-#endif /* TLS_H */ +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/ultra.c b/remmina-plugins/vnc/libvncserver/libvncclient/ultra.c +deleted file mode 100644 +index dac89b5..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/ultra.c ++++ /dev/null +@@ -1,210 +0,0 @@ +-/* +- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* +- * ultrazip.c - handle ultrazip encoding. +- * +- * This file shouldn't be compiled directly. It is included multiple times by +- * rfbproto.c, each time with a different definition of the macro BPP. For +- * each value of BPP, this file defines a function which handles an zlib +- * encoded rectangle with BPP bits per pixel. +- */ +- +-#define HandleUltraZipBPP CONCAT2E(HandleUltraZip,BPP) +-#define HandleUltraBPP CONCAT2E(HandleUltra,BPP) +-#define CARDBPP CONCAT3E(uint,BPP,_t) +- +-static rfbBool +-HandleUltraBPP (rfbClient* client, int rx, int ry, int rw, int rh) +-{ +- rfbZlibHeader hdr; +- int toRead=0; +- int inflateResult=0; +- lzo_uint uncompressedBytes = (( rw * rh ) * ( BPP / 8 )); +- +- if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbZlibHeader)) +- return FALSE; +- +- toRead = rfbClientSwap32IfLE(hdr.nBytes); +- if (toRead==0) return TRUE; +- +- if (uncompressedBytes==0) +- { +- rfbClientLog("ultra error: rectangle has 0 uncomressed bytes ((%dw * %dh) * (%d / 8))\n", rw, rh, BPP); +- return FALSE; +- } +- +- /* First make sure we have a large enough raw buffer to hold the +- * decompressed data. In practice, with a fixed BPP, fixed frame +- * buffer size and the first update containing the entire frame +- * buffer, this buffer allocation should only happen once, on the +- * first update. +- */ +- if ( client->raw_buffer_size < (int)uncompressedBytes) { +- if ( client->raw_buffer != NULL ) { +- free( client->raw_buffer ); +- } +- client->raw_buffer_size = uncompressedBytes; +- /* buffer needs to be aligned on 4-byte boundaries */ +- if ((client->raw_buffer_size % 4)!=0) +- client->raw_buffer_size += (4-(client->raw_buffer_size % 4)); +- client->raw_buffer = (char*) malloc( client->raw_buffer_size ); +- } +- +- /* allocate enough space to store the incoming compressed packet */ +- if ( client->ultra_buffer_size < toRead ) { +- if ( client->ultra_buffer != NULL ) { +- free( client->ultra_buffer ); +- } +- client->ultra_buffer_size = toRead; +- /* buffer needs to be aligned on 4-byte boundaries */ +- if ((client->ultra_buffer_size % 4)!=0) +- client->ultra_buffer_size += (4-(client->ultra_buffer_size % 4)); +- client->ultra_buffer = (char*) malloc( client->ultra_buffer_size ); +- } +- +- /* Fill the buffer, obtaining data from the server. */ +- if (!ReadFromRFBServer(client, client->ultra_buffer, toRead)) +- return FALSE; +- +- /* uncompress the data */ +- uncompressedBytes = client->raw_buffer_size; +- inflateResult = lzo1x_decompress( +- (lzo_byte *)client->ultra_buffer, toRead, +- (lzo_byte *)client->raw_buffer, (lzo_uintp) &uncompressedBytes, +- NULL); +- +- +- if ((rw * rh * (BPP / 8)) != uncompressedBytes) +- rfbClientLog("Ultra decompressed too little (%d < %d)", (rw * rh * (BPP / 8)), uncompressedBytes); +- +- /* Put the uncompressed contents of the update on the screen. */ +- if ( inflateResult == LZO_E_OK ) +- { +- CopyRectangle(client, (unsigned char *)client->raw_buffer, rx, ry, rw, rh); +- } +- else +- { +- rfbClientLog("ultra decompress returned error: %d\n", +- inflateResult); +- return FALSE; +- } +- return TRUE; +-} +- +- +-/* UltraZip is like rre in that it is composed of subrects */ +-static rfbBool +-HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh) +-{ +- rfbZlibHeader hdr; +- int i=0; +- int toRead=0; +- int inflateResult=0; +- unsigned char *ptr=NULL; +- lzo_uint uncompressedBytes = ry + (rw * 65535); +- unsigned int numCacheRects = rx; +- +- if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbZlibHeader)) +- return FALSE; +- +- toRead = rfbClientSwap32IfLE(hdr.nBytes); +- +- if (toRead==0) return TRUE; +- +- if (uncompressedBytes==0) +- { +- rfbClientLog("ultrazip error: rectangle has 0 uncomressed bytes (%dy + (%dw * 65535)) (%d rectangles)\n", ry, rw, rx); +- return FALSE; +- } +- +- /* First make sure we have a large enough raw buffer to hold the +- * decompressed data. In practice, with a fixed BPP, fixed frame +- * buffer size and the first update containing the entire frame +- * buffer, this buffer allocation should only happen once, on the +- * first update. +- */ +- if ( client->raw_buffer_size < (int)(uncompressedBytes + 500)) { +- if ( client->raw_buffer != NULL ) { +- free( client->raw_buffer ); +- } +- client->raw_buffer_size = uncompressedBytes + 500; +- /* buffer needs to be aligned on 4-byte boundaries */ +- if ((client->raw_buffer_size % 4)!=0) +- client->raw_buffer_size += (4-(client->raw_buffer_size % 4)); +- client->raw_buffer = (char*) malloc( client->raw_buffer_size ); +- } +- +- +- /* allocate enough space to store the incoming compressed packet */ +- if ( client->ultra_buffer_size < toRead ) { +- if ( client->ultra_buffer != NULL ) { +- free( client->ultra_buffer ); +- } +- client->ultra_buffer_size = toRead; +- client->ultra_buffer = (char*) malloc( client->ultra_buffer_size ); +- } +- +- /* Fill the buffer, obtaining data from the server. */ +- if (!ReadFromRFBServer(client, client->ultra_buffer, toRead)) +- return FALSE; +- +- /* uncompress the data */ +- uncompressedBytes = client->raw_buffer_size; +- inflateResult = lzo1x_decompress( +- (lzo_byte *)client->ultra_buffer, toRead, +- (lzo_byte *)client->raw_buffer, &uncompressedBytes, NULL); +- if ( inflateResult != LZO_E_OK ) +- { +- rfbClientLog("ultra decompress returned error: %d\n", +- inflateResult); +- return FALSE; +- } +- +- /* Put the uncompressed contents of the update on the screen. */ +- ptr = (unsigned char *)client->raw_buffer; +- for (i=0; i +-#include +-#include +-#include +-#include +-#include "tls.h" +- +-static void Dummy(rfbClient* client) { +-} +-static rfbBool DummyPoint(rfbClient* client, int x, int y) { +- return TRUE; +-} +-static void DummyRect(rfbClient* client, int x, int y, int w, int h) { +-} +- +-#ifdef __MINGW32__ +-static char* NoPassword(rfbClient* client) { +- return strdup(""); +-} +-#undef SOCKET +-#include +-#define close closesocket +-#else +-#include +-#include +-#endif +- +-static char* ReadPassword(rfbClient* client) { +-#ifdef __MINGW32__ +- /* FIXME */ +- rfbClientErr("ReadPassword on MinGW32 NOT IMPLEMENTED\n"); +- return NoPassword(client); +-#else +- int i; +- char* p=malloc(9); +- struct termios save,noecho; +- p[0]=0; +- if(tcgetattr(fileno(stdin),&save)!=0) return p; +- noecho=save; noecho.c_lflag &= ~ECHO; +- if(tcsetattr(fileno(stdin),TCSAFLUSH,&noecho)!=0) return p; +- fprintf(stderr,"Password: "); +- i=0; +- while(1) { +- int c=fgetc(stdin); +- if(c=='\n') +- break; +- if(i<8) { +- p[i]=c; +- i++; +- p[i]=0; +- } +- } +- tcsetattr(fileno(stdin),TCSAFLUSH,&save); +- return p; +-#endif +-} +-static rfbBool MallocFrameBuffer(rfbClient* client) { +- if(client->frameBuffer) +- free(client->frameBuffer); +- client->frameBuffer=malloc(client->width*client->height*client->format.bitsPerPixel/8); +- return client->frameBuffer?TRUE:FALSE; +-} +- +-static void initAppData(AppData* data) { +- data->shareDesktop=TRUE; +- data->viewOnly=FALSE; +- data->encodingsString="tight zrle ultra copyrect hextile zlib corre rre raw"; +- data->useBGR233=FALSE; +- data->nColours=0; +- data->forceOwnCmap=FALSE; +- data->forceTrueColour=FALSE; +- data->requestedDepth=0; +- data->compressLevel=3; +- data->qualityLevel=5; +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +- data->enableJPEG=TRUE; +-#else +- data->enableJPEG=FALSE; +-#endif +- data->useRemoteCursor=FALSE; +-} +- +-rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel, +- int bytesPerPixel) { +- rfbClient* client=(rfbClient*)calloc(sizeof(rfbClient),1); +- if(!client) { +- rfbClientErr("Couldn't allocate client structure!\n"); +- return NULL; +- } +- initAppData(&client->appData); +- client->endianTest = 1; +- client->programName=""; +- client->serverHost=strdup(""); +- client->serverPort=5900; +- +- client->destHost = NULL; +- client->destPort = 5900; +- +- client->CurrentKeyboardLedState = 0; +- client->HandleKeyboardLedState = (HandleKeyboardLedStateProc)DummyPoint; +- +- /* default: use complete frame buffer */ +- client->updateRect.x = -1; +- +- client->format.bitsPerPixel = bytesPerPixel*8; +- client->format.depth = bitsPerSample*samplesPerPixel; +- client->appData.requestedDepth=client->format.depth; +- client->format.bigEndian = *(char *)&client->endianTest?FALSE:TRUE; +- client->format.trueColour = TRUE; +- +- if (client->format.bitsPerPixel == 8) { +- client->format.redMax = 7; +- client->format.greenMax = 7; +- client->format.blueMax = 3; +- client->format.redShift = 0; +- client->format.greenShift = 3; +- client->format.blueShift = 6; +- } else { +- client->format.redMax = (1 << bitsPerSample) - 1; +- client->format.greenMax = (1 << bitsPerSample) - 1; +- client->format.blueMax = (1 << bitsPerSample) - 1; +- if(!client->format.bigEndian) { +- client->format.redShift = 0; +- client->format.greenShift = bitsPerSample; +- client->format.blueShift = bitsPerSample * 2; +- } else { +- if(client->format.bitsPerPixel==8*3) { +- client->format.redShift = bitsPerSample*2; +- client->format.greenShift = bitsPerSample*1; +- client->format.blueShift = 0; +- } else { +- client->format.redShift = bitsPerSample*3; +- client->format.greenShift = bitsPerSample*2; +- client->format.blueShift = bitsPerSample; +- } +- } +- } +- +- client->bufoutptr=client->buf; +- client->buffered=0; +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- client->raw_buffer_size = -1; +- client->decompStreamInited = FALSE; +- +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +- memset(client->zlibStreamActive,0,sizeof(rfbBool)*4); +- client->jpegSrcManager = NULL; +-#endif +-#endif +- +- client->HandleCursorPos = DummyPoint; +- client->SoftCursorLockArea = DummyRect; +- client->SoftCursorUnlockScreen = Dummy; +- client->GotFrameBufferUpdate = DummyRect; +- client->FinishedFrameBufferUpdate = NULL; +- client->GetPassword = ReadPassword; +- client->MallocFrameBuffer = MallocFrameBuffer; +- client->Bell = Dummy; +- client->CurrentKeyboardLedState = 0; +- client->HandleKeyboardLedState = (HandleKeyboardLedStateProc)DummyPoint; +- client->QoS_DSCP = 0; +- +- client->authScheme = 0; +- client->subAuthScheme = 0; +- client->GetCredential = NULL; +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- client->tlsSession = NULL; +-#endif +- client->sock = -1; +- client->listenSock = -1; +- client->clientAuthSchemes = NULL; +- return client; +-} +- +-static rfbBool rfbInitConnection(rfbClient* client) +-{ +- /* Unless we accepted an incoming connection, make a TCP connection to the +- given VNC server */ +- +- if (!client->listenSpecified) { +- if (!client->serverHost) +- return FALSE; +- if (client->destHost) { +- if (!ConnectToRFBRepeater(client,client->serverHost,client->serverPort,client->destHost,client->destPort)) +- return FALSE; +- } else { +- if (!ConnectToRFBServer(client,client->serverHost,client->serverPort)) +- return FALSE; +- } +- } +- +- /* Initialise the VNC connection, including reading the password */ +- +- if (!InitialiseRFBConnection(client)) +- return FALSE; +- +- client->width=client->si.framebufferWidth; +- client->height=client->si.framebufferHeight; +- client->MallocFrameBuffer(client); +- +- if (!SetFormatAndEncodings(client)) +- return FALSE; +- +- if (client->updateRect.x < 0) { +- client->updateRect.x = client->updateRect.y = 0; +- client->updateRect.w = client->width; +- client->updateRect.h = client->height; +- } +- +- if (client->appData.scaleSetting>1) +- { +- if (!SendScaleSetting(client, client->appData.scaleSetting)) +- return FALSE; +- if (!SendFramebufferUpdateRequest(client, +- client->updateRect.x / client->appData.scaleSetting, +- client->updateRect.y / client->appData.scaleSetting, +- client->updateRect.w / client->appData.scaleSetting, +- client->updateRect.h / client->appData.scaleSetting, +- FALSE)) +- return FALSE; +- } +- else +- { +- if (!SendFramebufferUpdateRequest(client, +- client->updateRect.x, client->updateRect.y, +- client->updateRect.w, client->updateRect.h, +- FALSE)) +- return FALSE; +- } +- +- return TRUE; +-} +- +-rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) { +- int i,j; +- +- if(argv && argc && *argc) { +- if(client->programName==0) +- client->programName=argv[0]; +- +- for (i = 1; i < *argc; i++) { +- j = i; +- if (strcmp(argv[i], "-listen") == 0) { +- listenForIncomingConnections(client); +- break; +- } else if (strcmp(argv[i], "-listennofork") == 0) { +- listenForIncomingConnectionsNoFork(client, -1); +- break; +- } else if (strcmp(argv[i], "-play") == 0) { +- client->serverPort = -1; +- j++; +- } else if (i+1<*argc && strcmp(argv[i], "-encodings") == 0) { +- client->appData.encodingsString = argv[i+1]; +- j+=2; +- } else if (i+1<*argc && strcmp(argv[i], "-compress") == 0) { +- client->appData.compressLevel = atoi(argv[i+1]); +- j+=2; +- } else if (i+1<*argc && strcmp(argv[i], "-quality") == 0) { +- client->appData.qualityLevel = atoi(argv[i+1]); +- j+=2; +- } else if (i+1<*argc && strcmp(argv[i], "-scale") == 0) { +- client->appData.scaleSetting = atoi(argv[i+1]); +- j+=2; +- } else if (i+1<*argc && strcmp(argv[i], "-qosdscp") == 0) { +- client->QoS_DSCP = atoi(argv[i+1]); +- j+=2; +- } else if (i+1<*argc && strcmp(argv[i], "-repeaterdest") == 0) { +- char* colon=strchr(argv[i+1],':'); +- +- if(client->destHost) +- free(client->destHost); +- client->destPort = 5900; +- +- client->destHost = strdup(argv[i+1]); +- if(colon) { +- client->destHost[(int)(colon-argv[i+1])] = '\0'; +- client->destPort = atoi(colon+1); +- } +- j+=2; +- } else { +- char* colon=strchr(argv[i],':'); +- +- if(client->serverHost) +- free(client->serverHost); +- +- if(colon) { +- client->serverHost = strdup(argv[i]); +- client->serverHost[(int)(colon-argv[i])] = '\0'; +- client->serverPort = atoi(colon+1); +- } else { +- client->serverHost = strdup(argv[i]); +- } +- if(client->serverPort >= 0 && client->serverPort < 5900) +- client->serverPort += 5900; +- } +- /* purge arguments */ +- if (j>i) { +- *argc-=j-i; +- memmove(argv+i,argv+j,(*argc-i)*sizeof(char*)); +- i--; +- } +- } +- } +- +- if(!rfbInitConnection(client)) { +- rfbClientCleanup(client); +- return FALSE; +- } +- +- return TRUE; +-} +- +-void rfbClientCleanup(rfbClient* client) { +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +- int i; +- +- for ( i = 0; i < 4; i++ ) { +- if (client->zlibStreamActive[i] == TRUE ) { +- if (inflateEnd (&client->zlibStream[i]) != Z_OK && +- client->zlibStream[i].msg != NULL) +- rfbClientLog("inflateEnd: %s\n", client->zlibStream[i].msg); +- } +- } +- +- if ( client->decompStreamInited == TRUE ) { +- if (inflateEnd (&client->decompStream) != Z_OK && +- client->decompStream.msg != NULL) +- rfbClientLog("inflateEnd: %s\n", client->decompStream.msg ); +- } +- +- if (client->jpegSrcManager) +- free(client->jpegSrcManager); +-#endif +-#endif +- +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- FreeTLS(client); +-#endif +- if (client->sock >= 0) +- close(client->sock); +- if (client->listenSock >= 0) +- close(client->listenSock); +- free(client->desktopName); +- free(client->serverHost); +- if (client->destHost) +- free(client->destHost); +- if (client->clientAuthSchemes) +- free(client->clientAuthSchemes); +- free(client); +-} +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/zlib.c b/remmina-plugins/vnc/libvncserver/libvncclient/zlib.c +deleted file mode 100644 +index e872d40..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/zlib.c ++++ /dev/null +@@ -1,162 +0,0 @@ +-/* +- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- +-/* +- * zlib.c - handle zlib encoding. +- * +- * This file shouldn't be compiled directly. It is included multiple times by +- * rfbproto.c, each time with a different definition of the macro BPP. For +- * each value of BPP, this file defines a function which handles an zlib +- * encoded rectangle with BPP bits per pixel. +- */ +- +-#define HandleZlibBPP CONCAT2E(HandleZlib,BPP) +-#define CARDBPP CONCAT3E(uint,BPP,_t) +- +-static rfbBool +-HandleZlibBPP (rfbClient* client, int rx, int ry, int rw, int rh) +-{ +- rfbZlibHeader hdr; +- int remaining; +- int inflateResult; +- int toRead; +- +- /* First make sure we have a large enough raw buffer to hold the +- * decompressed data. In practice, with a fixed BPP, fixed frame +- * buffer size and the first update containing the entire frame +- * buffer, this buffer allocation should only happen once, on the +- * first update. +- */ +- if ( client->raw_buffer_size < (( rw * rh ) * ( BPP / 8 ))) { +- +- if ( client->raw_buffer != NULL ) { +- +- free( client->raw_buffer ); +- +- } +- +- client->raw_buffer_size = (( rw * rh ) * ( BPP / 8 )); +- client->raw_buffer = (char*) malloc( client->raw_buffer_size ); +- +- } +- +- if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbZlibHeader)) +- return FALSE; +- +- remaining = rfbClientSwap32IfLE(hdr.nBytes); +- +- /* Need to initialize the decompressor state. */ +- client->decompStream.next_in = ( Bytef * )client->buffer; +- client->decompStream.avail_in = 0; +- client->decompStream.next_out = ( Bytef * )client->raw_buffer; +- client->decompStream.avail_out = client->raw_buffer_size; +- client->decompStream.data_type = Z_BINARY; +- +- /* Initialize the decompression stream structures on the first invocation. */ +- if ( client->decompStreamInited == FALSE ) { +- +- inflateResult = inflateInit( &client->decompStream ); +- +- if ( inflateResult != Z_OK ) { +- rfbClientLog( +- "inflateInit returned error: %d, msg: %s\n", +- inflateResult, +- client->decompStream.msg); +- return FALSE; +- } +- +- client->decompStreamInited = TRUE; +- +- } +- +- inflateResult = Z_OK; +- +- /* Process buffer full of data until no more to process, or +- * some type of inflater error, or Z_STREAM_END. +- */ +- while (( remaining > 0 ) && +- ( inflateResult == Z_OK )) { +- +- if ( remaining > RFB_BUFFER_SIZE ) { +- toRead = RFB_BUFFER_SIZE; +- } +- else { +- toRead = remaining; +- } +- +- /* Fill the buffer, obtaining data from the server. */ +- if (!ReadFromRFBServer(client, client->buffer,toRead)) +- return FALSE; +- +- client->decompStream.next_in = ( Bytef * )client->buffer; +- client->decompStream.avail_in = toRead; +- +- /* Need to uncompress buffer full. */ +- inflateResult = inflate( &client->decompStream, Z_SYNC_FLUSH ); +- +- /* We never supply a dictionary for compression. */ +- if ( inflateResult == Z_NEED_DICT ) { +- rfbClientLog("zlib inflate needs a dictionary!\n"); +- return FALSE; +- } +- if ( inflateResult < 0 ) { +- rfbClientLog( +- "zlib inflate returned error: %d, msg: %s\n", +- inflateResult, +- client->decompStream.msg); +- return FALSE; +- } +- +- /* Result buffer allocated to be at least large enough. We should +- * never run out of space! +- */ +- if (( client->decompStream.avail_in > 0 ) && +- ( client->decompStream.avail_out <= 0 )) { +- rfbClientLog("zlib inflate ran out of space!\n"); +- return FALSE; +- } +- +- remaining -= toRead; +- +- } /* while ( remaining > 0 ) */ +- +- if ( inflateResult == Z_OK ) { +- +- /* Put the uncompressed contents of the update on the screen. */ +- CopyRectangle(client, (uint8_t *)client->raw_buffer, rx, ry, rw, rh); +- } +- else { +- +- rfbClientLog( +- "zlib inflate returned error: %d, msg: %s\n", +- inflateResult, +- client->decompStream.msg); +- return FALSE; +- +- } +- +- return TRUE; +-} +- +-#undef CARDBPP +- +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/zrle.c b/remmina-plugins/vnc/libvncserver/libvncclient/zrle.c +deleted file mode 100644 +index a14ad44..0000000 +--- a/remmina-plugins/vnc/libvncserver/libvncclient/zrle.c ++++ /dev/null +@@ -1,427 +0,0 @@ +-/* +- * Copyright (C) 2005 Johannes E. Schindelin. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- +-/* +- * zrle.c - handle zrle encoding. +- * +- * This file shouldn't be compiled directly. It is included multiple times by +- * rfbproto.c, each time with a different definition of the macro BPP. For +- * each value of BPP, this file defines a function which handles an zrle +- * encoded rectangle with BPP bits per pixel. +- */ +- +-#ifndef REALBPP +-#define REALBPP BPP +-#endif +- +-#if !defined(UNCOMP) || UNCOMP==0 +-#define HandleZRLE CONCAT2E(HandleZRLE,REALBPP) +-#define HandleZRLETile CONCAT2E(HandleZRLETile,REALBPP) +-#elif UNCOMP>0 +-#define HandleZRLE CONCAT3E(HandleZRLE,REALBPP,Down) +-#define HandleZRLETile CONCAT3E(HandleZRLETile,REALBPP,Down) +-#else +-#define HandleZRLE CONCAT3E(HandleZRLE,REALBPP,Up) +-#define HandleZRLETile CONCAT3E(HandleZRLETile,REALBPP,Up) +-#endif +-#define CARDBPP CONCAT3E(uint,BPP,_t) +-#define CARDREALBPP CONCAT3E(uint,REALBPP,_t) +- +-#define ENDIAN_LITTLE 0 +-#define ENDIAN_BIG 1 +-#define ENDIAN_NO 2 +-#define ZYWRLE_ENDIAN ENDIAN_LITTLE +-#undef END_FIX +-#if ZYWRLE_ENDIAN == ENDIAN_LITTLE +-# define END_FIX LE +-#elif ZYWRLE_ENDIAN == ENDIAN_BIG +-# define END_FIX BE +-#else +-# define END_FIX NE +-#endif +-#define __RFB_CONCAT3E(a,b,c) CONCAT3E(a,b,c) +-#define __RFB_CONCAT2E(a,b) CONCAT2E(a,b) +-#undef CPIXEL +-#if REALBPP != BPP +-#if UNCOMP == 0 +-#define CPIXEL REALBPP +-#elif UNCOMP>0 +-#define CPIXEL CONCAT2E(REALBPP,Down) +-#else +-#define CPIXEL CONCAT2E(REALBPP,Up) +-#endif +-#endif +-#define PIXEL_T __RFB_CONCAT3E(uint,BPP,_t) +-#if BPP!=8 +-#define ZYWRLE_DECODE 1 +-#include "zywrletemplate.c" +-#endif +-#undef CPIXEL +- +-static int HandleZRLETile(rfbClient* client, +- uint8_t* buffer,size_t buffer_length, +- int x,int y,int w,int h); +- +-static rfbBool +-HandleZRLE (rfbClient* client, int rx, int ry, int rw, int rh) +-{ +- rfbZRLEHeader header; +- int remaining; +- int inflateResult; +- int toRead; +- int min_buffer_size = rw * rh * (REALBPP / 8) * 2; +- +- /* First make sure we have a large enough raw buffer to hold the +- * decompressed data. In practice, with a fixed REALBPP, fixed frame +- * buffer size and the first update containing the entire frame +- * buffer, this buffer allocation should only happen once, on the +- * first update. +- */ +- if ( client->raw_buffer_size < min_buffer_size) { +- +- if ( client->raw_buffer != NULL ) { +- +- free( client->raw_buffer ); +- +- } +- +- client->raw_buffer_size = min_buffer_size; +- client->raw_buffer = (char*) malloc( client->raw_buffer_size ); +- +- } +- +- if (!ReadFromRFBServer(client, (char *)&header, sz_rfbZRLEHeader)) +- return FALSE; +- +- remaining = rfbClientSwap32IfLE(header.length); +- +- /* Need to initialize the decompressor state. */ +- client->decompStream.next_in = ( Bytef * )client->buffer; +- client->decompStream.avail_in = 0; +- client->decompStream.next_out = ( Bytef * )client->raw_buffer; +- client->decompStream.avail_out = client->raw_buffer_size; +- client->decompStream.data_type = Z_BINARY; +- +- /* Initialize the decompression stream structures on the first invocation. */ +- if ( client->decompStreamInited == FALSE ) { +- +- inflateResult = inflateInit( &client->decompStream ); +- +- if ( inflateResult != Z_OK ) { +- rfbClientLog( +- "inflateInit returned error: %d, msg: %s\n", +- inflateResult, +- client->decompStream.msg); +- return FALSE; +- } +- +- client->decompStreamInited = TRUE; +- +- } +- +- inflateResult = Z_OK; +- +- /* Process buffer full of data until no more to process, or +- * some type of inflater error, or Z_STREAM_END. +- */ +- while (( remaining > 0 ) && +- ( inflateResult == Z_OK )) { +- +- if ( remaining > RFB_BUFFER_SIZE ) { +- toRead = RFB_BUFFER_SIZE; +- } +- else { +- toRead = remaining; +- } +- +- /* Fill the buffer, obtaining data from the server. */ +- if (!ReadFromRFBServer(client, client->buffer,toRead)) +- return FALSE; +- +- client->decompStream.next_in = ( Bytef * )client->buffer; +- client->decompStream.avail_in = toRead; +- +- /* Need to uncompress buffer full. */ +- inflateResult = inflate( &client->decompStream, Z_SYNC_FLUSH ); +- +- /* We never supply a dictionary for compression. */ +- if ( inflateResult == Z_NEED_DICT ) { +- rfbClientLog("zlib inflate needs a dictionary!\n"); +- return FALSE; +- } +- if ( inflateResult < 0 ) { +- rfbClientLog( +- "zlib inflate returned error: %d, msg: %s\n", +- inflateResult, +- client->decompStream.msg); +- return FALSE; +- } +- +- /* Result buffer allocated to be at least large enough. We should +- * never run out of space! +- */ +- if (( client->decompStream.avail_in > 0 ) && +- ( client->decompStream.avail_out <= 0 )) { +- rfbClientLog("zlib inflate ran out of space!\n"); +- return FALSE; +- } +- +- remaining -= toRead; +- +- } /* while ( remaining > 0 ) */ +- +- if ( inflateResult == Z_OK ) { +- void* buf=client->raw_buffer; +- int i,j; +- +- remaining = client->raw_buffer_size-client->decompStream.avail_out; +- +- for(j=0; jrw)?rw-i:rfbZRLETileWidth; +- int subHeight=(j+rfbZRLETileHeight>rh)?rh-j:rfbZRLETileHeight; +- int result=HandleZRLETile(client,buf,remaining,rx+i,ry+j,subWidth,subHeight); +- +- if(result<0) { +- rfbClientLog("ZRLE decoding failed (%d)\n",result); +-return TRUE; +- return FALSE; +- } +- +- buf+=result; +- remaining-=result; +- } +- } +- else { +- +- rfbClientLog( +- "zlib inflate returned error: %d, msg: %s\n", +- inflateResult, +- client->decompStream.msg); +- return FALSE; +- +- } +- +- return TRUE; +-} +- +-#if REALBPP!=BPP && defined(UNCOMP) && UNCOMP!=0 +-#if UNCOMP>0 +-#define UncompressCPixel(pointer) ((*(CARDBPP*)pointer)>>UNCOMP) +-#else +-#define UncompressCPixel(pointer) ((*(CARDBPP*)pointer)<<(-(UNCOMP))) +-#endif +-#else +-#define UncompressCPixel(pointer) (*(CARDBPP*)pointer) +-#endif +- +-static int HandleZRLETile(rfbClient* client, +- uint8_t* buffer,size_t buffer_length, +- int x,int y,int w,int h) { +- uint8_t* buffer_copy = buffer; +- uint8_t* buffer_end = buffer+buffer_length; +- uint8_t type; +-#if BPP!=8 +- uint8_t zywrle_level = (client->appData.qualityLevel & 0x80) ? +- 0 : (3 - client->appData.qualityLevel / 3); +-#endif +- +- if(buffer_length<1) +- return -2; +- +- type = *buffer; +- buffer++; +- { +- if( type == 0 ) /* raw */ +-#if BPP!=8 +- if( zywrle_level > 0 ){ +- CARDBPP* pFrame = (CARDBPP*)client->frameBuffer + y*client->width+x; +- int ret; +- client->appData.qualityLevel |= 0x80; +- ret = HandleZRLETile(client, buffer, buffer_end-buffer, x, y, w, h); +- client->appData.qualityLevel &= 0x7F; +- if( ret < 0 ){ +- return ret; +- } +- ZYWRLE_SYNTHESIZE( pFrame, pFrame, w, h, client->width, zywrle_level, (int*)client->zlib_buffer ); +- buffer += ret; +- }else +-#endif +- { +-#if REALBPP!=BPP +- int i,j; +- +- if(1+w*h*REALBPP/8>buffer_length) { +- rfbClientLog("expected %d bytes, got only %d (%dx%d)\n",1+w*h*REALBPP/8,buffer_length,w,h); +- return -3; +- } +- +- for(j=y*client->width; j<(y+h)*client->width; j+=client->width) +- for(i=x; iframeBuffer)[j+i] = UncompressCPixel(buffer); +-#else +- CopyRectangle(client, buffer, x, y, w, h); +- buffer+=w*h*REALBPP/8; +-#endif +- } +- else if( type == 1 ) /* solid */ +- { +- CARDBPP color = UncompressCPixel(buffer); +- +- if(1+REALBPP/8>buffer_length) +- return -4; +- +- FillRectangle(client, x, y, w, h, color); +- +- buffer+=REALBPP/8; +- +- } +- else if( (type >= 2)&&(type <= 127) ) /* packed Palette */ +- { +- CARDBPP palette[16]; +- int i,j,shift, +- bpp=(type>4?(type>16?8:4):(type>2?2:1)), +- mask=(1<buffer_length) +- return -5; +- +- /* read palette */ +- for(i=0; iwidth; j<(y+h)*client->width; j+=client->width) { +- for(i=x,shift=8-bpp; iframeBuffer)[j+i] = palette[((*buffer)>>shift)&mask]; +- shift-=bpp; +- if(shift<0) { +- shift=8-bpp; +- buffer++; +- } +- } +- if(shift<8-bpp) +- buffer++; +- } +- +- } +- /* case 17 ... 127: not used, but valid */ +- else if( type == 128 ) /* plain RLE */ +- { +- int i=0,j=0; +- while(jbuffer_end) +- return -7; +- color = UncompressCPixel(buffer); +- buffer+=REALBPP/8; +- /* read run length */ +- length=1; +- while(*buffer==0xff) { +- if(buffer+1>=buffer_end) +- return -8; +- length+=*buffer; +- buffer++; +- } +- length+=*buffer; +- buffer++; +- while(j0) { +- ((CARDBPP*)client->frameBuffer)[(y+j)*client->width+x+i] = color; +- length--; +- i++; +- if(i>=w) { +- i=0; +- j++; +- } +- } +- if(length>0) +- rfbClientLog("Warning: possible ZRLE corruption\n"); +- } +- +- } +- else if( type == 129 ) /* unused */ +- { +- return -8; +- } +- else if( type >= 130 ) /* palette RLE */ +- { +- CARDBPP palette[128]; +- int i,j; +- +- if(2+(type-128)*REALBPP/8>buffer_length) +- return -9; +- +- /* read palette */ +- for(i=0; i=buffer_end) +- return -10; +- color = palette[(*buffer)&0x7f]; +- length=1; +- if(*buffer&0x80) { +- if(buffer+1>=buffer_end) +- return -11; +- buffer++; +- /* read run length */ +- while(*buffer==0xff) { +- if(buffer+1>=buffer_end) +- return -8; +- length+=*buffer; +- buffer++; +- } +- length+=*buffer; +- } +- buffer++; +- while(j0) { +- ((CARDBPP*)client->frameBuffer)[(y+j)*client->width+x+i] = color; +- length--; +- i++; +- if(i>=w) { +- i=0; +- j++; +- } +- } +- if(length>0) +- rfbClientLog("Warning: possible ZRLE corruption\n"); +- } +- } +- } +- +- return buffer-buffer_copy; +-} +- +-#undef CARDBPP +-#undef CARDREALBPP +-#undef HandleZRLE +-#undef HandleZRLETile +-#undef UncompressCPixel +-#undef REALBPP +- +-#endif +- +-#undef UNCOMP +diff --git a/remmina-plugins/vnc/libvncserver/rfb/default8x16.h b/remmina-plugins/vnc/libvncserver/rfb/default8x16.h +deleted file mode 100644 +index 252f411..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfb/default8x16.h ++++ /dev/null +@@ -1,261 +0,0 @@ +-static unsigned char default8x16FontData[4096+1]={ +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7e,0x81,0xa5,0x81,0x81,0xbd,0x99,0x81,0x81,0x7e,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7e,0xff,0xdb,0xff,0xff,0xc3,0xe7,0xff,0xff,0x7e,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x6c,0xfe,0xfe,0xfe,0xfe,0x7c,0x38,0x10,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x18,0x3c,0x3c,0xe7,0xe7,0xe7,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x18,0x3c,0x7e,0xff,0xff,0x7e,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00,0x00,0x00,0x00,0x00, +-0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff,0xff,0xff,0xff,0xff, +-0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00,0x00,0x00,0x00,0x00, +-0xff,0xff,0xff,0xff,0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff,0xff,0xff,0xff,0xff, +-0x00,0x00,0x1e,0x0e,0x1a,0x32,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00, +-0x00,0x00,0x3c,0x66,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0x3f,0x33,0x3f,0x30,0x30,0x30,0x30,0x70,0xf0,0xe0,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7f,0x63,0x7f,0x63,0x63,0x63,0x63,0x67,0xe7,0xe6,0xc0,0x00,0x00,0x00, +-0x00,0x00,0x00,0x18,0x18,0xdb,0x3c,0xe7,0x3c,0xdb,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfe,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00, +-0x00,0x02,0x06,0x0e,0x1e,0x3e,0xfe,0x3e,0x1e,0x0e,0x06,0x02,0x00,0x00,0x00,0x00, +-0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x66,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7f,0xdb,0xdb,0xdb,0x7b,0x1b,0x1b,0x1b,0x1b,0x1b,0x00,0x00,0x00,0x00, +-0x00,0x7c,0xc6,0x60,0x38,0x6c,0xc6,0xc6,0x6c,0x38,0x0c,0xc6,0x7c,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0xfe,0xfe,0x00,0x00,0x00,0x00, +-0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x7e,0x00,0x00,0x00,0x00, +-0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x18,0x0c,0xfe,0x0c,0x18,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x30,0x60,0xfe,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xfe,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x24,0x66,0xff,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7c,0x7c,0xfe,0xfe,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0xfe,0xfe,0x7c,0x7c,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x18,0x3c,0x3c,0x3c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,0x00,0x00, +-0x18,0x18,0x7c,0xc6,0xc2,0xc0,0x7c,0x06,0x06,0x86,0xc6,0x7c,0x18,0x18,0x00,0x00, +-0x00,0x00,0x00,0x00,0xc2,0xc6,0x0c,0x18,0x30,0x60,0xc6,0x86,0x00,0x00,0x00,0x00, +-0x00,0x00,0x38,0x6c,0x6c,0x38,0x76,0xdc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0xc6,0xce,0xde,0xf6,0xe6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0x06,0x0c,0x18,0x30,0x60,0xc0,0xc6,0xfe,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0x06,0x06,0x3c,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x0c,0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x0c,0x0c,0x1e,0x00,0x00,0x00,0x00, +-0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xfc,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x38,0x60,0xc0,0xc0,0xfc,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0xfe,0xc6,0x06,0x06,0x0c,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0x0c,0x78,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0xc6,0x0c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xde,0xde,0xde,0xdc,0xc0,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +-0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00, +-0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00,0x00,0x00, +-0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00, +-0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, +-0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xde,0xc6,0xc6,0x66,0x3a,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +-0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x1e,0x0c,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00, +-0x00,0x00,0xe6,0x66,0x66,0x6c,0x78,0x78,0x6c,0x66,0x66,0xe6,0x00,0x00,0x00,0x00, +-0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc3,0xe7,0xff,0xff,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xd6,0xde,0x7c,0x0c,0x0e,0x00,0x00, +-0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x6c,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00, +-0x00,0x00,0x7c,0xc6,0xc6,0x60,0x38,0x0c,0x06,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0xff,0xdb,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x66,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x3c,0x66,0xc3,0xc3,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0xff,0xc3,0x86,0x0c,0x18,0x30,0x60,0xc1,0xc3,0xff,0x00,0x00,0x00,0x00, +-0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x38,0x1c,0x0e,0x06,0x02,0x00,0x00,0x00,0x00, +-0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00,0x00,0x00, +-0x10,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00, +-0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x00,0xe0,0x60,0x60,0x78,0x6c,0x66,0x66,0x66,0x66,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x1c,0x0c,0x0c,0x3c,0x6c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0xcc,0x78,0x00, +-0x00,0x00,0xe0,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00, +-0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x06,0x06,0x00,0x0e,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3c,0x00, +-0x00,0x00,0xe0,0x60,0x60,0x66,0x6c,0x78,0x78,0x6c,0x66,0xe6,0x00,0x00,0x00,0x00, +-0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xe6,0xff,0xdb,0xdb,0xdb,0xdb,0xdb,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xf0,0x00, +-0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x0c,0x1e,0x00, +-0x00,0x00,0x00,0x00,0x00,0xdc,0x76,0x66,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0x60,0x38,0x0c,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x10,0x30,0x30,0xfc,0x30,0x30,0x30,0x30,0x36,0x1c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xc3,0x66,0x3c,0x18,0x3c,0x66,0xc3,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c,0xf8,0x00, +-0x00,0x00,0x00,0x00,0x00,0xfe,0xcc,0x18,0x30,0x60,0xc6,0xfe,0x00,0x00,0x00,0x00, +-0x00,0x00,0x0e,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0e,0x00,0x00,0x00,0x00, +-0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0x70,0x18,0x18,0x18,0x0e,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00, +-0x00,0x00,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xfe,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x0c,0x06,0x7c,0x00,0x00, +-0x00,0x00,0xcc,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x0c,0x18,0x30,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x10,0x38,0x6c,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x00,0xcc,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x60,0x30,0x18,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x38,0x6c,0x38,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x3c,0x66,0x60,0x60,0x66,0x3c,0x0c,0x06,0x3c,0x00,0x00,0x00, +-0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x66,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x18,0x3c,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0xc6,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +-0x38,0x6c,0x38,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +-0x18,0x30,0x60,0x00,0xfe,0x66,0x60,0x7c,0x60,0x60,0x66,0xfe,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x6e,0x3b,0x1b,0x7e,0xd8,0xdc,0x77,0x00,0x00,0x00,0x00, +-0x00,0x00,0x3e,0x6c,0xcc,0xcc,0xfe,0xcc,0xcc,0xcc,0xcc,0xce,0x00,0x00,0x00,0x00, +-0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x30,0x78,0xcc,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x60,0x30,0x18,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc6,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c,0x78,0x00, +-0x00,0xc6,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0xc6,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x18,0x18,0x7e,0xc3,0xc0,0xc0,0xc0,0xc3,0x7e,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xe6,0xfc,0x00,0x00,0x00,0x00, +-0x00,0x00,0xc3,0x66,0x3c,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0xfc,0x66,0x66,0x7c,0x62,0x66,0x6f,0x66,0x66,0x66,0xf3,0x00,0x00,0x00,0x00, +-0x00,0x0e,0x1b,0x18,0x18,0x18,0x7e,0x18,0x18,0x18,0x18,0x18,0xd8,0x70,0x00,0x00, +-0x00,0x18,0x30,0x60,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x0c,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x18,0x30,0x60,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x18,0x30,0x60,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x00,0x76,0xdc,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00, +-0x76,0xdc,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +-0x00,0x3c,0x6c,0x6c,0x3e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x38,0x6c,0x6c,0x38,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xc0,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00, +-0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x60,0xce,0x9b,0x06,0x0c,0x1f,0x00,0x00, +-0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x66,0xce,0x96,0x3e,0x06,0x06,0x00,0x00, +-0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3c,0x3c,0x3c,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x36,0x6c,0xd8,0x6c,0x36,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xd8,0x6c,0x36,0x6c,0xd8,0x00,0x00,0x00,0x00,0x00,0x00, +-0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44, +-0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, +-0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77, +-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x3f,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xf7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xf7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x18,0x18,0x18,0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, +-0x18,0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +-0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, +-0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f, +-0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0xd8,0xd8,0xd8,0xdc,0x76,0x00,0x00,0x00,0x00, +-0x00,0x00,0x78,0xcc,0xcc,0xcc,0xd8,0xcc,0xc6,0xc6,0xc6,0xcc,0x00,0x00,0x00,0x00, +-0x00,0x00,0xfe,0xc6,0xc6,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0xfe,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0xfe,0xc6,0x60,0x30,0x18,0x30,0x60,0xc6,0xfe,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x7e,0xd8,0xd8,0xd8,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xc0,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x76,0xdc,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x7e,0x18,0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0x6c,0x38,0x00,0x00,0x00,0x00, +-0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0x6c,0x6c,0x6c,0x6c,0xee,0x00,0x00,0x00,0x00, +-0x00,0x00,0x1e,0x30,0x18,0x0c,0x3e,0x66,0x66,0x66,0x66,0x3c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x7e,0xdb,0xdb,0xdb,0x7e,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x03,0x06,0x7e,0xdb,0xdb,0xf3,0x7e,0x60,0xc0,0x00,0x00,0x00,0x00, +-0x00,0x00,0x1c,0x30,0x60,0x60,0x7c,0x60,0x60,0x60,0x30,0x1c,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0xff,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x00,0x7e,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x00,0x7e,0x00,0x00,0x00,0x00, +-0x00,0x00,0x0e,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +-0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xd8,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x7e,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0x00,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x38,0x6c,0x6c,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0xec,0x6c,0x6c,0x3c,0x1c,0x00,0x00,0x00,0x00, +-0x00,0xd8,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x70,0xd8,0x30,0x60,0xc8,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-}; +-static int default8x16FontMetaData[256*5+1]={ +-0,8,16,0,0,16,8,16,0,0,32,8,16,0,0,48,8,16,0,0,64,8,16,0,0,80,8,16,0,0,96,8,16,0,0,112,8,16,0,0,128,8,16,0,0,144,8,16,0,0,160,8,16,0,0,176,8,16,0,0,192,8,16,0,0,208,8,16,0,0,224,8,16,0,0,240,8,16,0,0,256,8,16,0,0,272,8,16,0,0,288,8,16,0,0,304,8,16,0,0,320,8,16,0,0,336,8,16,0,0,352,8,16,0,0,368,8,16,0,0,384,8,16,0,0,400,8,16,0,0,416,8,16,0,0,432,8,16,0,0,448,8,16,0,0,464,8,16,0,0,480,8,16,0,0,496,8,16,0,0,512,8,16,0,0,528,8,16,0,0,544,8,16,0,0,560,8,16,0,0,576,8,16,0,0,592,8,16,0,0,608,8,16,0,0,624,8,16,0,0,640,8,16,0,0,656,8,16,0,0,672,8,16,0,0,688,8,16,0,0,704,8,16,0,0,720,8,16,0,0,736,8,16,0,0,752,8,16,0,0,768,8,16,0,0,784,8,16,0,0,800,8,16,0,0,816,8,16,0,0,832,8,16,0,0,848,8,16,0,0,864,8,16,0,0,880,8,16,0,0,896,8,16,0,0,912,8,16,0,0,928,8,16,0,0,944,8,16,0,0,960,8,16,0,0,976,8,16,0,0,992,8,16,0,0,1008,8,16,0,0,1024,8,16,0,0,1040,8,16,0,0,1056,8,16,0,0,1072,8,16,0,0,1088,8,16,0,0,1104,8,16,0,0,1120,8,16,0,0,1136,8,16,0,0,1152,8,16,0,0,1168,8,16,0,0,1184,8,16,0,0,1200,8,16,0,0,1216,8,16,0,0,1232,8,16,0,0,1248,8,16,0,0,1264,8,16,0,0,1280,8,16,0,0,1296,8,16,0,0,1312,8,16,0,0,1328,8,16,0,0,1344,8,16,0,0,1360,8,16,0,0,1376,8,16,0,0,1392,8,16,0,0,1408,8,16,0,0,1424,8,16,0,0,1440,8,16,0,0,1456,8,16,0,0,1472,8,16,0,0,1488,8,16,0,0,1504,8,16,0,0,1520,8,16,0,0,1536,8,16,0,0,1552,8,16,0,0,1568,8,16,0,0,1584,8,16,0,0,1600,8,16,0,0,1616,8,16,0,0,1632,8,16,0,0,1648,8,16,0,0,1664,8,16,0,0,1680,8,16,0,0,1696,8,16,0,0,1712,8,16,0,0,1728,8,16,0,0,1744,8,16,0,0,1760,8,16,0,0,1776,8,16,0,0,1792,8,16,0,0,1808,8,16,0,0,1824,8,16,0,0,1840,8,16,0,0,1856,8,16,0,0,1872,8,16,0,0,1888,8,16,0,0,1904,8,16,0,0,1920,8,16,0,0,1936,8,16,0,0,1952,8,16,0,0,1968,8,16,0,0,1984,8,16,0,0,2000,8,16,0,0,2016,8,16,0,0,2032,8,16,0,0,2048,8,16,0,0,2064,8,16,0,0,2080,8,16,0,0,2096,8,16,0,0,2112,8,16,0,0,2128,8,16,0,0,2144,8,16,0,0,2160,8,16,0,0,2176,8,16,0,0,2192,8,16,0,0,2208,8,16,0,0,2224,8,16,0,0,2240,8,16,0,0,2256,8,16,0,0,2272,8,16,0,0,2288,8,16,0,0,2304,8,16,0,0,2320,8,16,0,0,2336,8,16,0,0,2352,8,16,0,0,2368,8,16,0,0,2384,8,16,0,0,2400,8,16,0,0,2416,8,16,0,0,2432,8,16,0,0,2448,8,16,0,0,2464,8,16,0,0,2480,8,16,0,0,2496,8,16,0,0,2512,8,16,0,0,2528,8,16,0,0,2544,8,16,0,0,2560,8,16,0,0,2576,8,16,0,0,2592,8,16,0,0,2608,8,16,0,0,2624,8,16,0,0,2640,8,16,0,0,2656,8,16,0,0,2672,8,16,0,0,2688,8,16,0,0,2704,8,16,0,0,2720,8,16,0,0,2736,8,16,0,0,2752,8,16,0,0,2768,8,16,0,0,2784,8,16,0,0,2800,8,16,0,0,2816,8,16,0,0,2832,8,16,0,0,2848,8,16,0,0,2864,8,16,0,0,2880,8,16,0,0,2896,8,16,0,0,2912,8,16,0,0,2928,8,16,0,0,2944,8,16,0,0,2960,8,16,0,0,2976,8,16,0,0,2992,8,16,0,0,3008,8,16,0,0,3024,8,16,0,0,3040,8,16,0,0,3056,8,16,0,0,3072,8,16,0,0,3088,8,16,0,0,3104,8,16,0,0,3120,8,16,0,0,3136,8,16,0,0,3152,8,16,0,0,3168,8,16,0,0,3184,8,16,0,0,3200,8,16,0,0,3216,8,16,0,0,3232,8,16,0,0,3248,8,16,0,0,3264,8,16,0,0,3280,8,16,0,0,3296,8,16,0,0,3312,8,16,0,0,3328,8,16,0,0,3344,8,16,0,0,3360,8,16,0,0,3376,8,16,0,0,3392,8,16,0,0,3408,8,16,0,0,3424,8,16,0,0,3440,8,16,0,0,3456,8,16,0,0,3472,8,16,0,0,3488,8,16,0,0,3504,8,16,0,0,3520,8,16,0,0,3536,8,16,0,0,3552,8,16,0,0,3568,8,16,0,0,3584,8,16,0,0,3600,8,16,0,0,3616,8,16,0,0,3632,8,16,0,0,3648,8,16,0,0,3664,8,16,0,0,3680,8,16,0,0,3696,8,16,0,0,3712,8,16,0,0,3728,8,16,0,0,3744,8,16,0,0,3760,8,16,0,0,3776,8,16,0,0,3792,8,16,0,0,3808,8,16,0,0,3824,8,16,0,0,3840,8,16,0,0,3856,8,16,0,0,3872,8,16,0,0,3888,8,16,0,0,3904,8,16,0,0,3920,8,16,0,0,3936,8,16,0,0,3952,8,16,0,0,3968,8,16,0,0,3984,8,16,0,0,4000,8,16,0,0,4016,8,16,0,0,4032,8,16,0,0,4048,8,16,0,0,4064,8,16,0,0,4080,8,16,0,0,}; +-static rfbFontData default8x16Font = { default8x16FontData, default8x16FontMetaData }; +diff --git a/remmina-plugins/vnc/libvncserver/rfb/keysym.h b/remmina-plugins/vnc/libvncserver/rfb/keysym.h +deleted file mode 100644 +index 219f95b..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfb/keysym.h ++++ /dev/null +@@ -1,1638 +0,0 @@ +-#ifndef XK_0 +- +-/* $XConsortium: keysym.h,v 1.15 94/04/17 20:10:55 rws Exp $ */ +- +-/*********************************************************** +- +-Copyright (c) 1987 X Consortium +- +-Permission is hereby granted, free of charge, to any person obtaining a copy +-of this software and associated documentation files (the "Software"), to deal +-in the Software without restriction, including without limitation the rights +-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +-copies of the Software, and to permit persons to whom the Software is +-furnished to do so, subject to the following conditions: +- +-The above copyright notice and this permission notice shall be included in +-all copies or substantial portions of the Software. +- +-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +- +-Except as contained in this notice, the name of the X Consortium shall not be +-used in advertising or otherwise to promote the sale, use or other dealings +-in this Software without prior written authorization from the X Consortium. +- +- +-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. +- +- All Rights Reserved +- +-Permission to use, copy, modify, and distribute this software and its +-documentation for any purpose and without fee is hereby granted, +-provided that the above copyright notice appear in all copies and that +-both that copyright notice and this permission notice appear in +-supporting documentation, and that the name of Digital not be +-used in advertising or publicity pertaining to distribution of the +-software without specific, written prior permission. +- +-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +-ANY DAMAGES WHATSOEVER RESULTING FROM 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. +- +-******************************************************************/ +- +-/* default keysyms */ +-#define XK_MISCELLANY +-#define XK_XKB_KEYS +-#define XK_LATIN1 +-#define XK_LATIN2 +-#define XK_LATIN3 +-#define XK_LATIN4 +-#define XK_GREEK +- +-/* $TOG: keysymdef.h /main/25 1997/06/21 10:54:51 kaleb $ */ +- +-/*********************************************************** +-Copyright (c) 1987, 1994 X Consortium +- +-Permission is hereby granted, free of charge, to any person obtaining +-a copy of this software and associated documentation files (the +-"Software"), to deal in the Software without restriction, including +-without limitation the rights to use, copy, modify, merge, publish, +-distribute, sublicense, and/or sell copies of the Software, and to +-permit persons to whom the Software is furnished to do so, subject to +-the following conditions: +- +-The above copyright notice and this permission notice shall be included +-in all copies or substantial portions of the Software. +- +-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +-IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +-OTHER DEALINGS IN THE SOFTWARE. +- +-Except as contained in this notice, the name of the X Consortium shall +-not be used in advertising or otherwise to promote the sale, use or +-other dealings in this Software without prior written authorization +-from the X Consortium. +- +- +-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts +- +- All Rights Reserved +- +-Permission to use, copy, modify, and distribute this software and its +-documentation for any purpose and without fee is hereby granted, +-provided that the above copyright notice appear in all copies and that +-both that copyright notice and this permission notice appear in +-supporting documentation, and that the name of Digital not be +-used in advertising or publicity pertaining to distribution of the +-software without specific, written prior permission. +- +-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +-ANY DAMAGES WHATSOEVER RESULTING FROM 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. +- +-******************************************************************/ +- +-#define XK_VoidSymbol 0xFFFFFF /* void symbol */ +- +-#ifdef XK_MISCELLANY +-/* +- * TTY Functions, cleverly chosen to map to ascii, for convenience of +- * programming, but could have been arbitrary (at the cost of lookup +- * tables in client code. +- */ +- +-#define XK_BackSpace 0xFF08 /* back space, back char */ +-#define XK_Tab 0xFF09 +-#define XK_Linefeed 0xFF0A /* Linefeed, LF */ +-#define XK_Clear 0xFF0B +-#define XK_Return 0xFF0D /* Return, enter */ +-#define XK_Pause 0xFF13 /* Pause, hold */ +-#define XK_Scroll_Lock 0xFF14 +-#define XK_Sys_Req 0xFF15 +-#define XK_Escape 0xFF1B +-#define XK_Delete 0xFFFF /* Delete, rubout */ +- +- +- +-/* International & multi-key character composition */ +- +-#define XK_Multi_key 0xFF20 /* Multi-key character compose */ +-#define XK_SingleCandidate 0xFF3C +-#define XK_MultipleCandidate 0xFF3D +-#define XK_PreviousCandidate 0xFF3E +- +-/* Japanese keyboard support */ +- +-#define XK_Kanji 0xFF21 /* Kanji, Kanji convert */ +-#define XK_Muhenkan 0xFF22 /* Cancel Conversion */ +-#define XK_Henkan_Mode 0xFF23 /* Start/Stop Conversion */ +-#define XK_Henkan 0xFF23 /* Alias for Henkan_Mode */ +-#define XK_Romaji 0xFF24 /* to Romaji */ +-#define XK_Hiragana 0xFF25 /* to Hiragana */ +-#define XK_Katakana 0xFF26 /* to Katakana */ +-#define XK_Hiragana_Katakana 0xFF27 /* Hiragana/Katakana toggle */ +-#define XK_Zenkaku 0xFF28 /* to Zenkaku */ +-#define XK_Hankaku 0xFF29 /* to Hankaku */ +-#define XK_Zenkaku_Hankaku 0xFF2A /* Zenkaku/Hankaku toggle */ +-#define XK_Touroku 0xFF2B /* Add to Dictionary */ +-#define XK_Massyo 0xFF2C /* Delete from Dictionary */ +-#define XK_Kana_Lock 0xFF2D /* Kana Lock */ +-#define XK_Kana_Shift 0xFF2E /* Kana Shift */ +-#define XK_Eisu_Shift 0xFF2F /* Alphanumeric Shift */ +-#define XK_Eisu_toggle 0xFF30 /* Alphanumeric toggle */ +-#define XK_Zen_Koho 0xFF3D /* Multiple/All Candidate(s) */ +-#define XK_Mae_Koho 0xFF3E /* Previous Candidate */ +- +-/* 0xFF31 thru 0xFF3F are under XK_KOREAN */ +- +-/* Cursor control & motion */ +- +-#define XK_Home 0xFF50 +-#define XK_Left 0xFF51 /* Move left, left arrow */ +-#define XK_Up 0xFF52 /* Move up, up arrow */ +-#define XK_Right 0xFF53 /* Move right, right arrow */ +-#define XK_Down 0xFF54 /* Move down, down arrow */ +-#define XK_Prior 0xFF55 /* Prior, previous */ +-#define XK_Page_Up 0xFF55 +-#define XK_Next 0xFF56 /* Next */ +-#define XK_Page_Down 0xFF56 +-#define XK_End 0xFF57 /* EOL */ +-#define XK_Begin 0xFF58 /* BOL */ +- +- +-/* Misc Functions */ +- +-#define XK_Select 0xFF60 /* Select, mark */ +-#define XK_Print 0xFF61 +-#define XK_Execute 0xFF62 /* Execute, run, do */ +-#define XK_Insert 0xFF63 /* Insert, insert here */ +-#define XK_Undo 0xFF65 /* Undo, oops */ +-#define XK_Redo 0xFF66 /* redo, again */ +-#define XK_Menu 0xFF67 +-#define XK_Find 0xFF68 /* Find, search */ +-#define XK_Cancel 0xFF69 /* Cancel, stop, abort, exit */ +-#define XK_Help 0xFF6A /* Help */ +-#define XK_Break 0xFF6B +-#define XK_Mode_switch 0xFF7E /* Character set switch */ +-#define XK_script_switch 0xFF7E /* Alias for mode_switch */ +-#define XK_Num_Lock 0xFF7F +- +-/* Keypad Functions, keypad numbers cleverly chosen to map to ascii */ +- +-#define XK_KP_Space 0xFF80 /* space */ +-#define XK_KP_Tab 0xFF89 +-#define XK_KP_Enter 0xFF8D /* enter */ +-#define XK_KP_F1 0xFF91 /* PF1, KP_A, ... */ +-#define XK_KP_F2 0xFF92 +-#define XK_KP_F3 0xFF93 +-#define XK_KP_F4 0xFF94 +-#define XK_KP_Home 0xFF95 +-#define XK_KP_Left 0xFF96 +-#define XK_KP_Up 0xFF97 +-#define XK_KP_Right 0xFF98 +-#define XK_KP_Down 0xFF99 +-#define XK_KP_Prior 0xFF9A +-#define XK_KP_Page_Up 0xFF9A +-#define XK_KP_Next 0xFF9B +-#define XK_KP_Page_Down 0xFF9B +-#define XK_KP_End 0xFF9C +-#define XK_KP_Begin 0xFF9D +-#define XK_KP_Insert 0xFF9E +-#define XK_KP_Delete 0xFF9F +-#define XK_KP_Equal 0xFFBD /* equals */ +-#define XK_KP_Multiply 0xFFAA +-#define XK_KP_Add 0xFFAB +-#define XK_KP_Separator 0xFFAC /* separator, often comma */ +-#define XK_KP_Subtract 0xFFAD +-#define XK_KP_Decimal 0xFFAE +-#define XK_KP_Divide 0xFFAF +- +-#define XK_KP_0 0xFFB0 +-#define XK_KP_1 0xFFB1 +-#define XK_KP_2 0xFFB2 +-#define XK_KP_3 0xFFB3 +-#define XK_KP_4 0xFFB4 +-#define XK_KP_5 0xFFB5 +-#define XK_KP_6 0xFFB6 +-#define XK_KP_7 0xFFB7 +-#define XK_KP_8 0xFFB8 +-#define XK_KP_9 0xFFB9 +- +- +- +-/* +- * Auxilliary Functions; note the duplicate definitions for left and right +- * function keys; Sun keyboards and a few other manufactures have such +- * function key groups on the left and/or right sides of the keyboard. +- * We've not found a keyboard with more than 35 function keys total. +- */ +- +-#define XK_F1 0xFFBE +-#define XK_F2 0xFFBF +-#define XK_F3 0xFFC0 +-#define XK_F4 0xFFC1 +-#define XK_F5 0xFFC2 +-#define XK_F6 0xFFC3 +-#define XK_F7 0xFFC4 +-#define XK_F8 0xFFC5 +-#define XK_F9 0xFFC6 +-#define XK_F10 0xFFC7 +-#define XK_F11 0xFFC8 +-#define XK_L1 0xFFC8 +-#define XK_F12 0xFFC9 +-#define XK_L2 0xFFC9 +-#define XK_F13 0xFFCA +-#define XK_L3 0xFFCA +-#define XK_F14 0xFFCB +-#define XK_L4 0xFFCB +-#define XK_F15 0xFFCC +-#define XK_L5 0xFFCC +-#define XK_F16 0xFFCD +-#define XK_L6 0xFFCD +-#define XK_F17 0xFFCE +-#define XK_L7 0xFFCE +-#define XK_F18 0xFFCF +-#define XK_L8 0xFFCF +-#define XK_F19 0xFFD0 +-#define XK_L9 0xFFD0 +-#define XK_F20 0xFFD1 +-#define XK_L10 0xFFD1 +-#define XK_F21 0xFFD2 +-#define XK_R1 0xFFD2 +-#define XK_F22 0xFFD3 +-#define XK_R2 0xFFD3 +-#define XK_F23 0xFFD4 +-#define XK_R3 0xFFD4 +-#define XK_F24 0xFFD5 +-#define XK_R4 0xFFD5 +-#define XK_F25 0xFFD6 +-#define XK_R5 0xFFD6 +-#define XK_F26 0xFFD7 +-#define XK_R6 0xFFD7 +-#define XK_F27 0xFFD8 +-#define XK_R7 0xFFD8 +-#define XK_F28 0xFFD9 +-#define XK_R8 0xFFD9 +-#define XK_F29 0xFFDA +-#define XK_R9 0xFFDA +-#define XK_F30 0xFFDB +-#define XK_R10 0xFFDB +-#define XK_F31 0xFFDC +-#define XK_R11 0xFFDC +-#define XK_F32 0xFFDD +-#define XK_R12 0xFFDD +-#define XK_F33 0xFFDE +-#define XK_R13 0xFFDE +-#define XK_F34 0xFFDF +-#define XK_R14 0xFFDF +-#define XK_F35 0xFFE0 +-#define XK_R15 0xFFE0 +- +-/* Modifiers */ +- +-#define XK_Shift_L 0xFFE1 /* Left shift */ +-#define XK_Shift_R 0xFFE2 /* Right shift */ +-#define XK_Control_L 0xFFE3 /* Left control */ +-#define XK_Control_R 0xFFE4 /* Right control */ +-#define XK_Caps_Lock 0xFFE5 /* Caps lock */ +-#define XK_Shift_Lock 0xFFE6 /* Shift lock */ +- +-#define XK_Meta_L 0xFFE7 /* Left meta */ +-#define XK_Meta_R 0xFFE8 /* Right meta */ +-#define XK_Alt_L 0xFFE9 /* Left alt */ +-#define XK_Alt_R 0xFFEA /* Right alt */ +-#define XK_Super_L 0xFFEB /* Left super */ +-#define XK_Super_R 0xFFEC /* Right super */ +-#define XK_Hyper_L 0xFFED /* Left hyper */ +-#define XK_Hyper_R 0xFFEE /* Right hyper */ +-#endif /* XK_MISCELLANY */ +- +-/* +- * ISO 9995 Function and Modifier Keys +- * Byte 3 = 0xFE +- */ +- +-#ifdef XK_XKB_KEYS +-#define XK_ISO_Lock 0xFE01 +-#define XK_ISO_Level2_Latch 0xFE02 +-#define XK_ISO_Level3_Shift 0xFE03 +-#define XK_ISO_Level3_Latch 0xFE04 +-#define XK_ISO_Level3_Lock 0xFE05 +-#define XK_ISO_Group_Shift 0xFF7E /* Alias for mode_switch */ +-#define XK_ISO_Group_Latch 0xFE06 +-#define XK_ISO_Group_Lock 0xFE07 +-#define XK_ISO_Next_Group 0xFE08 +-#define XK_ISO_Next_Group_Lock 0xFE09 +-#define XK_ISO_Prev_Group 0xFE0A +-#define XK_ISO_Prev_Group_Lock 0xFE0B +-#define XK_ISO_First_Group 0xFE0C +-#define XK_ISO_First_Group_Lock 0xFE0D +-#define XK_ISO_Last_Group 0xFE0E +-#define XK_ISO_Last_Group_Lock 0xFE0F +- +-#define XK_ISO_Left_Tab 0xFE20 +-#define XK_ISO_Move_Line_Up 0xFE21 +-#define XK_ISO_Move_Line_Down 0xFE22 +-#define XK_ISO_Partial_Line_Up 0xFE23 +-#define XK_ISO_Partial_Line_Down 0xFE24 +-#define XK_ISO_Partial_Space_Left 0xFE25 +-#define XK_ISO_Partial_Space_Right 0xFE26 +-#define XK_ISO_Set_Margin_Left 0xFE27 +-#define XK_ISO_Set_Margin_Right 0xFE28 +-#define XK_ISO_Release_Margin_Left 0xFE29 +-#define XK_ISO_Release_Margin_Right 0xFE2A +-#define XK_ISO_Release_Both_Margins 0xFE2B +-#define XK_ISO_Fast_Cursor_Left 0xFE2C +-#define XK_ISO_Fast_Cursor_Right 0xFE2D +-#define XK_ISO_Fast_Cursor_Up 0xFE2E +-#define XK_ISO_Fast_Cursor_Down 0xFE2F +-#define XK_ISO_Continuous_Underline 0xFE30 +-#define XK_ISO_Discontinuous_Underline 0xFE31 +-#define XK_ISO_Emphasize 0xFE32 +-#define XK_ISO_Center_Object 0xFE33 +-#define XK_ISO_Enter 0xFE34 +- +-#define XK_dead_grave 0xFE50 +-#define XK_dead_acute 0xFE51 +-#define XK_dead_circumflex 0xFE52 +-#define XK_dead_tilde 0xFE53 +-#define XK_dead_macron 0xFE54 +-#define XK_dead_breve 0xFE55 +-#define XK_dead_abovedot 0xFE56 +-#define XK_dead_diaeresis 0xFE57 +-#define XK_dead_abovering 0xFE58 +-#define XK_dead_doubleacute 0xFE59 +-#define XK_dead_caron 0xFE5A +-#define XK_dead_cedilla 0xFE5B +-#define XK_dead_ogonek 0xFE5C +-#define XK_dead_iota 0xFE5D +-#define XK_dead_voiced_sound 0xFE5E +-#define XK_dead_semivoiced_sound 0xFE5F +-#define XK_dead_belowdot 0xFE60 +- +-#define XK_First_Virtual_Screen 0xFED0 +-#define XK_Prev_Virtual_Screen 0xFED1 +-#define XK_Next_Virtual_Screen 0xFED2 +-#define XK_Last_Virtual_Screen 0xFED4 +-#define XK_Terminate_Server 0xFED5 +- +-#define XK_AccessX_Enable 0xFE70 +-#define XK_AccessX_Feedback_Enable 0xFE71 +-#define XK_RepeatKeys_Enable 0xFE72 +-#define XK_SlowKeys_Enable 0xFE73 +-#define XK_BounceKeys_Enable 0xFE74 +-#define XK_StickyKeys_Enable 0xFE75 +-#define XK_MouseKeys_Enable 0xFE76 +-#define XK_MouseKeys_Accel_Enable 0xFE77 +-#define XK_Overlay1_Enable 0xFE78 +-#define XK_Overlay2_Enable 0xFE79 +-#define XK_AudibleBell_Enable 0xFE7A +- +-#define XK_Pointer_Left 0xFEE0 +-#define XK_Pointer_Right 0xFEE1 +-#define XK_Pointer_Up 0xFEE2 +-#define XK_Pointer_Down 0xFEE3 +-#define XK_Pointer_UpLeft 0xFEE4 +-#define XK_Pointer_UpRight 0xFEE5 +-#define XK_Pointer_DownLeft 0xFEE6 +-#define XK_Pointer_DownRight 0xFEE7 +-#define XK_Pointer_Button_Dflt 0xFEE8 +-#define XK_Pointer_Button1 0xFEE9 +-#define XK_Pointer_Button2 0xFEEA +-#define XK_Pointer_Button3 0xFEEB +-#define XK_Pointer_Button4 0xFEEC +-#define XK_Pointer_Button5 0xFEED +-#define XK_Pointer_DblClick_Dflt 0xFEEE +-#define XK_Pointer_DblClick1 0xFEEF +-#define XK_Pointer_DblClick2 0xFEF0 +-#define XK_Pointer_DblClick3 0xFEF1 +-#define XK_Pointer_DblClick4 0xFEF2 +-#define XK_Pointer_DblClick5 0xFEF3 +-#define XK_Pointer_Drag_Dflt 0xFEF4 +-#define XK_Pointer_Drag1 0xFEF5 +-#define XK_Pointer_Drag2 0xFEF6 +-#define XK_Pointer_Drag3 0xFEF7 +-#define XK_Pointer_Drag4 0xFEF8 +-#define XK_Pointer_Drag5 0xFEFD +- +-#define XK_Pointer_EnableKeys 0xFEF9 +-#define XK_Pointer_Accelerate 0xFEFA +-#define XK_Pointer_DfltBtnNext 0xFEFB +-#define XK_Pointer_DfltBtnPrev 0xFEFC +- +-#endif +- +-/* +- * 3270 Terminal Keys +- * Byte 3 = 0xFD +- */ +- +-#ifdef XK_3270 +-#define XK_3270_Duplicate 0xFD01 +-#define XK_3270_FieldMark 0xFD02 +-#define XK_3270_Right2 0xFD03 +-#define XK_3270_Left2 0xFD04 +-#define XK_3270_BackTab 0xFD05 +-#define XK_3270_EraseEOF 0xFD06 +-#define XK_3270_EraseInput 0xFD07 +-#define XK_3270_Reset 0xFD08 +-#define XK_3270_Quit 0xFD09 +-#define XK_3270_PA1 0xFD0A +-#define XK_3270_PA2 0xFD0B +-#define XK_3270_PA3 0xFD0C +-#define XK_3270_Test 0xFD0D +-#define XK_3270_Attn 0xFD0E +-#define XK_3270_CursorBlink 0xFD0F +-#define XK_3270_AltCursor 0xFD10 +-#define XK_3270_KeyClick 0xFD11 +-#define XK_3270_Jump 0xFD12 +-#define XK_3270_Ident 0xFD13 +-#define XK_3270_Rule 0xFD14 +-#define XK_3270_Copy 0xFD15 +-#define XK_3270_Play 0xFD16 +-#define XK_3270_Setup 0xFD17 +-#define XK_3270_Record 0xFD18 +-#define XK_3270_ChangeScreen 0xFD19 +-#define XK_3270_DeleteWord 0xFD1A +-#define XK_3270_ExSelect 0xFD1B +-#define XK_3270_CursorSelect 0xFD1C +-#define XK_3270_PrintScreen 0xFD1D +-#define XK_3270_Enter 0xFD1E +-#endif +- +-/* +- * Latin 1 +- * Byte 3 = 0 +- */ +-#ifdef XK_LATIN1 +-#define XK_space 0x020 +-#define XK_exclam 0x021 +-#define XK_quotedbl 0x022 +-#define XK_numbersign 0x023 +-#define XK_dollar 0x024 +-#define XK_percent 0x025 +-#define XK_ampersand 0x026 +-#define XK_apostrophe 0x027 +-#define XK_quoteright 0x027 /* deprecated */ +-#define XK_parenleft 0x028 +-#define XK_parenright 0x029 +-#define XK_asterisk 0x02a +-#define XK_plus 0x02b +-#define XK_comma 0x02c +-#define XK_minus 0x02d +-#define XK_period 0x02e +-#define XK_slash 0x02f +-#define XK_0 0x030 +-#define XK_1 0x031 +-#define XK_2 0x032 +-#define XK_3 0x033 +-#define XK_4 0x034 +-#define XK_5 0x035 +-#define XK_6 0x036 +-#define XK_7 0x037 +-#define XK_8 0x038 +-#define XK_9 0x039 +-#define XK_colon 0x03a +-#define XK_semicolon 0x03b +-#define XK_less 0x03c +-#define XK_equal 0x03d +-#define XK_greater 0x03e +-#define XK_question 0x03f +-#define XK_at 0x040 +-#define XK_A 0x041 +-#define XK_B 0x042 +-#define XK_C 0x043 +-#define XK_D 0x044 +-#define XK_E 0x045 +-#define XK_F 0x046 +-#define XK_G 0x047 +-#define XK_H 0x048 +-#define XK_I 0x049 +-#define XK_J 0x04a +-#define XK_K 0x04b +-#define XK_L 0x04c +-#define XK_M 0x04d +-#define XK_N 0x04e +-#define XK_O 0x04f +-#define XK_P 0x050 +-#define XK_Q 0x051 +-#define XK_R 0x052 +-#define XK_S 0x053 +-#define XK_T 0x054 +-#define XK_U 0x055 +-#define XK_V 0x056 +-#define XK_W 0x057 +-#define XK_X 0x058 +-#define XK_Y 0x059 +-#define XK_Z 0x05a +-#define XK_bracketleft 0x05b +-#define XK_backslash 0x05c +-#define XK_bracketright 0x05d +-#define XK_asciicircum 0x05e +-#define XK_underscore 0x05f +-#define XK_grave 0x060 +-#define XK_quoteleft 0x060 /* deprecated */ +-#define XK_a 0x061 +-#define XK_b 0x062 +-#define XK_c 0x063 +-#define XK_d 0x064 +-#define XK_e 0x065 +-#define XK_f 0x066 +-#define XK_g 0x067 +-#define XK_h 0x068 +-#define XK_i 0x069 +-#define XK_j 0x06a +-#define XK_k 0x06b +-#define XK_l 0x06c +-#define XK_m 0x06d +-#define XK_n 0x06e +-#define XK_o 0x06f +-#define XK_p 0x070 +-#define XK_q 0x071 +-#define XK_r 0x072 +-#define XK_s 0x073 +-#define XK_t 0x074 +-#define XK_u 0x075 +-#define XK_v 0x076 +-#define XK_w 0x077 +-#define XK_x 0x078 +-#define XK_y 0x079 +-#define XK_z 0x07a +-#define XK_braceleft 0x07b +-#define XK_bar 0x07c +-#define XK_braceright 0x07d +-#define XK_asciitilde 0x07e +- +-#define XK_nobreakspace 0x0a0 +-#define XK_exclamdown 0x0a1 +-#define XK_cent 0x0a2 +-#define XK_sterling 0x0a3 +-#define XK_currency 0x0a4 +-#define XK_yen 0x0a5 +-#define XK_brokenbar 0x0a6 +-#define XK_section 0x0a7 +-#define XK_diaeresis 0x0a8 +-#define XK_copyright 0x0a9 +-#define XK_ordfeminine 0x0aa +-#define XK_guillemotleft 0x0ab /* left angle quotation mark */ +-#define XK_notsign 0x0ac +-#define XK_hyphen 0x0ad +-#define XK_registered 0x0ae +-#define XK_macron 0x0af +-#define XK_degree 0x0b0 +-#define XK_plusminus 0x0b1 +-#define XK_twosuperior 0x0b2 +-#define XK_threesuperior 0x0b3 +-#define XK_acute 0x0b4 +-#define XK_mu 0x0b5 +-#define XK_paragraph 0x0b6 +-#define XK_periodcentered 0x0b7 +-#define XK_cedilla 0x0b8 +-#define XK_onesuperior 0x0b9 +-#define XK_masculine 0x0ba +-#define XK_guillemotright 0x0bb /* right angle quotation mark */ +-#define XK_onequarter 0x0bc +-#define XK_onehalf 0x0bd +-#define XK_threequarters 0x0be +-#define XK_questiondown 0x0bf +-#define XK_Agrave 0x0c0 +-#define XK_Aacute 0x0c1 +-#define XK_Acircumflex 0x0c2 +-#define XK_Atilde 0x0c3 +-#define XK_Adiaeresis 0x0c4 +-#define XK_Aring 0x0c5 +-#define XK_AE 0x0c6 +-#define XK_Ccedilla 0x0c7 +-#define XK_Egrave 0x0c8 +-#define XK_Eacute 0x0c9 +-#define XK_Ecircumflex 0x0ca +-#define XK_Ediaeresis 0x0cb +-#define XK_Igrave 0x0cc +-#define XK_Iacute 0x0cd +-#define XK_Icircumflex 0x0ce +-#define XK_Idiaeresis 0x0cf +-#define XK_ETH 0x0d0 +-#define XK_Eth 0x0d0 /* deprecated */ +-#define XK_Ntilde 0x0d1 +-#define XK_Ograve 0x0d2 +-#define XK_Oacute 0x0d3 +-#define XK_Ocircumflex 0x0d4 +-#define XK_Otilde 0x0d5 +-#define XK_Odiaeresis 0x0d6 +-#define XK_multiply 0x0d7 +-#define XK_Ooblique 0x0d8 +-#define XK_Ugrave 0x0d9 +-#define XK_Uacute 0x0da +-#define XK_Ucircumflex 0x0db +-#define XK_Udiaeresis 0x0dc +-#define XK_Yacute 0x0dd +-#define XK_THORN 0x0de +-#define XK_Thorn 0x0de /* deprecated */ +-#define XK_ssharp 0x0df +-#define XK_agrave 0x0e0 +-#define XK_aacute 0x0e1 +-#define XK_acircumflex 0x0e2 +-#define XK_atilde 0x0e3 +-#define XK_adiaeresis 0x0e4 +-#define XK_aring 0x0e5 +-#define XK_ae 0x0e6 +-#define XK_ccedilla 0x0e7 +-#define XK_egrave 0x0e8 +-#define XK_eacute 0x0e9 +-#define XK_ecircumflex 0x0ea +-#define XK_ediaeresis 0x0eb +-#define XK_igrave 0x0ec +-#define XK_iacute 0x0ed +-#define XK_icircumflex 0x0ee +-#define XK_idiaeresis 0x0ef +-#define XK_eth 0x0f0 +-#define XK_ntilde 0x0f1 +-#define XK_ograve 0x0f2 +-#define XK_oacute 0x0f3 +-#define XK_ocircumflex 0x0f4 +-#define XK_otilde 0x0f5 +-#define XK_odiaeresis 0x0f6 +-#define XK_division 0x0f7 +-#define XK_oslash 0x0f8 +-#define XK_ugrave 0x0f9 +-#define XK_uacute 0x0fa +-#define XK_ucircumflex 0x0fb +-#define XK_udiaeresis 0x0fc +-#define XK_yacute 0x0fd +-#define XK_thorn 0x0fe +-#define XK_ydiaeresis 0x0ff +-#endif /* XK_LATIN1 */ +- +-/* +- * Latin 2 +- * Byte 3 = 1 +- */ +- +-#ifdef XK_LATIN2 +-#define XK_Aogonek 0x1a1 +-#define XK_breve 0x1a2 +-#define XK_Lstroke 0x1a3 +-#define XK_Lcaron 0x1a5 +-#define XK_Sacute 0x1a6 +-#define XK_Scaron 0x1a9 +-#define XK_Scedilla 0x1aa +-#define XK_Tcaron 0x1ab +-#define XK_Zacute 0x1ac +-#define XK_Zcaron 0x1ae +-#define XK_Zabovedot 0x1af +-#define XK_aogonek 0x1b1 +-#define XK_ogonek 0x1b2 +-#define XK_lstroke 0x1b3 +-#define XK_lcaron 0x1b5 +-#define XK_sacute 0x1b6 +-#define XK_caron 0x1b7 +-#define XK_scaron 0x1b9 +-#define XK_scedilla 0x1ba +-#define XK_tcaron 0x1bb +-#define XK_zacute 0x1bc +-#define XK_doubleacute 0x1bd +-#define XK_zcaron 0x1be +-#define XK_zabovedot 0x1bf +-#define XK_Racute 0x1c0 +-#define XK_Abreve 0x1c3 +-#define XK_Lacute 0x1c5 +-#define XK_Cacute 0x1c6 +-#define XK_Ccaron 0x1c8 +-#define XK_Eogonek 0x1ca +-#define XK_Ecaron 0x1cc +-#define XK_Dcaron 0x1cf +-#define XK_Dstroke 0x1d0 +-#define XK_Nacute 0x1d1 +-#define XK_Ncaron 0x1d2 +-#define XK_Odoubleacute 0x1d5 +-#define XK_Rcaron 0x1d8 +-#define XK_Uring 0x1d9 +-#define XK_Udoubleacute 0x1db +-#define XK_Tcedilla 0x1de +-#define XK_racute 0x1e0 +-#define XK_abreve 0x1e3 +-#define XK_lacute 0x1e5 +-#define XK_cacute 0x1e6 +-#define XK_ccaron 0x1e8 +-#define XK_eogonek 0x1ea +-#define XK_ecaron 0x1ec +-#define XK_dcaron 0x1ef +-#define XK_dstroke 0x1f0 +-#define XK_nacute 0x1f1 +-#define XK_ncaron 0x1f2 +-#define XK_odoubleacute 0x1f5 +-#define XK_udoubleacute 0x1fb +-#define XK_rcaron 0x1f8 +-#define XK_uring 0x1f9 +-#define XK_tcedilla 0x1fe +-#define XK_abovedot 0x1ff +-#endif /* XK_LATIN2 */ +- +-/* +- * Latin 3 +- * Byte 3 = 2 +- */ +- +-#ifdef XK_LATIN3 +-#define XK_Hstroke 0x2a1 +-#define XK_Hcircumflex 0x2a6 +-#define XK_Iabovedot 0x2a9 +-#define XK_Gbreve 0x2ab +-#define XK_Jcircumflex 0x2ac +-#define XK_hstroke 0x2b1 +-#define XK_hcircumflex 0x2b6 +-#define XK_idotless 0x2b9 +-#define XK_gbreve 0x2bb +-#define XK_jcircumflex 0x2bc +-#define XK_Cabovedot 0x2c5 +-#define XK_Ccircumflex 0x2c6 +-#define XK_Gabovedot 0x2d5 +-#define XK_Gcircumflex 0x2d8 +-#define XK_Ubreve 0x2dd +-#define XK_Scircumflex 0x2de +-#define XK_cabovedot 0x2e5 +-#define XK_ccircumflex 0x2e6 +-#define XK_gabovedot 0x2f5 +-#define XK_gcircumflex 0x2f8 +-#define XK_ubreve 0x2fd +-#define XK_scircumflex 0x2fe +-#endif /* XK_LATIN3 */ +- +- +-/* +- * Latin 4 +- * Byte 3 = 3 +- */ +- +-#ifdef XK_LATIN4 +-#define XK_kra 0x3a2 +-#define XK_kappa 0x3a2 /* deprecated */ +-#define XK_Rcedilla 0x3a3 +-#define XK_Itilde 0x3a5 +-#define XK_Lcedilla 0x3a6 +-#define XK_Emacron 0x3aa +-#define XK_Gcedilla 0x3ab +-#define XK_Tslash 0x3ac +-#define XK_rcedilla 0x3b3 +-#define XK_itilde 0x3b5 +-#define XK_lcedilla 0x3b6 +-#define XK_emacron 0x3ba +-#define XK_gcedilla 0x3bb +-#define XK_tslash 0x3bc +-#define XK_ENG 0x3bd +-#define XK_eng 0x3bf +-#define XK_Amacron 0x3c0 +-#define XK_Iogonek 0x3c7 +-#define XK_Eabovedot 0x3cc +-#define XK_Imacron 0x3cf +-#define XK_Ncedilla 0x3d1 +-#define XK_Omacron 0x3d2 +-#define XK_Kcedilla 0x3d3 +-#define XK_Uogonek 0x3d9 +-#define XK_Utilde 0x3dd +-#define XK_Umacron 0x3de +-#define XK_amacron 0x3e0 +-#define XK_iogonek 0x3e7 +-#define XK_eabovedot 0x3ec +-#define XK_imacron 0x3ef +-#define XK_ncedilla 0x3f1 +-#define XK_omacron 0x3f2 +-#define XK_kcedilla 0x3f3 +-#define XK_uogonek 0x3f9 +-#define XK_utilde 0x3fd +-#define XK_umacron 0x3fe +-#endif /* XK_LATIN4 */ +- +-/* +- * Katakana +- * Byte 3 = 4 +- */ +- +-#ifdef XK_KATAKANA +-#define XK_overline 0x47e +-#define XK_kana_fullstop 0x4a1 +-#define XK_kana_openingbracket 0x4a2 +-#define XK_kana_closingbracket 0x4a3 +-#define XK_kana_comma 0x4a4 +-#define XK_kana_conjunctive 0x4a5 +-#define XK_kana_middledot 0x4a5 /* deprecated */ +-#define XK_kana_WO 0x4a6 +-#define XK_kana_a 0x4a7 +-#define XK_kana_i 0x4a8 +-#define XK_kana_u 0x4a9 +-#define XK_kana_e 0x4aa +-#define XK_kana_o 0x4ab +-#define XK_kana_ya 0x4ac +-#define XK_kana_yu 0x4ad +-#define XK_kana_yo 0x4ae +-#define XK_kana_tsu 0x4af +-#define XK_kana_tu 0x4af /* deprecated */ +-#define XK_prolongedsound 0x4b0 +-#define XK_kana_A 0x4b1 +-#define XK_kana_I 0x4b2 +-#define XK_kana_U 0x4b3 +-#define XK_kana_E 0x4b4 +-#define XK_kana_O 0x4b5 +-#define XK_kana_KA 0x4b6 +-#define XK_kana_KI 0x4b7 +-#define XK_kana_KU 0x4b8 +-#define XK_kana_KE 0x4b9 +-#define XK_kana_KO 0x4ba +-#define XK_kana_SA 0x4bb +-#define XK_kana_SHI 0x4bc +-#define XK_kana_SU 0x4bd +-#define XK_kana_SE 0x4be +-#define XK_kana_SO 0x4bf +-#define XK_kana_TA 0x4c0 +-#define XK_kana_CHI 0x4c1 +-#define XK_kana_TI 0x4c1 /* deprecated */ +-#define XK_kana_TSU 0x4c2 +-#define XK_kana_TU 0x4c2 /* deprecated */ +-#define XK_kana_TE 0x4c3 +-#define XK_kana_TO 0x4c4 +-#define XK_kana_NA 0x4c5 +-#define XK_kana_NI 0x4c6 +-#define XK_kana_NU 0x4c7 +-#define XK_kana_NE 0x4c8 +-#define XK_kana_NO 0x4c9 +-#define XK_kana_HA 0x4ca +-#define XK_kana_HI 0x4cb +-#define XK_kana_FU 0x4cc +-#define XK_kana_HU 0x4cc /* deprecated */ +-#define XK_kana_HE 0x4cd +-#define XK_kana_HO 0x4ce +-#define XK_kana_MA 0x4cf +-#define XK_kana_MI 0x4d0 +-#define XK_kana_MU 0x4d1 +-#define XK_kana_ME 0x4d2 +-#define XK_kana_MO 0x4d3 +-#define XK_kana_YA 0x4d4 +-#define XK_kana_YU 0x4d5 +-#define XK_kana_YO 0x4d6 +-#define XK_kana_RA 0x4d7 +-#define XK_kana_RI 0x4d8 +-#define XK_kana_RU 0x4d9 +-#define XK_kana_RE 0x4da +-#define XK_kana_RO 0x4db +-#define XK_kana_WA 0x4dc +-#define XK_kana_N 0x4dd +-#define XK_voicedsound 0x4de +-#define XK_semivoicedsound 0x4df +-#define XK_kana_switch 0xFF7E /* Alias for mode_switch */ +-#endif /* XK_KATAKANA */ +- +-/* +- * Arabic +- * Byte 3 = 5 +- */ +- +-#ifdef XK_ARABIC +-#define XK_Arabic_comma 0x5ac +-#define XK_Arabic_semicolon 0x5bb +-#define XK_Arabic_question_mark 0x5bf +-#define XK_Arabic_hamza 0x5c1 +-#define XK_Arabic_maddaonalef 0x5c2 +-#define XK_Arabic_hamzaonalef 0x5c3 +-#define XK_Arabic_hamzaonwaw 0x5c4 +-#define XK_Arabic_hamzaunderalef 0x5c5 +-#define XK_Arabic_hamzaonyeh 0x5c6 +-#define XK_Arabic_alef 0x5c7 +-#define XK_Arabic_beh 0x5c8 +-#define XK_Arabic_tehmarbuta 0x5c9 +-#define XK_Arabic_teh 0x5ca +-#define XK_Arabic_theh 0x5cb +-#define XK_Arabic_jeem 0x5cc +-#define XK_Arabic_hah 0x5cd +-#define XK_Arabic_khah 0x5ce +-#define XK_Arabic_dal 0x5cf +-#define XK_Arabic_thal 0x5d0 +-#define XK_Arabic_ra 0x5d1 +-#define XK_Arabic_zain 0x5d2 +-#define XK_Arabic_seen 0x5d3 +-#define XK_Arabic_sheen 0x5d4 +-#define XK_Arabic_sad 0x5d5 +-#define XK_Arabic_dad 0x5d6 +-#define XK_Arabic_tah 0x5d7 +-#define XK_Arabic_zah 0x5d8 +-#define XK_Arabic_ain 0x5d9 +-#define XK_Arabic_ghain 0x5da +-#define XK_Arabic_tatweel 0x5e0 +-#define XK_Arabic_feh 0x5e1 +-#define XK_Arabic_qaf 0x5e2 +-#define XK_Arabic_kaf 0x5e3 +-#define XK_Arabic_lam 0x5e4 +-#define XK_Arabic_meem 0x5e5 +-#define XK_Arabic_noon 0x5e6 +-#define XK_Arabic_ha 0x5e7 +-#define XK_Arabic_heh 0x5e7 /* deprecated */ +-#define XK_Arabic_waw 0x5e8 +-#define XK_Arabic_alefmaksura 0x5e9 +-#define XK_Arabic_yeh 0x5ea +-#define XK_Arabic_fathatan 0x5eb +-#define XK_Arabic_dammatan 0x5ec +-#define XK_Arabic_kasratan 0x5ed +-#define XK_Arabic_fatha 0x5ee +-#define XK_Arabic_damma 0x5ef +-#define XK_Arabic_kasra 0x5f0 +-#define XK_Arabic_shadda 0x5f1 +-#define XK_Arabic_sukun 0x5f2 +-#define XK_Arabic_switch 0xFF7E /* Alias for mode_switch */ +-#endif /* XK_ARABIC */ +- +-/* +- * Cyrillic +- * Byte 3 = 6 +- */ +-#ifdef XK_CYRILLIC +-#define XK_Serbian_dje 0x6a1 +-#define XK_Macedonia_gje 0x6a2 +-#define XK_Cyrillic_io 0x6a3 +-#define XK_Ukrainian_ie 0x6a4 +-#define XK_Ukranian_je 0x6a4 /* deprecated */ +-#define XK_Macedonia_dse 0x6a5 +-#define XK_Ukrainian_i 0x6a6 +-#define XK_Ukranian_i 0x6a6 /* deprecated */ +-#define XK_Ukrainian_yi 0x6a7 +-#define XK_Ukranian_yi 0x6a7 /* deprecated */ +-#define XK_Cyrillic_je 0x6a8 +-#define XK_Serbian_je 0x6a8 /* deprecated */ +-#define XK_Cyrillic_lje 0x6a9 +-#define XK_Serbian_lje 0x6a9 /* deprecated */ +-#define XK_Cyrillic_nje 0x6aa +-#define XK_Serbian_nje 0x6aa /* deprecated */ +-#define XK_Serbian_tshe 0x6ab +-#define XK_Macedonia_kje 0x6ac +-#define XK_Byelorussian_shortu 0x6ae +-#define XK_Cyrillic_dzhe 0x6af +-#define XK_Serbian_dze 0x6af /* deprecated */ +-#define XK_numerosign 0x6b0 +-#define XK_Serbian_DJE 0x6b1 +-#define XK_Macedonia_GJE 0x6b2 +-#define XK_Cyrillic_IO 0x6b3 +-#define XK_Ukrainian_IE 0x6b4 +-#define XK_Ukranian_JE 0x6b4 /* deprecated */ +-#define XK_Macedonia_DSE 0x6b5 +-#define XK_Ukrainian_I 0x6b6 +-#define XK_Ukranian_I 0x6b6 /* deprecated */ +-#define XK_Ukrainian_YI 0x6b7 +-#define XK_Ukranian_YI 0x6b7 /* deprecated */ +-#define XK_Cyrillic_JE 0x6b8 +-#define XK_Serbian_JE 0x6b8 /* deprecated */ +-#define XK_Cyrillic_LJE 0x6b9 +-#define XK_Serbian_LJE 0x6b9 /* deprecated */ +-#define XK_Cyrillic_NJE 0x6ba +-#define XK_Serbian_NJE 0x6ba /* deprecated */ +-#define XK_Serbian_TSHE 0x6bb +-#define XK_Macedonia_KJE 0x6bc +-#define XK_Byelorussian_SHORTU 0x6be +-#define XK_Cyrillic_DZHE 0x6bf +-#define XK_Serbian_DZE 0x6bf /* deprecated */ +-#define XK_Cyrillic_yu 0x6c0 +-#define XK_Cyrillic_a 0x6c1 +-#define XK_Cyrillic_be 0x6c2 +-#define XK_Cyrillic_tse 0x6c3 +-#define XK_Cyrillic_de 0x6c4 +-#define XK_Cyrillic_ie 0x6c5 +-#define XK_Cyrillic_ef 0x6c6 +-#define XK_Cyrillic_ghe 0x6c7 +-#define XK_Cyrillic_ha 0x6c8 +-#define XK_Cyrillic_i 0x6c9 +-#define XK_Cyrillic_shorti 0x6ca +-#define XK_Cyrillic_ka 0x6cb +-#define XK_Cyrillic_el 0x6cc +-#define XK_Cyrillic_em 0x6cd +-#define XK_Cyrillic_en 0x6ce +-#define XK_Cyrillic_o 0x6cf +-#define XK_Cyrillic_pe 0x6d0 +-#define XK_Cyrillic_ya 0x6d1 +-#define XK_Cyrillic_er 0x6d2 +-#define XK_Cyrillic_es 0x6d3 +-#define XK_Cyrillic_te 0x6d4 +-#define XK_Cyrillic_u 0x6d5 +-#define XK_Cyrillic_zhe 0x6d6 +-#define XK_Cyrillic_ve 0x6d7 +-#define XK_Cyrillic_softsign 0x6d8 +-#define XK_Cyrillic_yeru 0x6d9 +-#define XK_Cyrillic_ze 0x6da +-#define XK_Cyrillic_sha 0x6db +-#define XK_Cyrillic_e 0x6dc +-#define XK_Cyrillic_shcha 0x6dd +-#define XK_Cyrillic_che 0x6de +-#define XK_Cyrillic_hardsign 0x6df +-#define XK_Cyrillic_YU 0x6e0 +-#define XK_Cyrillic_A 0x6e1 +-#define XK_Cyrillic_BE 0x6e2 +-#define XK_Cyrillic_TSE 0x6e3 +-#define XK_Cyrillic_DE 0x6e4 +-#define XK_Cyrillic_IE 0x6e5 +-#define XK_Cyrillic_EF 0x6e6 +-#define XK_Cyrillic_GHE 0x6e7 +-#define XK_Cyrillic_HA 0x6e8 +-#define XK_Cyrillic_I 0x6e9 +-#define XK_Cyrillic_SHORTI 0x6ea +-#define XK_Cyrillic_KA 0x6eb +-#define XK_Cyrillic_EL 0x6ec +-#define XK_Cyrillic_EM 0x6ed +-#define XK_Cyrillic_EN 0x6ee +-#define XK_Cyrillic_O 0x6ef +-#define XK_Cyrillic_PE 0x6f0 +-#define XK_Cyrillic_YA 0x6f1 +-#define XK_Cyrillic_ER 0x6f2 +-#define XK_Cyrillic_ES 0x6f3 +-#define XK_Cyrillic_TE 0x6f4 +-#define XK_Cyrillic_U 0x6f5 +-#define XK_Cyrillic_ZHE 0x6f6 +-#define XK_Cyrillic_VE 0x6f7 +-#define XK_Cyrillic_SOFTSIGN 0x6f8 +-#define XK_Cyrillic_YERU 0x6f9 +-#define XK_Cyrillic_ZE 0x6fa +-#define XK_Cyrillic_SHA 0x6fb +-#define XK_Cyrillic_E 0x6fc +-#define XK_Cyrillic_SHCHA 0x6fd +-#define XK_Cyrillic_CHE 0x6fe +-#define XK_Cyrillic_HARDSIGN 0x6ff +-#endif /* XK_CYRILLIC */ +- +-/* +- * Greek +- * Byte 3 = 7 +- */ +- +-#ifdef XK_GREEK +-#define XK_Greek_ALPHAaccent 0x7a1 +-#define XK_Greek_EPSILONaccent 0x7a2 +-#define XK_Greek_ETAaccent 0x7a3 +-#define XK_Greek_IOTAaccent 0x7a4 +-#define XK_Greek_IOTAdieresis 0x7a5 +-#define XK_Greek_OMICRONaccent 0x7a7 +-#define XK_Greek_UPSILONaccent 0x7a8 +-#define XK_Greek_UPSILONdieresis 0x7a9 +-#define XK_Greek_OMEGAaccent 0x7ab +-#define XK_Greek_accentdieresis 0x7ae +-#define XK_Greek_horizbar 0x7af +-#define XK_Greek_alphaaccent 0x7b1 +-#define XK_Greek_epsilonaccent 0x7b2 +-#define XK_Greek_etaaccent 0x7b3 +-#define XK_Greek_iotaaccent 0x7b4 +-#define XK_Greek_iotadieresis 0x7b5 +-#define XK_Greek_iotaaccentdieresis 0x7b6 +-#define XK_Greek_omicronaccent 0x7b7 +-#define XK_Greek_upsilonaccent 0x7b8 +-#define XK_Greek_upsilondieresis 0x7b9 +-#define XK_Greek_upsilonaccentdieresis 0x7ba +-#define XK_Greek_omegaaccent 0x7bb +-#define XK_Greek_ALPHA 0x7c1 +-#define XK_Greek_BETA 0x7c2 +-#define XK_Greek_GAMMA 0x7c3 +-#define XK_Greek_DELTA 0x7c4 +-#define XK_Greek_EPSILON 0x7c5 +-#define XK_Greek_ZETA 0x7c6 +-#define XK_Greek_ETA 0x7c7 +-#define XK_Greek_THETA 0x7c8 +-#define XK_Greek_IOTA 0x7c9 +-#define XK_Greek_KAPPA 0x7ca +-#define XK_Greek_LAMDA 0x7cb +-#define XK_Greek_LAMBDA 0x7cb +-#define XK_Greek_MU 0x7cc +-#define XK_Greek_NU 0x7cd +-#define XK_Greek_XI 0x7ce +-#define XK_Greek_OMICRON 0x7cf +-#define XK_Greek_PI 0x7d0 +-#define XK_Greek_RHO 0x7d1 +-#define XK_Greek_SIGMA 0x7d2 +-#define XK_Greek_TAU 0x7d4 +-#define XK_Greek_UPSILON 0x7d5 +-#define XK_Greek_PHI 0x7d6 +-#define XK_Greek_CHI 0x7d7 +-#define XK_Greek_PSI 0x7d8 +-#define XK_Greek_OMEGA 0x7d9 +-#define XK_Greek_alpha 0x7e1 +-#define XK_Greek_beta 0x7e2 +-#define XK_Greek_gamma 0x7e3 +-#define XK_Greek_delta 0x7e4 +-#define XK_Greek_epsilon 0x7e5 +-#define XK_Greek_zeta 0x7e6 +-#define XK_Greek_eta 0x7e7 +-#define XK_Greek_theta 0x7e8 +-#define XK_Greek_iota 0x7e9 +-#define XK_Greek_kappa 0x7ea +-#define XK_Greek_lamda 0x7eb +-#define XK_Greek_lambda 0x7eb +-#define XK_Greek_mu 0x7ec +-#define XK_Greek_nu 0x7ed +-#define XK_Greek_xi 0x7ee +-#define XK_Greek_omicron 0x7ef +-#define XK_Greek_pi 0x7f0 +-#define XK_Greek_rho 0x7f1 +-#define XK_Greek_sigma 0x7f2 +-#define XK_Greek_finalsmallsigma 0x7f3 +-#define XK_Greek_tau 0x7f4 +-#define XK_Greek_upsilon 0x7f5 +-#define XK_Greek_phi 0x7f6 +-#define XK_Greek_chi 0x7f7 +-#define XK_Greek_psi 0x7f8 +-#define XK_Greek_omega 0x7f9 +-#define XK_Greek_switch 0xFF7E /* Alias for mode_switch */ +-#endif /* XK_GREEK */ +- +-/* +- * Technical +- * Byte 3 = 8 +- */ +- +-#ifdef XK_TECHNICAL +-#define XK_leftradical 0x8a1 +-#define XK_topleftradical 0x8a2 +-#define XK_horizconnector 0x8a3 +-#define XK_topintegral 0x8a4 +-#define XK_botintegral 0x8a5 +-#define XK_vertconnector 0x8a6 +-#define XK_topleftsqbracket 0x8a7 +-#define XK_botleftsqbracket 0x8a8 +-#define XK_toprightsqbracket 0x8a9 +-#define XK_botrightsqbracket 0x8aa +-#define XK_topleftparens 0x8ab +-#define XK_botleftparens 0x8ac +-#define XK_toprightparens 0x8ad +-#define XK_botrightparens 0x8ae +-#define XK_leftmiddlecurlybrace 0x8af +-#define XK_rightmiddlecurlybrace 0x8b0 +-#define XK_topleftsummation 0x8b1 +-#define XK_botleftsummation 0x8b2 +-#define XK_topvertsummationconnector 0x8b3 +-#define XK_botvertsummationconnector 0x8b4 +-#define XK_toprightsummation 0x8b5 +-#define XK_botrightsummation 0x8b6 +-#define XK_rightmiddlesummation 0x8b7 +-#define XK_lessthanequal 0x8bc +-#define XK_notequal 0x8bd +-#define XK_greaterthanequal 0x8be +-#define XK_integral 0x8bf +-#define XK_therefore 0x8c0 +-#define XK_variation 0x8c1 +-#define XK_infinity 0x8c2 +-#define XK_nabla 0x8c5 +-#define XK_approximate 0x8c8 +-#define XK_similarequal 0x8c9 +-#define XK_ifonlyif 0x8cd +-#define XK_implies 0x8ce +-#define XK_identical 0x8cf +-#define XK_radical 0x8d6 +-#define XK_includedin 0x8da +-#define XK_includes 0x8db +-#define XK_intersection 0x8dc +-#define XK_union 0x8dd +-#define XK_logicaland 0x8de +-#define XK_logicalor 0x8df +-#define XK_partialderivative 0x8ef +-#define XK_function 0x8f6 +-#define XK_leftarrow 0x8fb +-#define XK_uparrow 0x8fc +-#define XK_rightarrow 0x8fd +-#define XK_downarrow 0x8fe +-#endif /* XK_TECHNICAL */ +- +-/* +- * Special +- * Byte 3 = 9 +- */ +- +-#ifdef XK_SPECIAL +-#define XK_blank 0x9df +-#define XK_soliddiamond 0x9e0 +-#define XK_checkerboard 0x9e1 +-#define XK_ht 0x9e2 +-#define XK_ff 0x9e3 +-#define XK_cr 0x9e4 +-#define XK_lf 0x9e5 +-#define XK_nl 0x9e8 +-#define XK_vt 0x9e9 +-#define XK_lowrightcorner 0x9ea +-#define XK_uprightcorner 0x9eb +-#define XK_upleftcorner 0x9ec +-#define XK_lowleftcorner 0x9ed +-#define XK_crossinglines 0x9ee +-#define XK_horizlinescan1 0x9ef +-#define XK_horizlinescan3 0x9f0 +-#define XK_horizlinescan5 0x9f1 +-#define XK_horizlinescan7 0x9f2 +-#define XK_horizlinescan9 0x9f3 +-#define XK_leftt 0x9f4 +-#define XK_rightt 0x9f5 +-#define XK_bott 0x9f6 +-#define XK_topt 0x9f7 +-#define XK_vertbar 0x9f8 +-#endif /* XK_SPECIAL */ +- +-/* +- * Publishing +- * Byte 3 = a +- */ +- +-#ifdef XK_PUBLISHING +-#define XK_emspace 0xaa1 +-#define XK_enspace 0xaa2 +-#define XK_em3space 0xaa3 +-#define XK_em4space 0xaa4 +-#define XK_digitspace 0xaa5 +-#define XK_punctspace 0xaa6 +-#define XK_thinspace 0xaa7 +-#define XK_hairspace 0xaa8 +-#define XK_emdash 0xaa9 +-#define XK_endash 0xaaa +-#define XK_signifblank 0xaac +-#define XK_ellipsis 0xaae +-#define XK_doubbaselinedot 0xaaf +-#define XK_onethird 0xab0 +-#define XK_twothirds 0xab1 +-#define XK_onefifth 0xab2 +-#define XK_twofifths 0xab3 +-#define XK_threefifths 0xab4 +-#define XK_fourfifths 0xab5 +-#define XK_onesixth 0xab6 +-#define XK_fivesixths 0xab7 +-#define XK_careof 0xab8 +-#define XK_figdash 0xabb +-#define XK_leftanglebracket 0xabc +-#define XK_decimalpoint 0xabd +-#define XK_rightanglebracket 0xabe +-#define XK_marker 0xabf +-#define XK_oneeighth 0xac3 +-#define XK_threeeighths 0xac4 +-#define XK_fiveeighths 0xac5 +-#define XK_seveneighths 0xac6 +-#define XK_trademark 0xac9 +-#define XK_signaturemark 0xaca +-#define XK_trademarkincircle 0xacb +-#define XK_leftopentriangle 0xacc +-#define XK_rightopentriangle 0xacd +-#define XK_emopencircle 0xace +-#define XK_emopenrectangle 0xacf +-#define XK_leftsinglequotemark 0xad0 +-#define XK_rightsinglequotemark 0xad1 +-#define XK_leftdoublequotemark 0xad2 +-#define XK_rightdoublequotemark 0xad3 +-#define XK_prescription 0xad4 +-#define XK_minutes 0xad6 +-#define XK_seconds 0xad7 +-#define XK_latincross 0xad9 +-#define XK_hexagram 0xada +-#define XK_filledrectbullet 0xadb +-#define XK_filledlefttribullet 0xadc +-#define XK_filledrighttribullet 0xadd +-#define XK_emfilledcircle 0xade +-#define XK_emfilledrect 0xadf +-#define XK_enopencircbullet 0xae0 +-#define XK_enopensquarebullet 0xae1 +-#define XK_openrectbullet 0xae2 +-#define XK_opentribulletup 0xae3 +-#define XK_opentribulletdown 0xae4 +-#define XK_openstar 0xae5 +-#define XK_enfilledcircbullet 0xae6 +-#define XK_enfilledsqbullet 0xae7 +-#define XK_filledtribulletup 0xae8 +-#define XK_filledtribulletdown 0xae9 +-#define XK_leftpointer 0xaea +-#define XK_rightpointer 0xaeb +-#define XK_club 0xaec +-#define XK_diamond 0xaed +-#define XK_heart 0xaee +-#define XK_maltesecross 0xaf0 +-#define XK_dagger 0xaf1 +-#define XK_doubledagger 0xaf2 +-#define XK_checkmark 0xaf3 +-#define XK_ballotcross 0xaf4 +-#define XK_musicalsharp 0xaf5 +-#define XK_musicalflat 0xaf6 +-#define XK_malesymbol 0xaf7 +-#define XK_femalesymbol 0xaf8 +-#define XK_telephone 0xaf9 +-#define XK_telephonerecorder 0xafa +-#define XK_phonographcopyright 0xafb +-#define XK_caret 0xafc +-#define XK_singlelowquotemark 0xafd +-#define XK_doublelowquotemark 0xafe +-#define XK_cursor 0xaff +-#endif /* XK_PUBLISHING */ +- +-/* +- * APL +- * Byte 3 = b +- */ +- +-#ifdef XK_APL +-#define XK_leftcaret 0xba3 +-#define XK_rightcaret 0xba6 +-#define XK_downcaret 0xba8 +-#define XK_upcaret 0xba9 +-#define XK_overbar 0xbc0 +-#define XK_downtack 0xbc2 +-#define XK_upshoe 0xbc3 +-#define XK_downstile 0xbc4 +-#define XK_underbar 0xbc6 +-#define XK_jot 0xbca +-#define XK_quad 0xbcc +-#define XK_uptack 0xbce +-#define XK_circle 0xbcf +-#define XK_upstile 0xbd3 +-#define XK_downshoe 0xbd6 +-#define XK_rightshoe 0xbd8 +-#define XK_leftshoe 0xbda +-#define XK_lefttack 0xbdc +-#define XK_righttack 0xbfc +-#endif /* XK_APL */ +- +-/* +- * Hebrew +- * Byte 3 = c +- */ +- +-#ifdef XK_HEBREW +-#define XK_hebrew_doublelowline 0xcdf +-#define XK_hebrew_aleph 0xce0 +-#define XK_hebrew_bet 0xce1 +-#define XK_hebrew_beth 0xce1 /* deprecated */ +-#define XK_hebrew_gimel 0xce2 +-#define XK_hebrew_gimmel 0xce2 /* deprecated */ +-#define XK_hebrew_dalet 0xce3 +-#define XK_hebrew_daleth 0xce3 /* deprecated */ +-#define XK_hebrew_he 0xce4 +-#define XK_hebrew_waw 0xce5 +-#define XK_hebrew_zain 0xce6 +-#define XK_hebrew_zayin 0xce6 /* deprecated */ +-#define XK_hebrew_chet 0xce7 +-#define XK_hebrew_het 0xce7 /* deprecated */ +-#define XK_hebrew_tet 0xce8 +-#define XK_hebrew_teth 0xce8 /* deprecated */ +-#define XK_hebrew_yod 0xce9 +-#define XK_hebrew_finalkaph 0xcea +-#define XK_hebrew_kaph 0xceb +-#define XK_hebrew_lamed 0xcec +-#define XK_hebrew_finalmem 0xced +-#define XK_hebrew_mem 0xcee +-#define XK_hebrew_finalnun 0xcef +-#define XK_hebrew_nun 0xcf0 +-#define XK_hebrew_samech 0xcf1 +-#define XK_hebrew_samekh 0xcf1 /* deprecated */ +-#define XK_hebrew_ayin 0xcf2 +-#define XK_hebrew_finalpe 0xcf3 +-#define XK_hebrew_pe 0xcf4 +-#define XK_hebrew_finalzade 0xcf5 +-#define XK_hebrew_finalzadi 0xcf5 /* deprecated */ +-#define XK_hebrew_zade 0xcf6 +-#define XK_hebrew_zadi 0xcf6 /* deprecated */ +-#define XK_hebrew_qoph 0xcf7 +-#define XK_hebrew_kuf 0xcf7 /* deprecated */ +-#define XK_hebrew_resh 0xcf8 +-#define XK_hebrew_shin 0xcf9 +-#define XK_hebrew_taw 0xcfa +-#define XK_hebrew_taf 0xcfa /* deprecated */ +-#define XK_Hebrew_switch 0xFF7E /* Alias for mode_switch */ +-#endif /* XK_HEBREW */ +- +-/* +- * Thai +- * Byte 3 = d +- */ +- +-#ifdef XK_THAI +-#define XK_Thai_kokai 0xda1 +-#define XK_Thai_khokhai 0xda2 +-#define XK_Thai_khokhuat 0xda3 +-#define XK_Thai_khokhwai 0xda4 +-#define XK_Thai_khokhon 0xda5 +-#define XK_Thai_khorakhang 0xda6 +-#define XK_Thai_ngongu 0xda7 +-#define XK_Thai_chochan 0xda8 +-#define XK_Thai_choching 0xda9 +-#define XK_Thai_chochang 0xdaa +-#define XK_Thai_soso 0xdab +-#define XK_Thai_chochoe 0xdac +-#define XK_Thai_yoying 0xdad +-#define XK_Thai_dochada 0xdae +-#define XK_Thai_topatak 0xdaf +-#define XK_Thai_thothan 0xdb0 +-#define XK_Thai_thonangmontho 0xdb1 +-#define XK_Thai_thophuthao 0xdb2 +-#define XK_Thai_nonen 0xdb3 +-#define XK_Thai_dodek 0xdb4 +-#define XK_Thai_totao 0xdb5 +-#define XK_Thai_thothung 0xdb6 +-#define XK_Thai_thothahan 0xdb7 +-#define XK_Thai_thothong 0xdb8 +-#define XK_Thai_nonu 0xdb9 +-#define XK_Thai_bobaimai 0xdba +-#define XK_Thai_popla 0xdbb +-#define XK_Thai_phophung 0xdbc +-#define XK_Thai_fofa 0xdbd +-#define XK_Thai_phophan 0xdbe +-#define XK_Thai_fofan 0xdbf +-#define XK_Thai_phosamphao 0xdc0 +-#define XK_Thai_moma 0xdc1 +-#define XK_Thai_yoyak 0xdc2 +-#define XK_Thai_rorua 0xdc3 +-#define XK_Thai_ru 0xdc4 +-#define XK_Thai_loling 0xdc5 +-#define XK_Thai_lu 0xdc6 +-#define XK_Thai_wowaen 0xdc7 +-#define XK_Thai_sosala 0xdc8 +-#define XK_Thai_sorusi 0xdc9 +-#define XK_Thai_sosua 0xdca +-#define XK_Thai_hohip 0xdcb +-#define XK_Thai_lochula 0xdcc +-#define XK_Thai_oang 0xdcd +-#define XK_Thai_honokhuk 0xdce +-#define XK_Thai_paiyannoi 0xdcf +-#define XK_Thai_saraa 0xdd0 +-#define XK_Thai_maihanakat 0xdd1 +-#define XK_Thai_saraaa 0xdd2 +-#define XK_Thai_saraam 0xdd3 +-#define XK_Thai_sarai 0xdd4 +-#define XK_Thai_saraii 0xdd5 +-#define XK_Thai_saraue 0xdd6 +-#define XK_Thai_sarauee 0xdd7 +-#define XK_Thai_sarau 0xdd8 +-#define XK_Thai_sarauu 0xdd9 +-#define XK_Thai_phinthu 0xdda +-#define XK_Thai_maihanakat_maitho 0xdde +-#define XK_Thai_baht 0xddf +-#define XK_Thai_sarae 0xde0 +-#define XK_Thai_saraae 0xde1 +-#define XK_Thai_sarao 0xde2 +-#define XK_Thai_saraaimaimuan 0xde3 +-#define XK_Thai_saraaimaimalai 0xde4 +-#define XK_Thai_lakkhangyao 0xde5 +-#define XK_Thai_maiyamok 0xde6 +-#define XK_Thai_maitaikhu 0xde7 +-#define XK_Thai_maiek 0xde8 +-#define XK_Thai_maitho 0xde9 +-#define XK_Thai_maitri 0xdea +-#define XK_Thai_maichattawa 0xdeb +-#define XK_Thai_thanthakhat 0xdec +-#define XK_Thai_nikhahit 0xded +-#define XK_Thai_leksun 0xdf0 +-#define XK_Thai_leknung 0xdf1 +-#define XK_Thai_leksong 0xdf2 +-#define XK_Thai_leksam 0xdf3 +-#define XK_Thai_leksi 0xdf4 +-#define XK_Thai_lekha 0xdf5 +-#define XK_Thai_lekhok 0xdf6 +-#define XK_Thai_lekchet 0xdf7 +-#define XK_Thai_lekpaet 0xdf8 +-#define XK_Thai_lekkao 0xdf9 +-#endif /* XK_THAI */ +- +-/* +- * Korean +- * Byte 3 = e +- */ +- +-#ifdef XK_KOREAN +- +-#define XK_Hangul 0xff31 /* Hangul start/stop(toggle) */ +-#define XK_Hangul_Start 0xff32 /* Hangul start */ +-#define XK_Hangul_End 0xff33 /* Hangul end, English start */ +-#define XK_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */ +-#define XK_Hangul_Jamo 0xff35 /* Hangul Jamo mode */ +-#define XK_Hangul_Romaja 0xff36 /* Hangul Romaja mode */ +-#define XK_Hangul_Codeinput 0xff37 /* Hangul code input mode */ +-#define XK_Hangul_Jeonja 0xff38 /* Jeonja mode */ +-#define XK_Hangul_Banja 0xff39 /* Banja mode */ +-#define XK_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */ +-#define XK_Hangul_PostHanja 0xff3b /* Post Hanja conversion */ +-#define XK_Hangul_SingleCandidate 0xff3c /* Single candidate */ +-#define XK_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */ +-#define XK_Hangul_PreviousCandidate 0xff3e /* Previous candidate */ +-#define XK_Hangul_Special 0xff3f /* Special symbols */ +-#define XK_Hangul_switch 0xFF7E /* Alias for mode_switch */ +- +-/* Hangul Consonant Characters */ +-#define XK_Hangul_Kiyeog 0xea1 +-#define XK_Hangul_SsangKiyeog 0xea2 +-#define XK_Hangul_KiyeogSios 0xea3 +-#define XK_Hangul_Nieun 0xea4 +-#define XK_Hangul_NieunJieuj 0xea5 +-#define XK_Hangul_NieunHieuh 0xea6 +-#define XK_Hangul_Dikeud 0xea7 +-#define XK_Hangul_SsangDikeud 0xea8 +-#define XK_Hangul_Rieul 0xea9 +-#define XK_Hangul_RieulKiyeog 0xeaa +-#define XK_Hangul_RieulMieum 0xeab +-#define XK_Hangul_RieulPieub 0xeac +-#define XK_Hangul_RieulSios 0xead +-#define XK_Hangul_RieulTieut 0xeae +-#define XK_Hangul_RieulPhieuf 0xeaf +-#define XK_Hangul_RieulHieuh 0xeb0 +-#define XK_Hangul_Mieum 0xeb1 +-#define XK_Hangul_Pieub 0xeb2 +-#define XK_Hangul_SsangPieub 0xeb3 +-#define XK_Hangul_PieubSios 0xeb4 +-#define XK_Hangul_Sios 0xeb5 +-#define XK_Hangul_SsangSios 0xeb6 +-#define XK_Hangul_Ieung 0xeb7 +-#define XK_Hangul_Jieuj 0xeb8 +-#define XK_Hangul_SsangJieuj 0xeb9 +-#define XK_Hangul_Cieuc 0xeba +-#define XK_Hangul_Khieuq 0xebb +-#define XK_Hangul_Tieut 0xebc +-#define XK_Hangul_Phieuf 0xebd +-#define XK_Hangul_Hieuh 0xebe +- +-/* Hangul Vowel Characters */ +-#define XK_Hangul_A 0xebf +-#define XK_Hangul_AE 0xec0 +-#define XK_Hangul_YA 0xec1 +-#define XK_Hangul_YAE 0xec2 +-#define XK_Hangul_EO 0xec3 +-#define XK_Hangul_E 0xec4 +-#define XK_Hangul_YEO 0xec5 +-#define XK_Hangul_YE 0xec6 +-#define XK_Hangul_O 0xec7 +-#define XK_Hangul_WA 0xec8 +-#define XK_Hangul_WAE 0xec9 +-#define XK_Hangul_OE 0xeca +-#define XK_Hangul_YO 0xecb +-#define XK_Hangul_U 0xecc +-#define XK_Hangul_WEO 0xecd +-#define XK_Hangul_WE 0xece +-#define XK_Hangul_WI 0xecf +-#define XK_Hangul_YU 0xed0 +-#define XK_Hangul_EU 0xed1 +-#define XK_Hangul_YI 0xed2 +-#define XK_Hangul_I 0xed3 +- +-/* Hangul syllable-final (JongSeong) Characters */ +-#define XK_Hangul_J_Kiyeog 0xed4 +-#define XK_Hangul_J_SsangKiyeog 0xed5 +-#define XK_Hangul_J_KiyeogSios 0xed6 +-#define XK_Hangul_J_Nieun 0xed7 +-#define XK_Hangul_J_NieunJieuj 0xed8 +-#define XK_Hangul_J_NieunHieuh 0xed9 +-#define XK_Hangul_J_Dikeud 0xeda +-#define XK_Hangul_J_Rieul 0xedb +-#define XK_Hangul_J_RieulKiyeog 0xedc +-#define XK_Hangul_J_RieulMieum 0xedd +-#define XK_Hangul_J_RieulPieub 0xede +-#define XK_Hangul_J_RieulSios 0xedf +-#define XK_Hangul_J_RieulTieut 0xee0 +-#define XK_Hangul_J_RieulPhieuf 0xee1 +-#define XK_Hangul_J_RieulHieuh 0xee2 +-#define XK_Hangul_J_Mieum 0xee3 +-#define XK_Hangul_J_Pieub 0xee4 +-#define XK_Hangul_J_PieubSios 0xee5 +-#define XK_Hangul_J_Sios 0xee6 +-#define XK_Hangul_J_SsangSios 0xee7 +-#define XK_Hangul_J_Ieung 0xee8 +-#define XK_Hangul_J_Jieuj 0xee9 +-#define XK_Hangul_J_Cieuc 0xeea +-#define XK_Hangul_J_Khieuq 0xeeb +-#define XK_Hangul_J_Tieut 0xeec +-#define XK_Hangul_J_Phieuf 0xeed +-#define XK_Hangul_J_Hieuh 0xeee +- +-/* Ancient Hangul Consonant Characters */ +-#define XK_Hangul_RieulYeorinHieuh 0xeef +-#define XK_Hangul_SunkyeongeumMieum 0xef0 +-#define XK_Hangul_SunkyeongeumPieub 0xef1 +-#define XK_Hangul_PanSios 0xef2 +-#define XK_Hangul_KkogjiDalrinIeung 0xef3 +-#define XK_Hangul_SunkyeongeumPhieuf 0xef4 +-#define XK_Hangul_YeorinHieuh 0xef5 +- +-/* Ancient Hangul Vowel Characters */ +-#define XK_Hangul_AraeA 0xef6 +-#define XK_Hangul_AraeAE 0xef7 +- +-/* Ancient Hangul syllable-final (JongSeong) Characters */ +-#define XK_Hangul_J_PanSios 0xef8 +-#define XK_Hangul_J_KkogjiDalrinIeung 0xef9 +-#define XK_Hangul_J_YeorinHieuh 0xefa +- +-/* Korean currency symbol */ +-#define XK_Korean_Won 0xeff +- +-#endif /* XK_KOREAN */ +- +-/* Euro currency symbol */ +-#define XK_EuroSign 0x20ac +- +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfb.h b/remmina-plugins/vnc/libvncserver/rfb/rfb.h +deleted file mode 100644 +index 7c15bd8..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfb/rfb.h ++++ /dev/null +@@ -1,1182 +0,0 @@ +-#ifndef RFB_H +-#define RFB_H +-/** +- * @defgroup libvncserver_api LibVNCServer API Reference +- * @{ +- */ +- +-/** +- * @file rfb.h +- */ +- +-/* +- * Copyright (C) 2005 Rohit Kumar , +- * Johannes E. Schindelin +- * Copyright (C) 2002 RealVNC Ltd. +- * OSXvnc Copyright (C) 2001 Dan McGuirk . +- * Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge. +- * All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-#if(defined __cplusplus) +-extern "C" +-{ +-#endif +- +-#include +-#include +-#include +-#include +- +-#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H +-#include +-#endif +- +-#ifdef __MINGW32__ +-#undef SOCKET +-#include +-#endif +- +-#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD +-#include +-#if 0 /* debugging */ +-#define LOCK(mutex) (rfbLog("%s:%d LOCK(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_lock(&(mutex))) +-#define UNLOCK(mutex) (rfbLog("%s:%d UNLOCK(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_unlock(&(mutex))) +-#define MUTEX(mutex) pthread_mutex_t (mutex) +-#define INIT_MUTEX(mutex) (rfbLog("%s:%d INIT_MUTEX(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_init(&(mutex),NULL)) +-#define TINI_MUTEX(mutex) (rfbLog("%s:%d TINI_MUTEX(%s)\n",__FILE__,__LINE__,#mutex), pthread_mutex_destroy(&(mutex))) +-#define TSIGNAL(cond) (rfbLog("%s:%d TSIGNAL(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_signal(&(cond))) +-#define WAIT(cond,mutex) (rfbLog("%s:%d WAIT(%s,%s)\n",__FILE__,__LINE__,#cond,#mutex), pthread_cond_wait(&(cond),&(mutex))) +-#define COND(cond) pthread_cond_t (cond) +-#define INIT_COND(cond) (rfbLog("%s:%d INIT_COND(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_init(&(cond),NULL)) +-#define TINI_COND(cond) (rfbLog("%s:%d TINI_COND(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_destroy(&(cond))) +-#define IF_PTHREADS(x) x +-#else +-#if !NONETWORK +-#define LOCK(mutex) pthread_mutex_lock(&(mutex)); +-#define UNLOCK(mutex) pthread_mutex_unlock(&(mutex)); +-#endif +-#define MUTEX(mutex) pthread_mutex_t (mutex) +-#define INIT_MUTEX(mutex) pthread_mutex_init(&(mutex),NULL) +-#define TINI_MUTEX(mutex) pthread_mutex_destroy(&(mutex)) +-#define TSIGNAL(cond) pthread_cond_signal(&(cond)) +-#define WAIT(cond,mutex) pthread_cond_wait(&(cond),&(mutex)) +-#define COND(cond) pthread_cond_t (cond) +-#define INIT_COND(cond) pthread_cond_init(&(cond),NULL) +-#define TINI_COND(cond) pthread_cond_destroy(&(cond)) +-#define IF_PTHREADS(x) x +-#endif +-#else +-#define LOCK(mutex) +-#define UNLOCK(mutex) +-#define MUTEX(mutex) +-#define INIT_MUTEX(mutex) +-#define TINI_MUTEX(mutex) +-#define TSIGNAL(cond) +-#define WAIT(cond,mutex) this_is_unsupported +-#define COND(cond) +-#define INIT_COND(cond) +-#define TINI_COND(cond) +-#define IF_PTHREADS(x) +-#endif +- +-/* end of stuff for autoconf */ +- +-/* if you use pthreads, but don't define LIBVNCSERVER_HAVE_LIBPTHREAD, the structs +- get all mixed up. So this gives a linker error reminding you to compile +- the library and your application (at least the parts including rfb.h) +- with the same support for pthreads. */ +-#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-#define rfbInitServer rfbInitServerWithPthreadsAndZRLE +-#else +-#define rfbInitServer rfbInitServerWithPthreadsButWithoutZRLE +-#endif +-#else +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-#define rfbInitServer rfbInitServerWithoutPthreadsButWithZRLE +-#else +-#define rfbInitServer rfbInitServerWithoutPthreadsAndZRLE +-#endif +-#endif +- +-struct _rfbClientRec; +-struct _rfbScreenInfo; +-struct rfbCursor; +- +-enum rfbNewClientAction { +- RFB_CLIENT_ACCEPT, +- RFB_CLIENT_ON_HOLD, +- RFB_CLIENT_REFUSE +-}; +- +-enum rfbSocketState { +- RFB_SOCKET_INIT, +- RFB_SOCKET_READY, +- RFB_SOCKET_SHUTDOWN +-}; +- +-typedef void (*rfbKbdAddEventProcPtr) (rfbBool down, rfbKeySym keySym, struct _rfbClientRec* cl); +-typedef void (*rfbKbdReleaseAllKeysProcPtr) (struct _rfbClientRec* cl); +-typedef void (*rfbPtrAddEventProcPtr) (int buttonMask, int x, int y, struct _rfbClientRec* cl); +-typedef void (*rfbSetXCutTextProcPtr) (char* str,int len, struct _rfbClientRec* cl); +-typedef struct rfbCursor* (*rfbGetCursorProcPtr) (struct _rfbClientRec* pScreen); +-typedef rfbBool (*rfbSetTranslateFunctionProcPtr)(struct _rfbClientRec* cl); +-typedef rfbBool (*rfbPasswordCheckProcPtr)(struct _rfbClientRec* cl,const char* encryptedPassWord,int len); +-typedef enum rfbNewClientAction (*rfbNewClientHookPtr)(struct _rfbClientRec* cl); +-typedef void (*rfbDisplayHookPtr)(struct _rfbClientRec* cl); +-typedef void (*rfbDisplayFinishedHookPtr)(struct _rfbClientRec* cl, int result); +-/** support the capability to view the caps/num/scroll states of the X server */ +-typedef int (*rfbGetKeyboardLedStateHookPtr)(struct _rfbScreenInfo* screen); +-typedef rfbBool (*rfbXvpHookPtr)(struct _rfbClientRec* cl, uint8_t, uint8_t); +-/** +- * If x==1 and y==1 then set the whole display +- * else find the window underneath x and y and set the framebuffer to the dimensions +- * of that window +- */ +-typedef void (*rfbSetSingleWindowProcPtr) (struct _rfbClientRec* cl, int x, int y); +-/** +- * Status determines if the X11 server permits input from the local user +- * status==0 or 1 +- */ +-typedef void (*rfbSetServerInputProcPtr) (struct _rfbClientRec* cl, int status); +-/** +- * Permit the server to allow or deny filetransfers. This is defaulted to deny +- * It is called when a client initiates a connection to determine if it is permitted. +- */ +-typedef int (*rfbFileTransferPermitted) (struct _rfbClientRec* cl); +-/** Handle the textchat messages */ +-typedef void (*rfbSetTextChat) (struct _rfbClientRec* cl, int length, char *string); +- +-typedef struct { +- uint32_t count; +- rfbBool is16; /**< is the data format short? */ +- union { +- uint8_t* bytes; +- uint16_t* shorts; +- } data; /**< there have to be count*3 entries */ +-} rfbColourMap; +- +-/** +- * Security handling (RFB protocol version 3.7) +- */ +- +-typedef struct _rfbSecurity { +- uint8_t type; +- void (*handler)(struct _rfbClientRec* cl); +- struct _rfbSecurity* next; +-} rfbSecurityHandler; +- +-/** +- * Protocol extension handling. +- */ +- +-typedef struct _rfbProtocolExtension { +- /** returns FALSE if extension should be deactivated for client. +- if newClient == NULL, it is always deactivated. */ +- rfbBool (*newClient)(struct _rfbClientRec* client, void** data); +- /** returns FALSE if extension should be deactivated for client. +- if init == NULL, it stays activated. */ +- rfbBool (*init)(struct _rfbClientRec* client, void* data); +- /** if pseudoEncodings is not NULL, it contains a 0 terminated +- list of the pseudo encodings handled by this extension. */ +- int *pseudoEncodings; +- /** returns TRUE if that pseudo encoding is handled by the extension. +- encodingNumber==0 means "reset encodings". */ +- rfbBool (*enablePseudoEncoding)(struct _rfbClientRec* client, +- void** data, int encodingNumber); +- /** returns TRUE if message was handled */ +- rfbBool (*handleMessage)(struct _rfbClientRec* client, +- void* data, +- const rfbClientToServerMsg* message); +- void (*close)(struct _rfbClientRec* client, void* data); +- void (*usage)(void); +- /** processArguments returns the number of handled arguments */ +- int (*processArgument)(int argc, char *argv[]); +- struct _rfbProtocolExtension* next; +-} rfbProtocolExtension; +- +-typedef struct _rfbExtensionData { +- rfbProtocolExtension* extension; +- void* data; +- struct _rfbExtensionData* next; +-} rfbExtensionData; +- +-/** +- * Per-screen (framebuffer) structure. There can be as many as you wish, +- * each serving different clients. However, you have to call +- * rfbProcessEvents for each of these. +- */ +- +-typedef struct _rfbScreenInfo +-{ +- /** this structure has children that are scaled versions of this screen */ +- struct _rfbScreenInfo *scaledScreenNext; +- int scaledScreenRefCount; +- +- int width; +- int paddedWidthInBytes; +- int height; +- int depth; +- int bitsPerPixel; +- int sizeInBytes; +- +- rfbPixel blackPixel; +- rfbPixel whitePixel; +- +- /** +- * some screen specific data can be put into a struct where screenData +- * points to. You need this if you have more than one screen at the +- * same time while using the same functions. +- */ +- void* screenData; +- +- /* additions by libvncserver */ +- +- rfbPixelFormat serverFormat; +- rfbColourMap colourMap; /**< set this if rfbServerFormat.trueColour==FALSE */ +- const char* desktopName; +- char thisHost[255]; +- +- rfbBool autoPort; +- int port; +- SOCKET listenSock; +- int maxSock; +- int maxFd; +-#ifdef __MINGW32__ +- struct fd_set allFds; +-#else +- fd_set allFds; +-#endif +- +- enum rfbSocketState socketState; +- SOCKET inetdSock; +- rfbBool inetdInitDone; +- +- int udpPort; +- SOCKET udpSock; +- struct _rfbClientRec* udpClient; +- rfbBool udpSockConnected; +- struct sockaddr_in udpRemoteAddr; +- +- int maxClientWait; +- +- /* http stuff */ +- rfbBool httpInitDone; +- rfbBool httpEnableProxyConnect; +- int httpPort; +- char* httpDir; +- SOCKET httpListenSock; +- SOCKET httpSock; +- +- rfbPasswordCheckProcPtr passwordCheck; +- void* authPasswdData; +- /** If rfbAuthPasswdData is given a list, this is the first +- view only password. */ +- int authPasswdFirstViewOnly; +- +- /** send only this many rectangles in one update */ +- int maxRectsPerUpdate; +- /** this is the amount of milliseconds to wait at least before sending +- * an update. */ +- int deferUpdateTime; +-#ifdef TODELETE +- char* screen; +-#endif +- rfbBool alwaysShared; +- rfbBool neverShared; +- rfbBool dontDisconnect; +- struct _rfbClientRec* clientHead; +- struct _rfbClientRec* pointerClient; /**< "Mutex" for pointer events */ +- +- +- /* cursor */ +- int cursorX, cursorY,underCursorBufferLen; +- char* underCursorBuffer; +- rfbBool dontConvertRichCursorToXCursor; +- struct rfbCursor* cursor; +- +- /** +- * the frameBuffer has to be supplied by the serving process. +- * The buffer will not be freed by +- */ +- char* frameBuffer; +- rfbKbdAddEventProcPtr kbdAddEvent; +- rfbKbdReleaseAllKeysProcPtr kbdReleaseAllKeys; +- rfbPtrAddEventProcPtr ptrAddEvent; +- rfbSetXCutTextProcPtr setXCutText; +- rfbGetCursorProcPtr getCursorPtr; +- rfbSetTranslateFunctionProcPtr setTranslateFunction; +- rfbSetSingleWindowProcPtr setSingleWindow; +- rfbSetServerInputProcPtr setServerInput; +- rfbFileTransferPermitted getFileTransferPermission; +- rfbSetTextChat setTextChat; +- +- /** newClientHook is called just after a new client is created */ +- rfbNewClientHookPtr newClientHook; +- /** displayHook is called just before a frame buffer update */ +- rfbDisplayHookPtr displayHook; +- +- /** These hooks are called to pass keyboard state back to the client */ +- rfbGetKeyboardLedStateHookPtr getKeyboardLedStateHook; +- +-#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD +- MUTEX(cursorMutex); +- rfbBool backgroundLoop; +-#endif +- +- /** if TRUE, an ignoring signal handler is installed for SIGPIPE */ +- rfbBool ignoreSIGPIPE; +- +- /** if not zero, only a slice of this height is processed every time +- * an update should be sent. This should make working on a slow +- * link more interactive. */ +- int progressiveSliceHeight; +- +- in_addr_t listenInterface; +- int deferPtrUpdateTime; +- +- /** handle as many input events as possible (default off) */ +- rfbBool handleEventsEagerly; +- +- /** rfbEncodingServerIdentity */ +- char *versionString; +- +- /** What does the server tell the new clients which version it supports */ +- int protocolMajorVersion; +- int protocolMinorVersion; +- +- /** command line authorization of file transfers */ +- rfbBool permitFileTransfer; +- +- /** displayFinishedHook is called just after a frame buffer update */ +- rfbDisplayFinishedHookPtr displayFinishedHook; +- /** xvpHook is called to handle an xvp client message */ +- rfbXvpHookPtr xvpHook; +-} rfbScreenInfo, *rfbScreenInfoPtr; +- +- +-/** +- * rfbTranslateFnType is the type of translation functions. +- */ +- +-typedef void (*rfbTranslateFnType)(char *table, rfbPixelFormat *in, +- rfbPixelFormat *out, +- char *iptr, char *optr, +- int bytesBetweenInputLines, +- int width, int height); +- +- +-/* region stuff */ +- +-struct sraRegion; +-typedef struct sraRegion* sraRegionPtr; +- +-/* +- * Per-client structure. +- */ +- +-typedef void (*ClientGoneHookPtr)(struct _rfbClientRec* cl); +- +-typedef struct _rfbFileTransferData { +- int fd; +- int compressionEnabled; +- int fileSize; +- int numPackets; +- int receiving; +- int sending; +-} rfbFileTransferData; +- +- +-typedef struct _rfbStatList { +- uint32_t type; +- uint32_t sentCount; +- uint32_t bytesSent; +- uint32_t bytesSentIfRaw; +- uint32_t rcvdCount; +- uint32_t bytesRcvd; +- uint32_t bytesRcvdIfRaw; +- struct _rfbStatList *Next; +-} rfbStatList; +- +-typedef struct _rfbClientRec { +- +- /** back pointer to the screen */ +- rfbScreenInfoPtr screen; +- +- /** points to a scaled version of the screen buffer in cl->scaledScreenList */ +- rfbScreenInfoPtr scaledScreen; +- /** how did the client tell us it wanted the screen changed? Ultra style or palm style? */ +- rfbBool PalmVNC; +- +- +- /** private data. You should put any application client specific data +- * into a struct and let clientData point to it. Don't forget to +- * free the struct via clientGoneHook! +- * +- * This is useful if the IO functions have to behave client specific. +- */ +- void* clientData; +- ClientGoneHookPtr clientGoneHook; +- +- SOCKET sock; +- char *host; +- +- /* RFB protocol minor version number */ +- int protocolMajorVersion; +- int protocolMinorVersion; +- +-#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD +- pthread_t client_thread; +-#endif +- /** Possible client states: */ +- enum { +- RFB_PROTOCOL_VERSION, /**< establishing protocol version */ +- RFB_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */ +- RFB_AUTHENTICATION, /**< authenticating */ +- RFB_INITIALISATION, /**< sending initialisation messages */ +- RFB_NORMAL /**< normal protocol messages */ +- } state; +- +- rfbBool reverseConnection; +- rfbBool onHold; +- rfbBool readyForSetColourMapEntries; +- rfbBool useCopyRect; +- int preferredEncoding; +- int correMaxWidth, correMaxHeight; +- +- rfbBool viewOnly; +- +- /* The following member is only used during VNC authentication */ +- uint8_t authChallenge[CHALLENGESIZE]; +- +- /* The following members represent the update needed to get the client's +- framebuffer from its present state to the current state of our +- framebuffer. +- +- If the client does not accept CopyRect encoding then the update is +- simply represented as the region of the screen which has been modified +- (modifiedRegion). +- +- If the client does accept CopyRect encoding, then the update consists of +- two parts. First we have a single copy from one region of the screen to +- another (the destination of the copy is copyRegion), and second we have +- the region of the screen which has been modified in some other way +- (modifiedRegion). +- +- Although the copy is of a single region, this region may have many +- rectangles. When sending an update, the copyRegion is always sent +- before the modifiedRegion. This is because the modifiedRegion may +- overlap parts of the screen which are in the source of the copy. +- +- In fact during normal processing, the modifiedRegion may even overlap +- the destination copyRegion. Just before an update is sent we remove +- from the copyRegion anything in the modifiedRegion. */ +- +- sraRegionPtr copyRegion; /**< the destination region of the copy */ +- int copyDX, copyDY; /**< the translation by which the copy happens */ +- +- sraRegionPtr modifiedRegion; +- +- /** As part of the FramebufferUpdateRequest, a client can express interest +- in a subrectangle of the whole framebuffer. This is stored in the +- requestedRegion member. In the normal case this is the whole +- framebuffer if the client is ready, empty if it's not. */ +- +- sraRegionPtr requestedRegion; +- +- /** The following member represents the state of the "deferred update" timer +- - when the framebuffer is modified and the client is ready, in most +- cases it is more efficient to defer sending the update by a few +- milliseconds so that several changes to the framebuffer can be combined +- into a single update. */ +- +- struct timeval startDeferring; +- struct timeval startPtrDeferring; +- int lastPtrX; +- int lastPtrY; +- int lastPtrButtons; +- +- /** translateFn points to the translation function which is used to copy +- and translate a rectangle from the framebuffer to an output buffer. */ +- +- rfbTranslateFnType translateFn; +- char *translateLookupTable; +- rfbPixelFormat format; +- +- /** +- * UPDATE_BUF_SIZE must be big enough to send at least one whole line of the +- * framebuffer. So for a max screen width of say 2K with 32-bit pixels this +- * means 8K minimum. +- */ +- +-#define UPDATE_BUF_SIZE 30000 +- +- char updateBuf[UPDATE_BUF_SIZE]; +- int ublen; +- +- /* statistics */ +- struct _rfbStatList *statEncList; +- struct _rfbStatList *statMsgList; +- int rawBytesEquivalent; +- int bytesSent; +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- /* zlib encoding -- necessary compression state info per client */ +- +- struct z_stream_s compStream; +- rfbBool compStreamInited; +- uint32_t zlibCompressLevel; +- /** the quality level is also used by ZYWRLE */ +- int tightQualityLevel; +- +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +- /* tight encoding -- preserve zlib streams' state for each client */ +- z_stream zsStruct[4]; +- rfbBool zsActive[4]; +- int zsLevel[4]; +- int tightCompressLevel; +-#endif +-#endif +- +- /* Ultra Encoding support */ +- rfbBool compStreamInitedLZO; +- char *lzoWrkMem; +- +- rfbFileTransferData fileTransfer; +- +- int lastKeyboardLedState; /**< keep track of last value so we can send *change* events */ +- rfbBool enableSupportedMessages; /**< client supports SupportedMessages encoding */ +- rfbBool enableSupportedEncodings; /**< client supports SupportedEncodings encoding */ +- rfbBool enableServerIdentity; /**< client supports ServerIdentity encoding */ +- rfbBool enableKeyboardLedState; /**< client supports KeyboardState encoding */ +- rfbBool enableLastRectEncoding; /**< client supports LastRect encoding */ +- rfbBool enableCursorShapeUpdates; /**< client supports cursor shape updates */ +- rfbBool enableCursorPosUpdates; /**< client supports cursor position updates */ +- rfbBool useRichCursorEncoding; /**< rfbEncodingRichCursor is preferred */ +- rfbBool cursorWasChanged; /**< cursor shape update should be sent */ +- rfbBool cursorWasMoved; /**< cursor position update should be sent */ +- int cursorX,cursorY; /**< the coordinates of the cursor, +- if enableCursorShapeUpdates = FALSE */ +- +- rfbBool useNewFBSize; /**< client supports NewFBSize encoding */ +- rfbBool newFBSizePending; /**< framebuffer size was changed */ +- +- struct _rfbClientRec *prev; +- struct _rfbClientRec *next; +- +-#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD +- /** whenever a client is referenced, the refCount has to be incremented +- and afterwards decremented, so that the client is not cleaned up +- while being referenced. +- Use the functions rfbIncrClientRef(cl) and rfbDecrClientRef(cl); +- */ +- int refCount; +- MUTEX(refCountMutex); +- COND(deleteCond); +- +- MUTEX(outputMutex); +- MUTEX(updateMutex); +- COND(updateCond); +-#endif +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- void* zrleData; +- int zywrleLevel; +- int zywrleBuf[rfbZRLETileWidth * rfbZRLETileHeight]; +-#endif +- +- /** if progressive updating is on, this variable holds the current +- * y coordinate of the progressive slice. */ +- int progressiveSliceY; +- +- rfbExtensionData* extensions; +- +- /** for threaded zrle */ +- char *zrleBeforeBuf; +- void *paletteHelper; +- +- /** for thread safety for rfbSendFBUpdate() */ +-#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD +-#define LIBVNCSERVER_SEND_MUTEX +- MUTEX(sendMutex); +-#endif +- +- /* buffers to hold pixel data before and after encoding. +- per-client for thread safety */ +- char *beforeEncBuf; +- int beforeEncBufSize; +- char *afterEncBuf; +- int afterEncBufSize; +- int afterEncBufLen; +-} rfbClientRec, *rfbClientPtr; +- +-/** +- * This macro is used to test whether there is a framebuffer update needing to +- * be sent to the client. +- */ +- +-#define FB_UPDATE_PENDING(cl) \ +- (((cl)->enableCursorShapeUpdates && (cl)->cursorWasChanged) || \ +- (((cl)->enableCursorShapeUpdates == FALSE && \ +- ((cl)->cursorX != (cl)->screen->cursorX || \ +- (cl)->cursorY != (cl)->screen->cursorY))) || \ +- ((cl)->useNewFBSize && (cl)->newFBSizePending) || \ +- ((cl)->enableCursorPosUpdates && (cl)->cursorWasMoved) || \ +- !sraRgnEmpty((cl)->copyRegion) || !sraRgnEmpty((cl)->modifiedRegion)) +- +-/* +- * Macros for endian swapping. +- */ +- +-#define Swap16(s) ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) +- +-#define Swap24(l) ((((l) & 0xff) << 16) | (((l) >> 16) & 0xff) | \ +- (((l) & 0x00ff00))) +- +-#define Swap32(l) (((l) >> 24) | \ +- (((l) & 0x00ff0000) >> 8) | \ +- (((l) & 0x0000ff00) << 8) | \ +- ((l) << 24)) +- +- +-extern char rfbEndianTest; +- +-#define Swap16IfLE(s) (rfbEndianTest ? Swap16(s) : (s)) +-#define Swap24IfLE(l) (rfbEndianTest ? Swap24(l) : (l)) +-#define Swap32IfLE(l) (rfbEndianTest ? Swap32(l) : (l)) +- +-/* UltraVNC uses some windows structures unmodified, so the viewer expects LittleEndian Data */ +-#define Swap16IfBE(s) (rfbEndianTest ? (s) : Swap16(s)) +-#define Swap24IfBE(l) (rfbEndianTest ? (l) : Swap24(l)) +-#define Swap32IfBE(l) (rfbEndianTest ? (l) : Swap32(l)) +- +-/* sockets.c */ +- +-extern int rfbMaxClientWait; +- +-extern void rfbInitSockets(rfbScreenInfoPtr rfbScreen); +-extern void rfbShutdownSockets(rfbScreenInfoPtr rfbScreen); +-extern void rfbDisconnectUDPSock(rfbScreenInfoPtr rfbScreen); +-extern void rfbCloseClient(rfbClientPtr cl); +-extern int rfbReadExact(rfbClientPtr cl, char *buf, int len); +-extern int rfbReadExactTimeout(rfbClientPtr cl, char *buf, int len,int timeout); +-extern int rfbWriteExact(rfbClientPtr cl, const char *buf, int len); +-extern int rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec); +-extern int rfbConnect(rfbScreenInfoPtr rfbScreen, char* host, int port); +-extern int rfbConnectToTcpAddr(char* host, int port); +-extern int rfbListenOnTCPPort(int port, in_addr_t iface); +-extern int rfbListenOnUDPPort(int port, in_addr_t iface); +-extern int rfbStringToAddr(char* string,in_addr_t* addr); +-extern rfbBool rfbSetNonBlocking(int sock); +- +-/* rfbserver.c */ +- +-/* Routines to iterate over the client list in a thread-safe way. +- Only a single iterator can be in use at a time process-wide. */ +-typedef struct rfbClientIterator *rfbClientIteratorPtr; +- +-extern void rfbClientListInit(rfbScreenInfoPtr rfbScreen); +-extern rfbClientIteratorPtr rfbGetClientIterator(rfbScreenInfoPtr rfbScreen); +-extern rfbClientPtr rfbClientIteratorNext(rfbClientIteratorPtr iterator); +-extern void rfbReleaseClientIterator(rfbClientIteratorPtr iterator); +-extern void rfbIncrClientRef(rfbClientPtr cl); +-extern void rfbDecrClientRef(rfbClientPtr cl); +- +-extern void rfbNewClientConnection(rfbScreenInfoPtr rfbScreen,int sock); +-extern rfbClientPtr rfbNewClient(rfbScreenInfoPtr rfbScreen,int sock); +-extern rfbClientPtr rfbNewUDPClient(rfbScreenInfoPtr rfbScreen); +-extern rfbClientPtr rfbReverseConnection(rfbScreenInfoPtr rfbScreen,char *host, int port); +-extern void rfbClientConnectionGone(rfbClientPtr cl); +-extern void rfbProcessClientMessage(rfbClientPtr cl); +-extern void rfbClientConnFailed(rfbClientPtr cl, char *reason); +-extern void rfbNewUDPConnection(rfbScreenInfoPtr rfbScreen,int sock); +-extern void rfbProcessUDPInput(rfbScreenInfoPtr rfbScreen); +-extern rfbBool rfbSendFramebufferUpdate(rfbClientPtr cl, sraRegionPtr updateRegion); +-extern rfbBool rfbSendRectEncodingRaw(rfbClientPtr cl, int x,int y,int w,int h); +-extern rfbBool rfbSendUpdateBuf(rfbClientPtr cl); +-extern void rfbSendServerCutText(rfbScreenInfoPtr rfbScreen,char *str, int len); +-extern rfbBool rfbSendCopyRegion(rfbClientPtr cl,sraRegionPtr reg,int dx,int dy); +-extern rfbBool rfbSendLastRectMarker(rfbClientPtr cl); +-extern rfbBool rfbSendNewFBSize(rfbClientPtr cl, int w, int h); +-extern rfbBool rfbSendSetColourMapEntries(rfbClientPtr cl, int firstColour, int nColours); +-extern void rfbSendBell(rfbScreenInfoPtr rfbScreen); +- +-extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length); +-extern rfbBool rfbSendFileTransferChunk(rfbClientPtr cl); +-extern rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer); +-extern rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, char *buffer); +-extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length); +-extern rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length); +- +-void rfbGotXCutText(rfbScreenInfoPtr rfbScreen, char *str, int len); +- +-/* translate.c */ +- +-extern rfbBool rfbEconomicTranslate; +- +-extern void rfbTranslateNone(char *table, rfbPixelFormat *in, +- rfbPixelFormat *out, +- char *iptr, char *optr, +- int bytesBetweenInputLines, +- int width, int height); +-extern rfbBool rfbSetTranslateFunction(rfbClientPtr cl); +-extern rfbBool rfbSetClientColourMap(rfbClientPtr cl, int firstColour, int nColours); +-extern void rfbSetClientColourMaps(rfbScreenInfoPtr rfbScreen, int firstColour, int nColours); +- +-/* httpd.c */ +- +-extern void rfbHttpInitSockets(rfbScreenInfoPtr rfbScreen); +-extern void rfbHttpShutdownSockets(rfbScreenInfoPtr rfbScreen); +-extern void rfbHttpCheckFds(rfbScreenInfoPtr rfbScreen); +- +- +- +-/* auth.c */ +- +-extern void rfbAuthNewClient(rfbClientPtr cl); +-extern void rfbProcessClientSecurityType(rfbClientPtr cl); +-extern void rfbAuthProcessClientMessage(rfbClientPtr cl); +-extern void rfbRegisterSecurityHandler(rfbSecurityHandler* handler); +-extern void rfbUnregisterSecurityHandler(rfbSecurityHandler* handler); +- +-/* rre.c */ +- +-extern rfbBool rfbSendRectEncodingRRE(rfbClientPtr cl, int x,int y,int w,int h); +- +- +-/* corre.c */ +- +-extern rfbBool rfbSendRectEncodingCoRRE(rfbClientPtr cl, int x,int y,int w,int h); +- +- +-/* hextile.c */ +- +-extern rfbBool rfbSendRectEncodingHextile(rfbClientPtr cl, int x, int y, int w, +- int h); +- +-/* ultra.c */ +- +-/* Set maximum ultra rectangle size in pixels. Always allow at least +- * two scan lines. +- */ +-#define ULTRA_MAX_RECT_SIZE (128*256) +-#define ULTRA_MAX_SIZE(min) ((( min * 2 ) > ULTRA_MAX_RECT_SIZE ) ? \ +- ( min * 2 ) : ULTRA_MAX_RECT_SIZE ) +- +-extern rfbBool rfbSendRectEncodingUltra(rfbClientPtr cl, int x,int y,int w,int h); +- +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-/* zlib.c */ +- +-/** Minimum zlib rectangle size in bytes. Anything smaller will +- * not compress well due to overhead. +- */ +-#define VNC_ENCODE_ZLIB_MIN_COMP_SIZE (17) +- +-/* Set maximum zlib rectangle size in pixels. Always allow at least +- * two scan lines. +- */ +-#define ZLIB_MAX_RECT_SIZE (128*256) +-#define ZLIB_MAX_SIZE(min) ((( min * 2 ) > ZLIB_MAX_RECT_SIZE ) ? \ +- ( min * 2 ) : ZLIB_MAX_RECT_SIZE ) +- +-extern rfbBool rfbSendRectEncodingZlib(rfbClientPtr cl, int x, int y, int w, +- int h); +- +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +-/* tight.c */ +- +-#define TIGHT_DEFAULT_COMPRESSION 6 +- +-extern rfbBool rfbTightDisableGradient; +- +-extern int rfbNumCodedRectsTight(rfbClientPtr cl, int x,int y,int w,int h); +-extern rfbBool rfbSendRectEncodingTight(rfbClientPtr cl, int x,int y,int w,int h); +- +-#endif +-#endif +- +- +-/* cursor.c */ +- +-typedef struct rfbCursor { +- /** set this to true if LibVNCServer has to free this cursor */ +- rfbBool cleanup, cleanupSource, cleanupMask, cleanupRichSource; +- unsigned char *source; /**< points to bits */ +- unsigned char *mask; /**< points to bits */ +- unsigned short width, height, xhot, yhot; /**< metrics */ +- unsigned short foreRed, foreGreen, foreBlue; /**< device-independent colour */ +- unsigned short backRed, backGreen, backBlue; /**< device-independent colour */ +- unsigned char *richSource; /**< source bytes for a rich cursor */ +- unsigned char *alphaSource; /**< source for alpha blending info */ +- rfbBool alphaPreMultiplied; /**< if richSource already has alpha applied */ +-} rfbCursor, *rfbCursorPtr; +-extern unsigned char rfbReverseByte[0x100]; +- +-extern rfbBool rfbSendCursorShape(rfbClientPtr cl/*, rfbScreenInfoPtr pScreen*/); +-extern rfbBool rfbSendCursorPos(rfbClientPtr cl); +-extern void rfbConvertLSBCursorBitmapOrMask(int width,int height,unsigned char* bitmap); +-extern rfbCursorPtr rfbMakeXCursor(int width,int height,char* cursorString,char* maskString); +-extern char* rfbMakeMaskForXCursor(int width,int height,char* cursorString); +-extern char* rfbMakeMaskFromAlphaSource(int width,int height,unsigned char* alphaSource); +-extern void rfbMakeXCursorFromRichCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor); +-extern void rfbMakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor); +-extern void rfbFreeCursor(rfbCursorPtr cursor); +-extern void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c); +- +-/** cursor handling for the pointer */ +-extern void rfbDefaultPtrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl); +- +-/* zrle.c */ +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-extern rfbBool rfbSendRectEncodingZRLE(rfbClientPtr cl, int x, int y, int w,int h); +-#endif +- +-/* stats.c */ +- +-extern void rfbResetStats(rfbClientPtr cl); +-extern void rfbPrintStats(rfbClientPtr cl); +- +-/* font.c */ +- +-typedef struct rfbFontData { +- unsigned char* data; +- /** +- metaData is a 256*5 array: +- for each character +- (offset,width,height,x,y) +- */ +- int* metaData; +-} rfbFontData,* rfbFontDataPtr; +- +-int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,rfbPixel colour); +-void rfbDrawString(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,rfbPixel colour); +-/** if colour==backColour, background is transparent */ +-int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour); +-void rfbDrawStringWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour); +-int rfbWidthOfString(rfbFontDataPtr font,const char* string); +-int rfbWidthOfChar(rfbFontDataPtr font,unsigned char c); +-void rfbFontBBox(rfbFontDataPtr font,unsigned char c,int* x1,int* y1,int* x2,int* y2); +-/** this returns the smallest box enclosing any character of font. */ +-void rfbWholeFontBBox(rfbFontDataPtr font,int *x1, int *y1, int *x2, int *y2); +- +-/** dynamically load a linux console font (4096 bytes, 256 glyphs a 8x16 */ +-rfbFontDataPtr rfbLoadConsoleFont(char *filename); +-/** free a dynamically loaded font */ +-void rfbFreeFont(rfbFontDataPtr font); +- +-/* draw.c */ +- +-void rfbFillRect(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col); +-void rfbDrawPixel(rfbScreenInfoPtr s,int x,int y,rfbPixel col); +-void rfbDrawLine(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col); +- +-/* selbox.c */ +- +-/** this opens a modal select box. list is an array of strings, the end marked +- with a NULL. +- It returns the index in the list or -1 if cancelled or something else +- wasn't kosher. */ +-typedef void (*SelectionChangedHookPtr)(int _index); +-extern int rfbSelectBox(rfbScreenInfoPtr rfbScreen, +- rfbFontDataPtr font, char** list, +- int x1, int y1, int x2, int y2, +- rfbPixel foreColour, rfbPixel backColour, +- int border,SelectionChangedHookPtr selChangedHook); +- +-/* cargs.c */ +- +-extern void rfbUsage(void); +-extern void rfbPurgeArguments(int* argc,int* position,int count,char *argv[]); +-extern rfbBool rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[]); +-extern rfbBool rfbProcessSizeArguments(int* width,int* height,int* bpp,int* argc, char *argv[]); +- +-/* main.c */ +- +-extern void rfbLogEnable(int enabled); +-typedef void (*rfbLogProc)(const char *format, ...); +-extern rfbLogProc rfbLog, rfbErr; +-extern void rfbLogPerror(const char *str); +- +-void rfbScheduleCopyRect(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2,int dx,int dy); +-void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy); +- +-void rfbDoCopyRect(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2,int dx,int dy); +-void rfbDoCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy); +- +-void rfbMarkRectAsModified(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2); +-void rfbMarkRegionAsModified(rfbScreenInfoPtr rfbScreen,sraRegionPtr modRegion); +-void rfbDoNothingWithClient(rfbClientPtr cl); +-enum rfbNewClientAction defaultNewClientHook(rfbClientPtr cl); +-void rfbRegisterProtocolExtension(rfbProtocolExtension* extension); +-void rfbUnregisterProtocolExtension(rfbProtocolExtension* extension); +-struct _rfbProtocolExtension* rfbGetExtensionIterator(); +-void rfbReleaseExtensionIterator(); +-rfbBool rfbEnableExtension(rfbClientPtr cl, rfbProtocolExtension* extension, +- void* data); +-rfbBool rfbDisableExtension(rfbClientPtr cl, rfbProtocolExtension* extension); +-void* rfbGetExtensionClientData(rfbClientPtr cl, rfbProtocolExtension* extension); +- +-/** to check against plain passwords */ +-rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len); +- +-/* functions to make a vnc server */ +-extern rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv, +- int width,int height,int bitsPerSample,int samplesPerPixel, +- int bytesPerPixel); +-extern void rfbInitServer(rfbScreenInfoPtr rfbScreen); +-extern void rfbShutdownServer(rfbScreenInfoPtr rfbScreen,rfbBool disconnectClients); +-extern void rfbNewFramebuffer(rfbScreenInfoPtr rfbScreen,char *framebuffer, +- int width,int height, int bitsPerSample,int samplesPerPixel, +- int bytesPerPixel); +- +-extern void rfbScreenCleanup(rfbScreenInfoPtr screenInfo); +-extern void rfbSetServerVersionIdentity(rfbScreenInfoPtr screen, char *fmt, ...); +- +-/* functions to accept/refuse a client that has been put on hold +- by a NewClientHookPtr function. Must not be called in other +- situations. */ +-extern void rfbStartOnHoldClient(rfbClientPtr cl); +-extern void rfbRefuseOnHoldClient(rfbClientPtr cl); +- +-/* call one of these two functions to service the vnc clients. +- usec are the microseconds the select on the fds waits. +- if you are using the event loop, set this to some value > 0, so the +- server doesn't get a high load just by listening. +- rfbProcessEvents() returns TRUE if an update was pending. */ +- +-extern void rfbRunEventLoop(rfbScreenInfoPtr screenInfo, long usec, rfbBool runInBackground); +-extern rfbBool rfbProcessEvents(rfbScreenInfoPtr screenInfo,long usec); +-extern rfbBool rfbIsActive(rfbScreenInfoPtr screenInfo); +- +-/* TightVNC file transfer extension */ +-void rfbRegisterTightVNCFileTransferExtension(); +-void rfbUnregisterTightVNCFileTransferExtension(); +- +-/* Statistics */ +-extern char *messageNameServer2Client(uint32_t type, char *buf, int len); +-extern char *messageNameClient2Server(uint32_t type, char *buf, int len); +-extern char *encodingName(uint32_t enc, char *buf, int len); +- +-extern rfbStatList *rfbStatLookupEncoding(rfbClientPtr cl, uint32_t type); +-extern rfbStatList *rfbStatLookupMessage(rfbClientPtr cl, uint32_t type); +- +-/* Each call to rfbStatRecord* adds one to the rect count for that type */ +-extern void rfbStatRecordEncodingSent(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); +-extern void rfbStatRecordEncodingSentAdd(rfbClientPtr cl, uint32_t type, int byteCount); /* Specifically for tight encoding */ +-extern void rfbStatRecordEncodingRcvd(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); +-extern void rfbStatRecordMessageSent(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); +-extern void rfbStatRecordMessageRcvd(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); +-extern void rfbResetStats(rfbClientPtr cl); +-extern void rfbPrintStats(rfbClientPtr cl); +- +-extern int rfbStatGetSentBytes(rfbClientPtr cl); +-extern int rfbStatGetSentBytesIfRaw(rfbClientPtr cl); +-extern int rfbStatGetRcvdBytes(rfbClientPtr cl); +-extern int rfbStatGetRcvdBytesIfRaw(rfbClientPtr cl); +-extern int rfbStatGetMessageCountSent(rfbClientPtr cl, uint32_t type); +-extern int rfbStatGetMessageCountRcvd(rfbClientPtr cl, uint32_t type); +-extern int rfbStatGetEncodingCountSent(rfbClientPtr cl, uint32_t type); +-extern int rfbStatGetEncodingCountRcvd(rfbClientPtr cl, uint32_t type); +- +-/** Set which version you want to advertise 3.3, 3.6, 3.7 and 3.8 are currently supported*/ +-extern void rfbSetProtocolVersion(rfbScreenInfoPtr rfbScreen, int major_, int minor_); +- +-/** send a TextChat message to a client */ +-extern rfbBool rfbSendTextChatMessage(rfbClientPtr cl, uint32_t length, char *buffer); +- +- +- +- +-#if(defined __cplusplus) +-} +-#endif +- +-/** +- * @} +- */ +- +- +-/** +- @page libvncserver_doc LibVNCServer Documentation +- @section create_server Creating a server instance +- To make a server, you just have to initialise a server structure using the +- function rfbGetScreen(), like +- @code +- rfbScreenInfoPtr screen = +- rfbGetScreen(argc,argv,screenwidth,screenheight,8,3,bpp); +- @endcode +- where byte per pixel should be 1, 2 or 4. If performance doesn't matter, +- you may try bpp=3 (internally one cannot use native data types in this +- case; if you want to use this, look at pnmshow24.c). +- +- You then can set hooks and io functions (see @ref making_it_interactive) or other +- options (see @ref server_options). +- +- And you allocate the frame buffer like this: +- @code +- screen->frameBuffer = (char*)malloc(screenwidth*screenheight*bpp); +- @endcode +- After that, you initialize the server, like +- @code +- rfbInitServer(screen); +- @endcode +- You can use a blocking event loop, a background (pthread based) event loop, +- or implement your own using the rfbProcessEvents() function. +- +- @subsection server_options Optional Server Features +- +- These options have to be set between rfbGetScreen() and rfbInitServer(). +- +- If you already have a socket to talk to, just set rfbScreenInfo::inetdSock +- (originally this is for inetd handling, but why not use it for your purpose?). +- +- To also start an HTTP server (running on port 5800+display_number), you have +- to set rfbScreenInfo::httpDir to a directory containing vncviewer.jar and +- index.vnc (like the included "classes" directory). +- +- @section making_it_interactive Making it interactive +- +- Whenever you draw something, you have to call +- @code +- rfbMarkRectAsModified(screen,x1,y1,x2,y2). +- @endcode +- This tells LibVNCServer to send updates to all connected clients. +- +- There exist the following IO functions as members of rfbScreen: +- rfbScreenInfo::kbdAddEvent(), rfbScreenInfo::kbdReleaseAllKeys(), rfbScreenInfo::ptrAddEvent() and rfbScreenInfo::setXCutText() +- +- rfbScreenInfo::kbdAddEvent() +- is called when a key is pressed. +- rfbScreenInfo::kbdReleaseAllKeys() +- is not called at all (maybe in the future). +- rfbScreenInfo::ptrAddEvent() +- is called when the mouse moves or a button is pressed. +- WARNING: if you want to have proper cursor handling, call +- rfbDefaultPtrAddEvent() +- in your own function. This sets the coordinates of the cursor. +- rfbScreenInfo::setXCutText() +- is called when the selection changes. +- +- There are only two hooks: +- rfbScreenInfo::newClientHook() +- is called when a new client has connected. +- rfbScreenInfo::displayHook() +- is called just before a frame buffer update is sent. +- +- You can also override the following methods: +- rfbScreenInfo::getCursorPtr() +- This could be used to make an animated cursor (if you really want ...) +- rfbScreenInfo::setTranslateFunction() +- If you insist on colour maps or something more obscure, you have to +- implement this. Default is a trueColour mapping. +- +- @section cursor_handling Cursor handling +- +- The screen holds a pointer +- rfbScreenInfo::cursor +- to the current cursor. Whenever you set it, remember that any dynamically +- created cursor (like return value from rfbMakeXCursor()) is not free'd! +- +- The rfbCursor structure consists mainly of a mask and a source. The rfbCursor::mask +- describes, which pixels are drawn for the cursor (a cursor needn't be +- rectangular). The rfbCursor::source describes, which colour those pixels should have. +- +- The standard is an XCursor: a cursor with a foreground and a background +- colour (stored in backRed,backGreen,backBlue and the same for foreground +- in a range from 0-0xffff). Therefore, the arrays "mask" and "source" +- contain pixels as single bits stored in bytes in MSB order. The rows are +- padded, such that each row begins with a new byte (i.e. a 10x4 +- cursor's mask has 2x4 bytes, because 2 bytes are needed to hold 10 bits). +- +- It is however very easy to make a cursor like this: +- @code +- char* cur=" " +- " xx " +- " x " +- " "; +- char* mask="xxxx" +- "xxxx" +- "xxxx" +- "xxx "; +- rfbCursorPtr c=rfbMakeXCursor(4,4,cur,mask); +- @endcode +- You can even set rfbCursor::mask to NULL in this call and LibVNCServer will calculate +- a mask for you (dynamically, so you have to free it yourself). +- +- There is also an array named rfbCursor::richSource for colourful cursors. They have +- the same format as the frameBuffer (i.e. if the server is 32 bit, +- a 10x4 cursor has 4x10x4 bytes). +- +- @section screen_client_difference What is the difference between rfbScreenInfoPtr and rfbClientPtr? +- +- The rfbScreenInfoPtr is a pointer to a rfbScreenInfo structure, which +- holds information about the server, like pixel format, io functions, +- frame buffer etc. The rfbClientPtr is a pointer to an rfbClientRec structure, which holds +- information about a client, like pixel format, socket of the +- connection, etc. A server can have several clients, but needn't have any. So, if you +- have a server and three clients are connected, you have one instance +- of a rfbScreenInfo and three instances of rfbClientRec's. +- +- The rfbClientRec structure holds a member rfbClientRec::screen which points to the server. +- So, to access the server from the client structure, you use client->screen. +- +- To access all clients from a server be sure to use the provided iterator +- rfbGetClientIterator() +- with +- rfbClientIteratorNext() +- and +- rfbReleaseClientIterator() +- to prevent thread clashes. +- +- @section example_code Example Code +- +- There are two documented examples included: +- - example.c, a shared scribble sheet +- - pnmshow.c, a program to show PNMs (pictures) over the net. +- +- The examples are not too well documented, but easy straight forward and a +- good starting point. +- +- Try example.c: it outputs on which port it listens (default: 5900), so it is +- display 0. To view, call @code vncviewer :0 @endcode +- You should see a sheet with a gradient and "Hello World!" written on it. Try +- to paint something. Note that everytime you click, there is some bigger blot, +- whereas when you drag the mouse while clicked you draw a line. The size of the +- blot depends on the mouse button you click. Open a second vncviewer with +- the same parameters and watch it as you paint in the other window. This also +- works over internet. You just have to know either the name or the IP of your +- machine. Then it is @code vncviewer machine.where.example.runs.com:0 @endcode +- or similar for the remote client. Now you are ready to type something. Be sure +- that your mouse sits still, because everytime the mouse moves, the cursor is +- reset to the position of the pointer! If you are done with that demo, press +- the down or up arrows. If your viewer supports it, then the dimensions of the +- sheet change. Just press Escape in the viewer. Note that the server still +- runs, even if you closed both windows. When you reconnect now, everything you +- painted and wrote is still there. You can press "Page Up" for a blank page. +- +- The demo pnmshow.c is much simpler: you either provide a filename as argument +- or pipe a file through stdin. Note that the file has to be a raw pnm/ppm file, +- i.e. a truecolour graphics. Only the Escape key is implemented. This may be +- the best starting point if you want to learn how to use LibVNCServer. You +- are confronted with the fact that the bytes per pixel can only be 8, 16 or 32. +-*/ +- +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbclient.h b/remmina-plugins/vnc/libvncserver/rfb/rfbclient.h +deleted file mode 100644 +index 9b8f3c3..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfb/rfbclient.h ++++ /dev/null +@@ -1,431 +0,0 @@ +-#ifndef RFBCLIENT_H +-#define RFBCLIENT_H +- +-/** +- * @defgroup libvncclient_api LibVNCClient API Reference +- * @{ +- */ +- +-/* +- * Copyright (C) 2000, 2001 Const Kaplinsky. All Rights Reserved. +- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/** +- * @file rfbclient.h +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +-#include +-#endif +- +-#define rfbClientSwap16IfLE(s) \ +- (*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) +- +-#define rfbClientSwap32IfLE(l) \ +- (*(char *)&client->endianTest ? ((((l) & 0xff000000) >> 24) | \ +- (((l) & 0x00ff0000) >> 8) | \ +- (((l) & 0x0000ff00) << 8) | \ +- (((l) & 0x000000ff) << 24)) : (l)) +- +-#define rfbClientSwap64IfLE(l) \ +- (*(char *)&client->endianTest ? ((((l) & 0xff00000000000000ULL) >> 56) | \ +- (((l) & 0x00ff000000000000ULL) >> 40) | \ +- (((l) & 0x0000ff0000000000ULL) >> 24) | \ +- (((l) & 0x000000ff00000000ULL) >> 8) | \ +- (((l) & 0x00000000ff000000ULL) << 8) | \ +- (((l) & 0x0000000000ff0000ULL) << 24) | \ +- (((l) & 0x000000000000ff00ULL) << 40) | \ +- (((l) & 0x00000000000000ffULL) << 56)) : (l)) +- +-#define FLASH_PORT_OFFSET 5400 +-#define LISTEN_PORT_OFFSET 5500 +-#define TUNNEL_PORT_OFFSET 5500 +-#define SERVER_PORT_OFFSET 5900 +- +-#define DEFAULT_SSH_CMD "/usr/bin/ssh" +-#define DEFAULT_TUNNEL_CMD \ +- (DEFAULT_SSH_CMD " -f -L %L:localhost:%R %H sleep 20") +-#define DEFAULT_VIA_CMD \ +- (DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20") +- +-#if(defined __cplusplus) +-extern "C" +-{ +-#endif +- +-/** vncrec */ +- +-typedef struct { +- FILE* file; +- struct timeval tv; +- rfbBool readTimestamp; +- rfbBool doNotSleep; +-} rfbVNCRec; +- +-/** client data */ +- +-typedef struct rfbClientData { +- void* tag; +- void* data; +- struct rfbClientData* next; +-} rfbClientData; +- +-/** app data (belongs into rfbClient?) */ +- +-typedef struct { +- rfbBool shareDesktop; +- rfbBool viewOnly; +- +- const char* encodingsString; +- +- rfbBool useBGR233; +- int nColours; +- rfbBool forceOwnCmap; +- rfbBool forceTrueColour; +- int requestedDepth; +- +- int compressLevel; +- int qualityLevel; +- rfbBool enableJPEG; +- rfbBool useRemoteCursor; +- rfbBool palmVNC; /**< use palmvnc specific SetScale (vs ultravnc) */ +- int scaleSetting; /**< 0 means no scale set, else 1/scaleSetting */ +-} AppData; +- +-/** For GetCredentialProc callback function to return */ +-typedef union _rfbCredential +-{ +- /** X509 (VeNCrypt) */ +- struct +- { +- char *x509CACertFile; +- char *x509CACrlFile; +- char *x509ClientCertFile; +- char *x509ClientKeyFile; +- } x509Credential; +- /** Plain (VeNCrypt), MSLogon (UltraVNC) */ +- struct +- { +- char *username; +- char *password; +- } userCredential; +-} rfbCredential; +- +-#define rfbCredentialTypeX509 1 +-#define rfbCredentialTypeUser 2 +- +-struct _rfbClient; +- +-typedef void (*HandleTextChatProc)(struct _rfbClient* client, int value, char *text); +-typedef void (*HandleXvpMsgProc)(struct _rfbClient* client, uint8_t version, uint8_t opcode); +-typedef void (*HandleKeyboardLedStateProc)(struct _rfbClient* client, int value, int pad); +-typedef rfbBool (*HandleCursorPosProc)(struct _rfbClient* client, int x, int y); +-typedef void (*SoftCursorLockAreaProc)(struct _rfbClient* client, int x, int y, int w, int h); +-typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client); +-typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h); +-typedef void (*FinishedFrameBufferUpdateProc)(struct _rfbClient* client); +-typedef char* (*GetPasswordProc)(struct _rfbClient* client); +-typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int credentialType); +-typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client); +-typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen); +-typedef void (*BellProc)(struct _rfbClient* client); +- +-typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel); +-typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y); +- +-typedef struct _rfbClient { +- uint8_t* frameBuffer; +- int width, height; +- +- int endianTest; +- +- AppData appData; +- +- const char* programName; +- char* serverHost; +- int serverPort; /**< if -1, then use file recorded by vncrec */ +- rfbBool listenSpecified; +- int listenPort, flashPort; +- +- struct { +- int x, y, w, h; +- } updateRect; +- +- /** Note that the CoRRE encoding uses this buffer and assumes it is big enough +- to hold 255 * 255 * 32 bits -> 260100 bytes. 640*480 = 307200 bytes. +- Hextile also assumes it is big enough to hold 16 * 16 * 32 bits. +- Tight encoding assumes BUFFER_SIZE is at least 16384 bytes. */ +- +-#define RFB_BUFFER_SIZE (640*480) +- char buffer[RFB_BUFFER_SIZE]; +- +- /* rfbproto.c */ +- +- int sock; +- rfbBool canUseCoRRE; +- rfbBool canUseHextile; +- char *desktopName; +- rfbPixelFormat format; +- rfbServerInitMsg si; +- +- /* sockets.c */ +-#define RFB_BUF_SIZE 8192 +- char buf[RFB_BUF_SIZE]; +- char *bufoutptr; +- int buffered; +- +- /* The zlib encoding requires expansion/decompression/deflation of the +- compressed data in the "buffer" above into another, result buffer. +- However, the size of the result buffer can be determined precisely +- based on the bitsPerPixel, height and width of the rectangle. We +- allocate this buffer one time to be the full size of the buffer. */ +- +- /* Ultra Encoding uses this buffer too */ +- +- int ultra_buffer_size; +- char *ultra_buffer; +- +- int raw_buffer_size; +- char *raw_buffer; +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- z_stream decompStream; +- rfbBool decompStreamInited; +-#endif +- +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- /* +- * Variables for the ``tight'' encoding implementation. +- */ +- +- /** Separate buffer for compressed data. */ +-#define ZLIB_BUFFER_SIZE 30000 +- char zlib_buffer[ZLIB_BUFFER_SIZE]; +- +- /* Four independent compression streams for zlib library. */ +- z_stream zlibStream[4]; +- rfbBool zlibStreamActive[4]; +- +- /* Filter stuff. Should be initialized by filter initialization code. */ +- rfbBool cutZeros; +- int rectWidth, rectColors; +- char tightPalette[256*4]; +- uint8_t tightPrevRow[2048*3*sizeof(uint16_t)]; +- +-#ifdef LIBVNCSERVER_HAVE_LIBJPEG +- /** JPEG decoder state. */ +- rfbBool jpegError; +- +- struct jpeg_source_mgr* jpegSrcManager; +- void* jpegBufferPtr; +- size_t jpegBufferLen; +- +-#endif +-#endif +- +- +- /* cursor.c */ +- uint8_t *rcSource, *rcMask; +- +- /** private data pointer */ +- rfbClientData* clientData; +- +- rfbVNCRec* vncRec; +- +- /* Keyboard State support (is 'Caps Lock' set on the remote display???) */ +- int KeyboardLedStateEnabled; +- int CurrentKeyboardLedState; +- +- int canHandleNewFBSize; +- +- /* hooks */ +- HandleTextChatProc HandleTextChat; +- HandleKeyboardLedStateProc HandleKeyboardLedState; +- HandleCursorPosProc HandleCursorPos; +- SoftCursorLockAreaProc SoftCursorLockArea; +- SoftCursorUnlockScreenProc SoftCursorUnlockScreen; +- GotFrameBufferUpdateProc GotFrameBufferUpdate; +- /** the pointer returned by GetPassword will be freed after use! */ +- GetPasswordProc GetPassword; +- MallocFrameBufferProc MallocFrameBuffer; +- GotXCutTextProc GotXCutText; +- BellProc Bell; +- +- GotCursorShapeProc GotCursorShape; +- GotCopyRectProc GotCopyRect; +- +- /** Which messages are supported by the server +- * This is a *guess* for most servers. +- * (If we can even detect the type of server) +- * +- * If the server supports the "rfbEncodingSupportedMessages" +- * then this will be updated when the encoding is received to +- * accurately reflect the servers capabilities. +- */ +- rfbSupportedMessages supportedMessages; +- +- /** negotiated protocol version */ +- int major, minor; +- +- /** The selected security types */ +- uint32_t authScheme, subAuthScheme; +- +-#ifdef LIBVNCSERVER_WITH_CLIENT_TLS +- /** The TLS session for Anonymous TLS and VeNCrypt */ +- gnutls_session_t tlsSession; +-#endif +- +- /** To support security types that requires user input (except VNC password +- * authentication), for example VeNCrypt and MSLogon, this callback function +- * must be set before the authentication. Otherwise, it implicates that the +- * caller application does not support it and related security types should +- * be bypassed. +- */ +- GetCredentialProc GetCredential; +- +- /** The 0-terminated security types supported by the client. +- * Set by function SetClientAuthSchemes() */ +- uint32_t *clientAuthSchemes; +- +- /** When the server is a repeater, this specifies the final destination */ +- char *destHost; +- int destPort; +- +- /** the QoS IP DSCP for this client */ +- int QoS_DSCP; +- +- /** hook to handle xvp server messages */ +- HandleXvpMsgProc HandleXvpMsg; +- +- /* listen.c */ +- int listenSock; +- +- FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate; +-} rfbClient; +- +-/* cursor.c */ +- +-extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc); +- +-/* listen.c */ +- +-extern void listenForIncomingConnections(rfbClient* viewer); +-extern int listenForIncomingConnectionsNoFork(rfbClient* viewer, int usec_timeout); +- +-/* rfbproto.c */ +- +-extern rfbBool rfbEnableClientLogging; +-typedef void (*rfbClientLogProc)(const char *format, ...); +-extern rfbClientLogProc rfbClientLog,rfbClientErr; +-extern rfbBool ConnectToRFBServer(rfbClient* client,const char *hostname, int port); +-extern rfbBool ConnectToRFBRepeater(rfbClient* client,const char *repeaterHost, int repeaterPort, const char *destHost, int destPort); +-extern void SetClientAuthSchemes(rfbClient* client,const uint32_t *authSchemes, int size); +-extern rfbBool InitialiseRFBConnection(rfbClient* client); +-extern rfbBool SetFormatAndEncodings(rfbClient* client); +-extern rfbBool SendIncrementalFramebufferUpdateRequest(rfbClient* client); +-extern rfbBool SendFramebufferUpdateRequest(rfbClient* client, +- int x, int y, int w, int h, +- rfbBool incremental); +-extern rfbBool SendScaleSetting(rfbClient* client,int scaleSetting); +-extern rfbBool SendPointerEvent(rfbClient* client,int x, int y, int buttonMask); +-extern rfbBool SendKeyEvent(rfbClient* client,uint32_t key, rfbBool down); +-extern rfbBool SendClientCutText(rfbClient* client,char *str, int len); +-extern rfbBool HandleRFBServerMessage(rfbClient* client); +- +-extern rfbBool TextChatSend(rfbClient* client, char *text); +-extern rfbBool TextChatOpen(rfbClient* client); +-extern rfbBool TextChatClose(rfbClient* client); +-extern rfbBool TextChatFinish(rfbClient* client); +-extern rfbBool PermitServerInput(rfbClient* client, int enabled); +-extern rfbBool SendXvpMsg(rfbClient* client, uint8_t version, uint8_t code); +- +-extern void PrintPixelFormat(rfbPixelFormat *format); +- +-extern rfbBool SupportsClient2Server(rfbClient* client, int messageType); +-extern rfbBool SupportsServer2Client(rfbClient* client, int messageType); +- +-/* client data */ +- +-void rfbClientSetClientData(rfbClient* client, void* tag, void* data); +-void* rfbClientGetClientData(rfbClient* client, void* tag); +- +-/* protocol extensions */ +- +-typedef struct _rfbClientProtocolExtension { +- int* encodings; +- /** returns TRUE if the encoding was handled */ +- rfbBool (*handleEncoding)(rfbClient* cl, +- rfbFramebufferUpdateRectHeader* rect); +- /** returns TRUE if it handled the message */ +- rfbBool (*handleMessage)(rfbClient* cl, +- rfbServerToClientMsg* message); +- struct _rfbClientProtocolExtension* next; +-} rfbClientProtocolExtension; +- +-void rfbClientRegisterExtension(rfbClientProtocolExtension* e); +- +-/* sockets.c */ +- +-extern rfbBool errorMessageOnReadFailure; +- +-extern rfbBool ReadFromRFBServer(rfbClient* client, char *out, unsigned int n); +-extern rfbBool WriteToRFBServer(rfbClient* client, char *buf, int n); +-extern int FindFreeTcpPort(void); +-extern int ListenAtTcpPort(int port); +-extern int ConnectClientToTcpAddr(unsigned int host, int port); +-extern int ConnectClientToTcpAddr6(const char *hostname, int port); +-extern int ConnectClientToUnixSock(const char *sockFile); +-extern int AcceptTcpConnection(int listenSock); +-extern rfbBool SetNonBlocking(int sock); +-extern rfbBool SetDSCP(int sock, int dscp); +- +-extern rfbBool StringToIPAddr(const char *str, unsigned int *addr); +-extern rfbBool SameMachine(int sock); +-extern int WaitForMessage(rfbClient* client,unsigned int usecs); +- +-/* vncviewer.c */ +-rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,int bytesPerPixel); +-rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv); +-/** rfbClientCleanup() does not touch client->frameBuffer */ +-void rfbClientCleanup(rfbClient* client); +- +-#if(defined __cplusplus) +-} +-#endif +- +-/** +- * @} +- */ +- +-/** +- @page libvncclient_doc LibVNCClient Documentation +- @section example_code Example Code +- See SDLvncviewer.c for a rather complete client example. +-*/ +- +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h b/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h +deleted file mode 100644 +index 4b28217..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h ++++ /dev/null +@@ -1,95 +0,0 @@ +-#ifndef _RFB_RFBCONFIG_H +-/* #undef _RFB_RFBCONFIG_H */ +- +-/* rfb/rfbconfig.h. Generated automatically by cmake. */ +- +-/* Enable 24 bit per pixel in native framebuffer */ +-#define LIBVNCSERVER_ALLOW24BPP 1 +- +-/* work around when write() returns ENOENT but does not mean it */ +-/* #undef LIBVNCSERVER_ENOENT_WORKAROUND */ +- +-/* Define to 1 if you have the header file. */ +-#define LIBVNCSERVER_HAVE_FCNTL_H 1 +- +-/* Define to 1 if you have the `gettimeofday' function. */ +-#define LIBVNCSERVER_HAVE_GETTIMEOFDAY 1 +- +-/* Define to 1 if you have the `jpeg' library (-ljpeg). */ +-#define LIBVNCSERVER_HAVE_LIBJPEG 1 +- +-/* Define to 1 if you have the `pthread' library (-lpthread). */ +-#define LIBVNCSERVER_HAVE_LIBPTHREAD 1 +- +-/* Define to 1 if you have the `z' library (-lz). */ +-#define LIBVNCSERVER_HAVE_LIBZ 1 +- +-/* Define to 1 if you have the header file. */ +-#define LIBVNCSERVER_HAVE_NETINET_IN_H 1 +- +-/* Define to 1 if you have the header file. */ +-#define LIBVNCSERVER_HAVE_SYS_SOCKET_H 1 +- +-/* Define to 1 if you have the header file. */ +-#define LIBVNCSERVER_HAVE_SYS_STAT_H 1 +- +-/* Define to 1 if you have the header file. */ +-#define LIBVNCSERVER_HAVE_SYS_TIME_H 1 +- +-/* Define to 1 if you have the header file. */ +-#define LIBVNCSERVER_HAVE_SYS_TYPES_H 1 +- +-/* Define to 1 if you have that is POSIX.1 compatible. */ +-#define LIBVNCSERVER_HAVE_SYS_WAIT_H 1 +- +-/* Define to 1 if you have the header file. */ +-#define LIBVNCSERVER_HAVE_UNISTD_H 1 +- +-/* Need a typedef for in_addr_t */ +-/* #undef LIBVNCSERVER_NEED_INADDR_T */ +- +-/* Define to the full name and version of this package. */ +-#define LIBVNCSERVER_PACKAGE_STRING " " +- +-/* Define to the version of this package. */ +-#define LIBVNCSERVER_PACKAGE_VERSION "" +- +-/* Define to 1 if libgcrypt is present */ +-#define LIBVNCSERVER_WITH_CLIENT_GCRYPT 1 +- +-/* Define to 1 if GnuTLS is present */ +-#define LIBVNCSERVER_WITH_CLIENT_TLS 1 +- +-/* Define to 1 if your processor stores words with the most significant byte +- first (like Motorola and SPARC, unlike Intel and VAX). */ +-/* #undef LIBVNCSERVER_WORDS_BIGENDIAN */ +- +-/* Define to empty if `const' does not conform to ANSI C. */ +-/* #undef const */ +- +-/* Define to `__inline__' or `__inline' if that's what the C compiler +- calls it, or to nothing if 'inline' is not supported under any name. */ +-//#ifndef __cplusplus +-/* #undef inline */ +-//#endif +- +-/* Define to `int' if does not define. */ +-#define HAVE_LIBVNCSERVER_PID_T 1 +-#ifndef HAVE_LIBVNCSERVER_PID_T +-typedef int pid_t; +-#endif +- +-/* The type for size_t */ +-#define HAVE_LIBVNCSERVER_SIZE_T 1 +-#ifndef HAVE_LIBVNCSERVER_SIZE_T +-typedef int size_t; +-#endif +- +-/* The type for socklen */ +-#define HAVE_LIBVNCSERVER_SOCKLEN_T 1 +-#ifndef HAVE_LIBVNCSERVER_SOCKLEN_T +-typedef int socklen_t; +-#endif +- +-/* once: _RFB_RFBCONFIG_H */ +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h.cmake b/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h.cmake +deleted file mode 100644 +index de898fc..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h.cmake ++++ /dev/null +@@ -1,95 +0,0 @@ +-#ifndef _RFB_RFBCONFIG_H +-#cmakedefine _RFB_RFBCONFIG_H 1 +- +-/* rfb/rfbconfig.h. Generated automatically by cmake. */ +- +-/* Enable 24 bit per pixel in native framebuffer */ +-#cmakedefine LIBVNCSERVER_ALLOW24BPP 1 +- +-/* work around when write() returns ENOENT but does not mean it */ +-#cmakedefine LIBVNCSERVER_ENOENT_WORKAROUND 1 +- +-/* Define to 1 if you have the header file. */ +-#cmakedefine LIBVNCSERVER_HAVE_FCNTL_H 1 +- +-/* Define to 1 if you have the `gettimeofday' function. */ +-#cmakedefine LIBVNCSERVER_HAVE_GETTIMEOFDAY 1 +- +-/* Define to 1 if you have the `jpeg' library (-ljpeg). */ +-#cmakedefine LIBVNCSERVER_HAVE_LIBJPEG 1 +- +-/* Define to 1 if you have the `pthread' library (-lpthread). */ +-#cmakedefine LIBVNCSERVER_HAVE_LIBPTHREAD 1 +- +-/* Define to 1 if you have the `z' library (-lz). */ +-#cmakedefine LIBVNCSERVER_HAVE_LIBZ 1 +- +-/* Define to 1 if you have the header file. */ +-#cmakedefine LIBVNCSERVER_HAVE_NETINET_IN_H 1 +- +-/* Define to 1 if you have the header file. */ +-#cmakedefine LIBVNCSERVER_HAVE_SYS_SOCKET_H 1 +- +-/* Define to 1 if you have the header file. */ +-#cmakedefine LIBVNCSERVER_HAVE_SYS_STAT_H 1 +- +-/* Define to 1 if you have the header file. */ +-#cmakedefine LIBVNCSERVER_HAVE_SYS_TIME_H 1 +- +-/* Define to 1 if you have the header file. */ +-#cmakedefine LIBVNCSERVER_HAVE_SYS_TYPES_H 1 +- +-/* Define to 1 if you have that is POSIX.1 compatible. */ +-#cmakedefine LIBVNCSERVER_HAVE_SYS_WAIT_H 1 +- +-/* Define to 1 if you have the header file. */ +-#cmakedefine LIBVNCSERVER_HAVE_UNISTD_H 1 +- +-/* Need a typedef for in_addr_t */ +-#cmakedefine LIBVNCSERVER_NEED_INADDR_T 1 +- +-/* Define to the full name and version of this package. */ +-#define LIBVNCSERVER_PACKAGE_STRING "@FULL_PACKAGE_NAME@ @PACKAGE_VERSION@" +- +-/* Define to the version of this package. */ +-#define LIBVNCSERVER_PACKAGE_VERSION "@PACKAGE_VERSION@" +- +-/* Define to 1 if libgcrypt is present */ +-#cmakedefine LIBVNCSERVER_WITH_CLIENT_GCRYPT 1 +- +-/* Define to 1 if GnuTLS is present */ +-#cmakedefine LIBVNCSERVER_WITH_CLIENT_TLS 1 +- +-/* Define to 1 if your processor stores words with the most significant byte +- first (like Motorola and SPARC, unlike Intel and VAX). */ +-#cmakedefine LIBVNCSERVER_WORDS_BIGENDIAN 1 +- +-/* Define to empty if `const' does not conform to ANSI C. */ +-//#cmakedefine const @CMAKE_CONST@ +- +-/* Define to `__inline__' or `__inline' if that's what the C compiler +- calls it, or to nothing if 'inline' is not supported under any name. */ +-//#ifndef __cplusplus +-//#cmakedefine inline @CMAKE_INLINE@ +-//#endif +- +-/* Define to `int' if does not define. */ +-#cmakedefine HAVE_LIBVNCSERVER_PID_T 1 +-#ifndef HAVE_LIBVNCSERVER_PID_T +-typedef int pid_t; +-#endif +- +-/* The type for size_t */ +-#cmakedefine HAVE_LIBVNCSERVER_SIZE_T 1 +-#ifndef HAVE_LIBVNCSERVER_SIZE_T +-typedef int size_t; +-#endif +- +-/* The type for socklen */ +-#cmakedefine HAVE_LIBVNCSERVER_SOCKLEN_T 1 +-#ifndef HAVE_LIBVNCSERVER_SOCKLEN_T +-typedef int socklen_t; +-#endif +- +-/* once: _RFB_RFBCONFIG_H */ +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbint.h.cmake b/remmina-plugins/vnc/libvncserver/rfb/rfbint.h.cmake +deleted file mode 100644 +index 17de6cd..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfb/rfbint.h.cmake ++++ /dev/null +@@ -1,4 +0,0 @@ +-#ifndef _RFB_RFBINT_H +-#define _RFB_RFBINT_H 1 +-/* empty ... */ +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbproto.h b/remmina-plugins/vnc/libvncserver/rfb/rfbproto.h +deleted file mode 100644 +index 73d200a..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfb/rfbproto.h ++++ /dev/null +@@ -1,1431 +0,0 @@ +-#ifndef RFBPROTO_H +-#define RFBPROTO_H +- +-/** +- @mainpage +- @li @ref libvncserver_api +- @li @ref libvncserver_doc +- +- +- @li @ref libvncclient_api +- @li @ref libvncclient_doc +- +-*/ +- +-/* +- * Copyright (C) 2005 Rohit Kumar, Johannes E. Schindelin +- * Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved. +- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. +- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. +- * +- * This is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. +- * +- * This software is distributed in the hope that it will be useful, +- * but WITHOUT ANY WARRANTY; without even the implied warranty of +- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- * GNU General Public License for more details. +- * +- * You should have received a copy of the GNU General Public License +- * along with this software; if not, write to the Free Software +- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +- * USA. +- */ +- +-/* +- * rfbproto.h - header file for the RFB protocol version 3.3 +- * +- * Uses types CARD for an n-bit unsigned integer, INT for an n-bit signed +- * integer (for n = 8, 16 and 32). +- * +- * All multiple byte integers are in big endian (network) order (most +- * significant byte first). Unless noted otherwise there is no special +- * alignment of protocol structures. +- * +- * +- * Once the initial handshaking is done, all messages start with a type byte, +- * (usually) followed by message-specific data. The order of definitions in +- * this file is as follows: +- * +- * (1) Structures used in several types of message. +- * (2) Structures used in the initial handshaking. +- * (3) Message types. +- * (4) Encoding types. +- * (5) For each message type, the form of the data following the type byte. +- * Sometimes this is defined by a single structure but the more complex +- * messages have to be explained by comments. +- */ +- +- +-#if defined(WIN32) && !defined(__MINGW32__) +-#define LIBVNCSERVER_WORDS_BIGENDIAN +-#define rfbBool int +-#include +-#include +-#undef SOCKET +-#define SOCKET int +-#else +-#include +-#include +-#endif +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +-#include +-#ifdef __CHECKER__ +-#undef Z_NULL +-#define Z_NULL NULL +-#endif +-#endif +- +-/* some autotool versions do not properly prefix +- WORDS_BIGENDIAN, so do that manually */ +-#ifdef WORDS_BIGENDIAN +-#define LIBVNCSERVER_WORDS_BIGENDIAN +-#endif +- +-/* MS compilers don't have strncasecmp */ +-#ifdef _MSC_VER +-#define strncasecmp _strnicmp +-#endif +- +-#if !defined(WIN32) || defined(__MINGW32__) +-#define max(a,b) (((a)>(b))?(a):(b)) +-#ifdef LIBVNCSERVER_HAVE_SYS_TIME_H +-#include +-#endif +-#ifdef LIBVNCSERVER_HAVE_NETINET_IN_H +-#include +-#endif +-#define SOCKET int +-typedef int8_t rfbBool; +-#undef FALSE +-#define FALSE 0 +-#undef TRUE +-#define TRUE -1 +-#endif +- +-typedef uint32_t rfbKeySym; +-typedef uint32_t rfbPixel; +- +-#ifdef LIBVNCSERVER_NEED_INADDR_T +-typedef uint32_t in_addr_t; +-#endif +- +-#ifndef INADDR_NONE +-#define INADDR_NONE ((in_addr_t) 0xffffffff) +-#endif +- +-#define MAX_ENCODINGS 21 +- +-/***************************************************************************** +- * +- * Structures used in several messages +- * +- *****************************************************************************/ +- +-/*----------------------------------------------------------------------------- +- * Structure used to specify a rectangle. This structure is a multiple of 4 +- * bytes so that it can be interspersed with 32-bit pixel data without +- * affecting alignment. +- */ +- +-typedef struct { +- uint16_t x; +- uint16_t y; +- uint16_t w; +- uint16_t h; +-} rfbRectangle; +- +-#define sz_rfbRectangle 8 +- +- +-/*----------------------------------------------------------------------------- +- * Structure used to specify pixel format. +- */ +- +-typedef struct { +- +- uint8_t bitsPerPixel; /* 8,16,32 only */ +- +- uint8_t depth; /* 8 to 32 */ +- +- uint8_t bigEndian; /* True if multi-byte pixels are interpreted +- as big endian, or if single-bit-per-pixel +- has most significant bit of the byte +- corresponding to first (leftmost) pixel. Of +- course this is meaningless for 8 bits/pix */ +- +- uint8_t trueColour; /* If false then we need a "colour map" to +- convert pixels to RGB. If true, xxxMax and +- xxxShift specify bits used for red, green +- and blue */ +- +- /* the following fields are only meaningful if trueColour is true */ +- +- uint16_t redMax; /* maximum red value (= 2^n - 1 where n is the +- number of bits used for red). Note this +- value is always in big endian order. */ +- +- uint16_t greenMax; /* similar for green */ +- +- uint16_t blueMax; /* and blue */ +- +- uint8_t redShift; /* number of shifts needed to get the red +- value in a pixel to the least significant +- bit. To find the red value from a given +- pixel, do the following: +- 1) Swap pixel value according to bigEndian +- (e.g. if bigEndian is false and host byte +- order is big endian, then swap). +- 2) Shift right by redShift. +- 3) AND with redMax (in host byte order). +- 4) You now have the red value between 0 and +- redMax. */ +- +- uint8_t greenShift; /* similar for green */ +- +- uint8_t blueShift; /* and blue */ +- +- uint8_t pad1; +- uint16_t pad2; +- +-} rfbPixelFormat; +- +-#define sz_rfbPixelFormat 16 +- +-/* UltraVNC: Color settings values */ +-#define rfbPFFullColors 0 +-#define rfbPF256Colors 1 +-#define rfbPF64Colors 2 +-#define rfbPF8Colors 3 +-#define rfbPF8GreyColors 4 +-#define rfbPF4GreyColors 5 +-#define rfbPF2GreyColors 6 +- +- +-/***************************************************************************** +- * +- * Initial handshaking messages +- * +- *****************************************************************************/ +- +-/*----------------------------------------------------------------------------- +- * Protocol Version +- * +- * The server always sends 12 bytes to start which identifies the latest RFB +- * protocol version number which it supports. These bytes are interpreted +- * as a string of 12 ASCII characters in the format "RFB xxx.yyy\n" where +- * xxx and yyy are the major and minor version numbers (for version 3.3 +- * this is "RFB 003.003\n"). +- * +- * The client then replies with a similar 12-byte message giving the version +- * number of the protocol which should actually be used (which may be different +- * to that quoted by the server). +- * +- * It is intended that both clients and servers may provide some level of +- * backwards compatibility by this mechanism. Servers in particular should +- * attempt to provide backwards compatibility, and even forwards compatibility +- * to some extent. For example if a client demands version 3.1 of the +- * protocol, a 3.0 server can probably assume that by ignoring requests for +- * encoding types it doesn't understand, everything will still work OK. This +- * will probably not be the case for changes in the major version number. +- * +- * The format string below can be used in sprintf or sscanf to generate or +- * decode the version string respectively. +- */ +- +-#define rfbProtocolVersionFormat "RFB %03d.%03d\n" +-#define rfbProtocolMajorVersion 3 +-#define rfbProtocolMinorVersion 8 +-/* UltraVNC Viewer examines rfbProtocolMinorVersion number (4, and 6) +- * to identify if the server supports File Transfer +- */ +- +-typedef char rfbProtocolVersionMsg[13]; /* allow extra byte for null */ +- +-#define sz_rfbProtocolVersionMsg 12 +- +-/* +- * Negotiation of the security type (protocol version 3.7) +- * +- * Once the protocol version has been decided, the server either sends a list +- * of supported security types, or informs the client about an error (when the +- * number of security types is 0). Security type rfbSecTypeTight is used to +- * enable TightVNC-specific protocol extensions. The value rfbSecTypeVncAuth +- * stands for classic VNC authentication. +- * +- * The client selects a particular security type from the list provided by the +- * server. +- */ +- +-#define rfbSecTypeInvalid 0 +-#define rfbSecTypeNone 1 +-#define rfbSecTypeVncAuth 2 +- +- +-/*----------------------------------------------------------------------------- +- * Authentication +- * +- * Once the protocol version has been decided, the server then sends a 32-bit +- * word indicating whether any authentication is needed on the connection. +- * The value of this word determines the authentication scheme in use. For +- * version 3.0 of the protocol this may have one of the following values: +- */ +- +-#define rfbConnFailed 0 +-#define rfbNoAuth 1 +-#define rfbVncAuth 2 +- +-#define rfbRA2 5 +-#define rfbRA2ne 6 +-#define rfbSSPI 7 +-#define rfbSSPIne 8 +-#define rfbTight 16 +-#define rfbUltra 17 +-#define rfbTLS 18 +-#define rfbVeNCrypt 19 +-#define rfbARD 30 +-#define rfbMSLogon 0xfffffffa +- +-#define rfbVeNCryptPlain 256 +-#define rfbVeNCryptTLSNone 257 +-#define rfbVeNCryptTLSVNC 258 +-#define rfbVeNCryptTLSPlain 259 +-#define rfbVeNCryptX509None 260 +-#define rfbVeNCryptX509VNC 261 +-#define rfbVeNCryptX509Plain 262 +-#define rfbVeNCryptX509SASL 263 +-#define rfbVeNCryptTLSSASL 264 +- +-/* +- * rfbConnFailed: For some reason the connection failed (e.g. the server +- * cannot support the desired protocol version). This is +- * followed by a string describing the reason (where a +- * string is specified as a 32-bit length followed by that +- * many ASCII characters). +- * +- * rfbNoAuth: No authentication is needed. +- * +- * rfbVncAuth: The VNC authentication scheme is to be used. A 16-byte +- * challenge follows, which the client encrypts as +- * appropriate using the password and sends the resulting +- * 16-byte response. If the response is correct, the +- * server sends the 32-bit word rfbVncAuthOK. If a simple +- * failure happens, the server sends rfbVncAuthFailed and +- * closes the connection. If the server decides that too +- * many failures have occurred, it sends rfbVncAuthTooMany +- * and closes the connection. In the latter case, the +- * server should not allow an immediate reconnection by +- * the client. +- */ +- +-#define rfbVncAuthOK 0 +-#define rfbVncAuthFailed 1 +-#define rfbVncAuthTooMany 2 +- +- +-/*----------------------------------------------------------------------------- +- * Client Initialisation Message +- * +- * Once the client and server are sure that they're happy to talk to one +- * another, the client sends an initialisation message. At present this +- * message only consists of a boolean indicating whether the server should try +- * to share the desktop by leaving other clients connected, or give exclusive +- * access to this client by disconnecting all other clients. +- */ +- +-typedef struct { +- uint8_t shared; +-} rfbClientInitMsg; +- +-#define sz_rfbClientInitMsg 1 +- +- +-/*----------------------------------------------------------------------------- +- * Server Initialisation Message +- * +- * After the client initialisation message, the server sends one of its own. +- * This tells the client the width and height of the server's framebuffer, +- * its pixel format and the name associated with the desktop. +- */ +- +-typedef struct { +- uint16_t framebufferWidth; +- uint16_t framebufferHeight; +- rfbPixelFormat format; /* the server's preferred pixel format */ +- uint32_t nameLength; +- /* followed by char name[nameLength] */ +-} rfbServerInitMsg; +- +-#define sz_rfbServerInitMsg (8 + sz_rfbPixelFormat) +- +- +-/* +- * Following the server initialisation message it's up to the client to send +- * whichever protocol messages it wants. Typically it will send a +- * SetPixelFormat message and a SetEncodings message, followed by a +- * FramebufferUpdateRequest. From then on the server will send +- * FramebufferUpdate messages in response to the client's +- * FramebufferUpdateRequest messages. The client should send +- * FramebufferUpdateRequest messages with incremental set to true when it has +- * finished processing one FramebufferUpdate and is ready to process another. +- * With a fast client, the rate at which FramebufferUpdateRequests are sent +- * should be regulated to avoid hogging the network. +- */ +- +- +- +-/***************************************************************************** +- * +- * Message types +- * +- *****************************************************************************/ +- +-/* server -> client */ +- +-#define rfbFramebufferUpdate 0 +-#define rfbSetColourMapEntries 1 +-#define rfbBell 2 +-#define rfbServerCutText 3 +-/* Modif sf@2002 */ +-#define rfbResizeFrameBuffer 4 +-#define rfbPalmVNCReSizeFrameBuffer 0xF +- +-/* client -> server */ +- +-#define rfbSetPixelFormat 0 +-#define rfbFixColourMapEntries 1 /* not currently supported */ +-#define rfbSetEncodings 2 +-#define rfbFramebufferUpdateRequest 3 +-#define rfbKeyEvent 4 +-#define rfbPointerEvent 5 +-#define rfbClientCutText 6 +-/* Modif sf@2002 - actually bidirectionnal */ +-#define rfbFileTransfer 7 +-/* Modif sf@2002 */ +-#define rfbSetScale 8 +-/* Modif rdv@2002 */ +-#define rfbSetServerInput 9 +-/* Modif rdv@2002 */ +-#define rfbSetSW 10 +-/* Modif sf@2002 - TextChat - Bidirectionnal */ +-#define rfbTextChat 11 +-/* Modif cs@2005 */ +-/* PalmVNC 1.4 & 2.0 SetScale Factor message */ +-#define rfbPalmVNCSetScaleFactor 0xF +-/* Xvp message - bidirectional */ +-#define rfbXvp 250 +- +- +- +- +-/***************************************************************************** +- * +- * Encoding types +- * +- *****************************************************************************/ +- +-#define rfbEncodingRaw 0 +-#define rfbEncodingCopyRect 1 +-#define rfbEncodingRRE 2 +-#define rfbEncodingCoRRE 4 +-#define rfbEncodingHextile 5 +-#define rfbEncodingZlib 6 +-#define rfbEncodingTight 7 +-#define rfbEncodingZlibHex 8 +-#define rfbEncodingUltra 9 +-#define rfbEncodingZRLE 16 +-#define rfbEncodingZYWRLE 17 +- +-/* Cache & XOR-Zlib - rdv@2002 */ +-#define rfbEncodingCache 0xFFFF0000 +-#define rfbEncodingCacheEnable 0xFFFF0001 +-#define rfbEncodingXOR_Zlib 0xFFFF0002 +-#define rfbEncodingXORMonoColor_Zlib 0xFFFF0003 +-#define rfbEncodingXORMultiColor_Zlib 0xFFFF0004 +-#define rfbEncodingSolidColor 0xFFFF0005 +-#define rfbEncodingXOREnable 0xFFFF0006 +-#define rfbEncodingCacheZip 0xFFFF0007 +-#define rfbEncodingSolMonoZip 0xFFFF0008 +-#define rfbEncodingUltraZip 0xFFFF0009 +- +-/* Xvp pseudo-encoding */ +-#define rfbEncodingXvp 0xFFFFFECB +- +-/* +- * Special encoding numbers: +- * 0xFFFFFF00 .. 0xFFFFFF0F -- encoding-specific compression levels; +- * 0xFFFFFF10 .. 0xFFFFFF1F -- mouse cursor shape data; +- * 0xFFFFFF20 .. 0xFFFFFF2F -- various protocol extensions; +- * 0xFFFFFF30 .. 0xFFFFFFDF -- not allocated yet; +- * 0xFFFFFFE0 .. 0xFFFFFFEF -- quality level for JPEG compressor; +- * 0xFFFFFFF0 .. 0xFFFFFFFF -- cross-encoding compression levels. +- */ +- +-#define rfbEncodingCompressLevel0 0xFFFFFF00 +-#define rfbEncodingCompressLevel1 0xFFFFFF01 +-#define rfbEncodingCompressLevel2 0xFFFFFF02 +-#define rfbEncodingCompressLevel3 0xFFFFFF03 +-#define rfbEncodingCompressLevel4 0xFFFFFF04 +-#define rfbEncodingCompressLevel5 0xFFFFFF05 +-#define rfbEncodingCompressLevel6 0xFFFFFF06 +-#define rfbEncodingCompressLevel7 0xFFFFFF07 +-#define rfbEncodingCompressLevel8 0xFFFFFF08 +-#define rfbEncodingCompressLevel9 0xFFFFFF09 +- +-#define rfbEncodingXCursor 0xFFFFFF10 +-#define rfbEncodingRichCursor 0xFFFFFF11 +-#define rfbEncodingPointerPos 0xFFFFFF18 +- +-#define rfbEncodingLastRect 0xFFFFFF20 +-#define rfbEncodingNewFBSize 0xFFFFFF21 +- +-#define rfbEncodingQualityLevel0 0xFFFFFFE0 +-#define rfbEncodingQualityLevel1 0xFFFFFFE1 +-#define rfbEncodingQualityLevel2 0xFFFFFFE2 +-#define rfbEncodingQualityLevel3 0xFFFFFFE3 +-#define rfbEncodingQualityLevel4 0xFFFFFFE4 +-#define rfbEncodingQualityLevel5 0xFFFFFFE5 +-#define rfbEncodingQualityLevel6 0xFFFFFFE6 +-#define rfbEncodingQualityLevel7 0xFFFFFFE7 +-#define rfbEncodingQualityLevel8 0xFFFFFFE8 +-#define rfbEncodingQualityLevel9 0xFFFFFFE9 +- +- +-/* LibVNCServer additions. We claim 0xFFFE0000 - 0xFFFE00FF */ +-#define rfbEncodingKeyboardLedState 0xFFFE0000 +-#define rfbEncodingSupportedMessages 0xFFFE0001 +-#define rfbEncodingSupportedEncodings 0xFFFE0002 +-#define rfbEncodingServerIdentity 0xFFFE0003 +- +- +-/***************************************************************************** +- * +- * Server -> client message definitions +- * +- *****************************************************************************/ +- +- +-/*----------------------------------------------------------------------------- +- * FramebufferUpdate - a block of rectangles to be copied to the framebuffer. +- * +- * This message consists of a header giving the number of rectangles of pixel +- * data followed by the rectangles themselves. The header is padded so that +- * together with the type byte it is an exact multiple of 4 bytes (to help +- * with alignment of 32-bit pixels): +- */ +- +-typedef struct { +- uint8_t type; /* always rfbFramebufferUpdate */ +- uint8_t pad; +- uint16_t nRects; +- /* followed by nRects rectangles */ +-} rfbFramebufferUpdateMsg; +- +-#define sz_rfbFramebufferUpdateMsg 4 +- +-/* +- * Each rectangle of pixel data consists of a header describing the position +- * and size of the rectangle and a type word describing the encoding of the +- * pixel data, followed finally by the pixel data. Note that if the client has +- * not sent a SetEncodings message then it will only receive raw pixel data. +- * Also note again that this structure is a multiple of 4 bytes. +- */ +- +-typedef struct { +- rfbRectangle r; +- uint32_t encoding; /* one of the encoding types rfbEncoding... */ +-} rfbFramebufferUpdateRectHeader; +- +-#define sz_rfbFramebufferUpdateRectHeader (sz_rfbRectangle + 4) +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * Supported Messages Encoding. This encoding does not contain any pixel data. +- * Instead, it contains 2 sets of bitflags. These bitflags indicate what messages +- * are supported by the server. +- * rect->w contains byte count +- */ +- +-typedef struct { +- uint8_t client2server[32]; /* maximum of 256 message types (256/8)=32 */ +- uint8_t server2client[32]; /* maximum of 256 message types (256/8)=32 */ +-} rfbSupportedMessages; +- +-#define sz_rfbSupportedMessages 64 +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * Supported Encodings Encoding. This encoding does not contain any pixel data. +- * Instead, it contains a list of (uint32_t) Encodings supported by this server. +- * rect->w contains byte count +- * rect->h contains encoding count +- */ +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * Server Identity Encoding. This encoding does not contain any pixel data. +- * Instead, it contains a text string containing information about the server. +- * ie: "x11vnc: 0.8.1 lastmod: 2006-04-25 (libvncserver 0.9pre)\0" +- * rect->w contains byte count +- */ +- +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * Raw Encoding. Pixels are sent in top-to-bottom scanline order, +- * left-to-right within a scanline with no padding in between. +- */ +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * KeyboardLedState Encoding. The X coordinate contains the Locked Modifiers +- * so that a remote troubleshooter can identify that the users 'Caps Lock' +- * is set... (It helps a *lot* when the users are untrained) +- */ +-#define rfbKeyboardMaskShift 1 +-#define rfbKeyboardMaskCapsLock 2 +-#define rfbKeyboardMaskControl 4 +-#define rfbKeyboardMaskAlt 8 +-#define rfbKeyboardMaskMeta 16 +-#define rfbKeyboardMaskSuper 32 +-#define rfbKeyboardMaskHyper 64 +-#define rfbKeyboardMaskNumLock 128 +-#define rfbKeyboardMaskScrollLock 256 +-#define rfbKeyboardMaskAltGraph 512 +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * CopyRect Encoding. The pixels are specified simply by the x and y position +- * of the source rectangle. +- */ +- +-typedef struct { +- uint16_t srcX; +- uint16_t srcY; +-} rfbCopyRect; +- +-#define sz_rfbCopyRect 4 +- +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * RRE - Rise-and-Run-length Encoding. We have an rfbRREHeader structure +- * giving the number of subrectangles following. Finally the data follows in +- * the form [...] where each is +- * []. +- */ +- +-typedef struct { +- uint32_t nSubrects; +-} rfbRREHeader; +- +-#define sz_rfbRREHeader 4 +- +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * CoRRE - Compact RRE Encoding. We have an rfbRREHeader structure giving +- * the number of subrectangles following. Finally the data follows in the form +- * [...] where each is +- * []. This means that +- * the whole rectangle must be at most 255x255 pixels. +- */ +- +-typedef struct { +- uint8_t x; +- uint8_t y; +- uint8_t w; +- uint8_t h; +-} rfbCoRRERectangle; +- +-#define sz_rfbCoRRERectangle 4 +- +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * Hextile Encoding. The rectangle is divided up into "tiles" of 16x16 pixels, +- * starting at the top left going in left-to-right, top-to-bottom order. If +- * the width of the rectangle is not an exact multiple of 16 then the width of +- * the last tile in each row will be correspondingly smaller. Similarly if the +- * height is not an exact multiple of 16 then the height of each tile in the +- * final row will also be smaller. Each tile begins with a "subencoding" type +- * byte, which is a mask made up of a number of bits. If the Raw bit is set +- * then the other bits are irrelevant; w*h pixel values follow (where w and h +- * are the width and height of the tile). Otherwise the tile is encoded in a +- * similar way to RRE, except that the position and size of each subrectangle +- * can be specified in just two bytes. The other bits in the mask are as +- * follows: +- * +- * BackgroundSpecified - if set, a pixel value follows which specifies +- * the background colour for this tile. The first non-raw tile in a +- * rectangle must have this bit set. If this bit isn't set then the +- * background is the same as the last tile. +- * +- * ForegroundSpecified - if set, a pixel value follows which specifies +- * the foreground colour to be used for all subrectangles in this tile. +- * If this bit is set then the SubrectsColoured bit must be zero. +- * +- * AnySubrects - if set, a single byte follows giving the number of +- * subrectangles following. If not set, there are no subrectangles (i.e. +- * the whole tile is just solid background colour). +- * +- * SubrectsColoured - if set then each subrectangle is preceded by a pixel +- * value giving the colour of that subrectangle. If not set, all +- * subrectangles are the same colour, the foreground colour; if the +- * ForegroundSpecified bit wasn't set then the foreground is the same as +- * the last tile. +- * +- * The position and size of each subrectangle is specified in two bytes. The +- * Pack macros below can be used to generate the two bytes from x, y, w, h, +- * and the Extract macros can be used to extract the x, y, w, h values from +- * the two bytes. +- */ +- +-#define rfbHextileRaw (1 << 0) +-#define rfbHextileBackgroundSpecified (1 << 1) +-#define rfbHextileForegroundSpecified (1 << 2) +-#define rfbHextileAnySubrects (1 << 3) +-#define rfbHextileSubrectsColoured (1 << 4) +- +-#define rfbHextilePackXY(x,y) (((x) << 4) | (y)) +-#define rfbHextilePackWH(w,h) ((((w)-1) << 4) | ((h)-1)) +-#define rfbHextileExtractX(byte) ((byte) >> 4) +-#define rfbHextileExtractY(byte) ((byte) & 0xf) +-#define rfbHextileExtractW(byte) (((byte) >> 4) + 1) +-#define rfbHextileExtractH(byte) (((byte) & 0xf) + 1) +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * zlib - zlib compressed Encoding. We have an rfbZlibHeader structure +- * giving the number of bytes following. Finally the data follows is +- * zlib compressed version of the raw pixel data as negotiated. +- * (NOTE: also used by Ultra Encoding) +- */ +- +-typedef struct { +- uint32_t nBytes; +-} rfbZlibHeader; +- +-#define sz_rfbZlibHeader 4 +- +-#ifdef LIBVNCSERVER_HAVE_LIBZ +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * Tight Encoding. +- * +- *-- The first byte of each Tight-encoded rectangle is a "compression control +- * byte". Its format is as follows (bit 0 is the least significant one): +- * +- * bit 0: if 1, then compression stream 0 should be reset; +- * bit 1: if 1, then compression stream 1 should be reset; +- * bit 2: if 1, then compression stream 2 should be reset; +- * bit 3: if 1, then compression stream 3 should be reset; +- * bits 7-4: if 1000 (0x08), then the compression type is "fill", +- * if 1001 (0x09), then the compression type is "jpeg", +- * if 0xxx, then the compression type is "basic", +- * values greater than 1001 are not valid. +- * +- * If the compression type is "basic", then bits 6..4 of the +- * compression control byte (those xxx in 0xxx) specify the following: +- * +- * bits 5-4: decimal representation is the index of a particular zlib +- * stream which should be used for decompressing the data; +- * bit 6: if 1, then a "filter id" byte is following this byte. +- * +- *-- The data that follows after the compression control byte described +- * above depends on the compression type ("fill", "jpeg" or "basic"). +- * +- *-- If the compression type is "fill", then the only pixel value follows, in +- * client pixel format (see NOTE 1). This value applies to all pixels of the +- * rectangle. +- * +- *-- If the compression type is "jpeg", the following data stream looks like +- * this: +- * +- * 1..3 bytes: data size (N) in compact representation; +- * N bytes: JPEG image. +- * +- * Data size is compactly represented in one, two or three bytes, according +- * to the following scheme: +- * +- * 0xxxxxxx (for values 0..127) +- * 1xxxxxxx 0yyyyyyy (for values 128..16383) +- * 1xxxxxxx 1yyyyyyy zzzzzzzz (for values 16384..4194303) +- * +- * Here each character denotes one bit, xxxxxxx are the least significant 7 +- * bits of the value (bits 0-6), yyyyyyy are bits 7-13, and zzzzzzzz are the +- * most significant 8 bits (bits 14-21). For example, decimal value 10000 +- * should be represented as two bytes: binary 10010000 01001110, or +- * hexadecimal 90 4E. +- * +- *-- If the compression type is "basic" and bit 6 of the compression control +- * byte was set to 1, then the next (second) byte specifies "filter id" which +- * tells the decoder what filter type was used by the encoder to pre-process +- * pixel data before the compression. The "filter id" byte can be one of the +- * following: +- * +- * 0: no filter ("copy" filter); +- * 1: "palette" filter; +- * 2: "gradient" filter. +- * +- *-- If bit 6 of the compression control byte is set to 0 (no "filter id" +- * byte), or if the filter id is 0, then raw pixel values in the client +- * format (see NOTE 1) will be compressed. See below details on the +- * compression. +- * +- *-- The "gradient" filter pre-processes pixel data with a simple algorithm +- * which converts each color component to a difference between a "predicted" +- * intensity and the actual intensity. Such a technique does not affect +- * uncompressed data size, but helps to compress photo-like images better. +- * Pseudo-code for converting intensities to differences is the following: +- * +- * P[i,j] := V[i-1,j] + V[i,j-1] - V[i-1,j-1]; +- * if (P[i,j] < 0) then P[i,j] := 0; +- * if (P[i,j] > MAX) then P[i,j] := MAX; +- * D[i,j] := V[i,j] - P[i,j]; +- * +- * Here V[i,j] is the intensity of a color component for a pixel at +- * coordinates (i,j). MAX is the maximum value of intensity for a color +- * component. +- * +- *-- The "palette" filter converts true-color pixel data to indexed colors +- * and a palette which can consist of 2..256 colors. If the number of colors +- * is 2, then each pixel is encoded in 1 bit, otherwise 8 bits is used to +- * encode one pixel. 1-bit encoding is performed such way that the most +- * significant bits correspond to the leftmost pixels, and each raw of pixels +- * is aligned to the byte boundary. When "palette" filter is used, the +- * palette is sent before the pixel data. The palette begins with an unsigned +- * byte which value is the number of colors in the palette minus 1 (i.e. 1 +- * means 2 colors, 255 means 256 colors in the palette). Then follows the +- * palette itself which consist of pixel values in client pixel format (see +- * NOTE 1). +- * +- *-- The pixel data is compressed using the zlib library. But if the data +- * size after applying the filter but before the compression is less then 12, +- * then the data is sent as is, uncompressed. Four separate zlib streams +- * (0..3) can be used and the decoder should read the actual stream id from +- * the compression control byte (see NOTE 2). +- * +- * If the compression is not used, then the pixel data is sent as is, +- * otherwise the data stream looks like this: +- * +- * 1..3 bytes: data size (N) in compact representation; +- * N bytes: zlib-compressed data. +- * +- * Data size is compactly represented in one, two or three bytes, just like +- * in the "jpeg" compression method (see above). +- * +- *-- NOTE 1. If the color depth is 24, and all three color components are +- * 8-bit wide, then one pixel in Tight encoding is always represented by +- * three bytes, where the first byte is red component, the second byte is +- * green component, and the third byte is blue component of the pixel color +- * value. This applies to colors in palettes as well. +- * +- *-- NOTE 2. The decoder must reset compression streams' states before +- * decoding the rectangle, if some of bits 0,1,2,3 in the compression control +- * byte are set to 1. Note that the decoder must reset zlib streams even if +- * the compression type is "fill" or "jpeg". +- * +- *-- NOTE 3. The "gradient" filter and "jpeg" compression may be used only +- * when bits-per-pixel value is either 16 or 32, not 8. +- * +- *-- NOTE 4. The width of any Tight-encoded rectangle cannot exceed 2048 +- * pixels. If a rectangle is wider, it must be split into several rectangles +- * and each one should be encoded separately. +- * +- */ +- +-#define rfbTightExplicitFilter 0x04 +-#define rfbTightFill 0x08 +-#define rfbTightJpeg 0x09 +-#define rfbTightMaxSubencoding 0x09 +- +-/* Filters to improve compression efficiency */ +-#define rfbTightFilterCopy 0x00 +-#define rfbTightFilterPalette 0x01 +-#define rfbTightFilterGradient 0x02 +- +-#endif +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * XCursor encoding. This is a special encoding used to transmit X-style +- * cursor shapes from server to clients. Note that for this encoding, +- * coordinates in rfbFramebufferUpdateRectHeader structure hold hotspot +- * position (r.x, r.y) and cursor size (r.w, r.h). If (w * h != 0), two RGB +- * samples are sent after header in the rfbXCursorColors structure. They +- * denote foreground and background colors of the cursor. If a client +- * supports only black-and-white cursors, it should ignore these colors and +- * assume that foreground is black and background is white. Next, two bitmaps +- * (1 bits per pixel) follow: first one with actual data (value 0 denotes +- * background color, value 1 denotes foreground color), second one with +- * transparency data (bits with zero value mean that these pixels are +- * transparent). Both bitmaps represent cursor data in a byte stream, from +- * left to right, from top to bottom, and each row is byte-aligned. Most +- * significant bits correspond to leftmost pixels. The number of bytes in +- * each row can be calculated as ((w + 7) / 8). If (w * h == 0), cursor +- * should be hidden (or default local cursor should be set by the client). +- */ +- +-typedef struct { +- uint8_t foreRed; +- uint8_t foreGreen; +- uint8_t foreBlue; +- uint8_t backRed; +- uint8_t backGreen; +- uint8_t backBlue; +-} rfbXCursorColors; +- +-#define sz_rfbXCursorColors 6 +- +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * RichCursor encoding. This is a special encoding used to transmit cursor +- * shapes from server to clients. It is similar to the XCursor encoding but +- * uses client pixel format instead of two RGB colors to represent cursor +- * image. For this encoding, coordinates in rfbFramebufferUpdateRectHeader +- * structure hold hotspot position (r.x, r.y) and cursor size (r.w, r.h). +- * After header, two pixmaps follow: first one with cursor image in current +- * client pixel format (like in raw encoding), second with transparency data +- * (1 bit per pixel, exactly the same format as used for transparency bitmap +- * in the XCursor encoding). If (w * h == 0), cursor should be hidden (or +- * default local cursor should be set by the client). +- */ +- +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * ZRLE - encoding combining Zlib compression, tiling, palettisation and +- * run-length encoding. +- */ +- +-typedef struct { +- uint32_t length; +-} rfbZRLEHeader; +- +-#define sz_rfbZRLEHeader 4 +- +-#define rfbZRLETileWidth 64 +-#define rfbZRLETileHeight 64 +- +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * ZLIBHEX - zlib compressed Hextile Encoding. Essentially, this is the +- * hextile encoding with zlib compression on the tiles that can not be +- * efficiently encoded with one of the other hextile subencodings. The +- * new zlib subencoding uses two bytes to specify the length of the +- * compressed tile and then the compressed data follows. As with the +- * raw sub-encoding, the zlib subencoding invalidates the other +- * values, if they are also set. +- */ +- +-#define rfbHextileZlibRaw (1 << 5) +-#define rfbHextileZlibHex (1 << 6) +-#define rfbHextileZlibMono (1 << 7) +- +- +-/*----------------------------------------------------------------------------- +- * SetColourMapEntries - these messages are only sent if the pixel +- * format uses a "colour map" (i.e. trueColour false) and the client has not +- * fixed the entire colour map using FixColourMapEntries. In addition they +- * will only start being sent after the client has sent its first +- * FramebufferUpdateRequest. So if the client always tells the server to use +- * trueColour then it never needs to process this type of message. +- */ +- +-typedef struct { +- uint8_t type; /* always rfbSetColourMapEntries */ +- uint8_t pad; +- uint16_t firstColour; +- uint16_t nColours; +- +- /* Followed by nColours * 3 * uint16_t +- r1, g1, b1, r2, g2, b2, r3, g3, b3, ..., rn, bn, gn */ +- +-} rfbSetColourMapEntriesMsg; +- +-#define sz_rfbSetColourMapEntriesMsg 6 +- +- +- +-/*----------------------------------------------------------------------------- +- * Bell - ring a bell on the client if it has one. +- */ +- +-typedef struct { +- uint8_t type; /* always rfbBell */ +-} rfbBellMsg; +- +-#define sz_rfbBellMsg 1 +- +- +- +-/*----------------------------------------------------------------------------- +- * ServerCutText - the server has new text in its cut buffer. +- */ +- +-typedef struct { +- uint8_t type; /* always rfbServerCutText */ +- uint8_t pad1; +- uint16_t pad2; +- uint32_t length; +- /* followed by char text[length] */ +-} rfbServerCutTextMsg; +- +-#define sz_rfbServerCutTextMsg 8 +- +- +-/*----------------------------------------------------------------------------- +- * // Modif sf@2002 +- * FileTransferMsg - The client sends FileTransfer message. +- * Bidirectional message - Files can be sent from client to server & vice versa +- */ +- +-typedef struct _rfbFileTransferMsg { +- uint8_t type; /* always rfbFileTransfer */ +- uint8_t contentType; /* See defines below */ +- uint8_t contentParam;/* Other possible content classification (Dir or File name, etc..) */ +- uint8_t pad; /* It appears that UltraVNC *forgot* to Swap16IfLE(contentParam) */ +- uint32_t size; /* FileSize or packet index or error or other */ +-/* uint32_t sizeH; Additional 32Bits params to handle big values. Only for V2 (we want backward compatibility between all V1 versions) */ +- uint32_t length; +- /* followed by data char text[length] */ +-} rfbFileTransferMsg; +- +-#define sz_rfbFileTransferMsg 12 +- +-#define rfbFileTransferVersion 2 /* v1 is the old FT version ( <= 1.0.0 RC18 versions) */ +- +-/* FileTransfer Content types and Params defines */ +-#define rfbDirContentRequest 1 /* Client asks for the content of a given Server directory */ +-#define rfbDirPacket 2 /* Full directory name or full file name. */ +- /* Null content means end of Directory */ +-#define rfbFileTransferRequest 3 /* Client asks the server for the transfer of a given file */ +-#define rfbFileHeader 4 /* First packet of a file transfer, containing file's features */ +-#define rfbFilePacket 5 /* One chunk of the file */ +-#define rfbEndOfFile 6 /* End of file transfer (the file has been received or error) */ +-#define rfbAbortFileTransfer 7 /* The file transfer must be aborted, whatever the state */ +-#define rfbFileTransferOffer 8 /* The client offers to send a file to the server */ +-#define rfbFileAcceptHeader 9 /* The server accepts or rejects the file */ +-#define rfbCommand 10 /* The Client sends a simple command (File Delete, Dir create etc...) */ +-#define rfbCommandReturn 11 /* The Client receives the server's answer about a simple command */ +-#define rfbFileChecksums 12 /* The zipped checksums of the destination file (Delta Transfer) */ +-#define rfbFileTransferAccess 14 /* Request FileTransfer authorization */ +- +- /* rfbDirContentRequest client Request - content params */ +-#define rfbRDirContent 1 /* Request a Server Directory contents */ +-#define rfbRDrivesList 2 /* Request the server's drives list */ +-#define rfbRDirRecursiveList 3 /* Request a server directory content recursive sorted list */ +-#define rfbRDirRecursiveSize 4 /* Request a server directory content recursive size */ +- +- /* rfbDirPacket & rfbCommandReturn server Answer - content params */ +-#define rfbADirectory 1 /* Reception of a directory name */ +-#define rfbAFile 2 /* Reception of a file name */ +-#define rfbADrivesList 3 /* Reception of a list of drives */ +-#define rfbADirCreate 4 /* Response to a create dir command */ +-#define rfbADirDelete 5 /* Response to a delete dir command */ +-#define rfbAFileCreate 6 /* Response to a create file command */ +-#define rfbAFileDelete 7 /* Response to a delete file command */ +-#define rfbAFileRename 8 /* Response to a rename file command */ +-#define rfbADirRename 9 /* Response to a rename dir command */ +-#define rfbADirRecursiveListItem 10 +-#define rfbADirRecursiveSize 11 +- +- /* rfbCommand Command - content params */ +-#define rfbCDirCreate 1 /* Request the server to create the given directory */ +-#define rfbCDirDelete 2 /* Request the server to delete the given directory */ +-#define rfbCFileCreate 3 /* Request the server to create the given file */ +-#define rfbCFileDelete 4 /* Request the server to delete the given file */ +-#define rfbCFileRename 5 /* Request the server to rename the given file */ +-#define rfbCDirRename 6 /* Request the server to rename the given directory */ +- +- /* Errors - content params or "size" field */ +-#define rfbRErrorUnknownCmd 1 /* Unknown FileTransfer command. */ +-#define rfbRErrorCmd 0xFFFFFFFF/* Error when a command fails on remote side (ret in "size" field) */ +- +-#define sz_rfbBlockSize 8192 /* Size of a File Transfer packet (before compression) */ +-#define rfbZipDirectoryPrefix "!UVNCDIR-\0" /* Transfered directory are zipped in a file with this prefix. Must end with "-" */ +-#define sz_rfbZipDirectoryPrefix 9 +-#define rfbDirPrefix "[ " +-#define rfbDirSuffix " ]" +- +- +- +-/*----------------------------------------------------------------------------- +- * Modif sf@2002 +- * TextChatMsg - Utilized to order the TextChat mode on server or client +- * Bidirectional message +- */ +- +-typedef struct _rfbTextChatMsg { +- uint8_t type; /* always rfbTextChat */ +- uint8_t pad1; /* Could be used later as an additionnal param */ +- uint16_t pad2; /* Could be used later as text offset, for instance */ +- uint32_t length; /* Specific values for Open, close, finished (-1, -2, -3) */ +- /* followed by char text[length] */ +-} rfbTextChatMsg; +- +-#define sz_rfbTextChatMsg 8 +- +-#define rfbTextMaxSize 4096 +-#define rfbTextChatOpen 0xFFFFFFFF +-#define rfbTextChatClose 0xFFFFFFFE +-#define rfbTextChatFinished 0xFFFFFFFD +- +- +-/*----------------------------------------------------------------------------- +- * Xvp Message +- * Bidirectional message +- * A server which supports the xvp extension declares this by sending a message +- * with an Xvp_INIT xvp-message-code when it receives a request from the client +- * to use the xvp Pseudo-encoding. The server must specify in this message the +- * highest xvp-extension-version it supports: the client may assume that the +- * server supports all versions from 1 up to this value. The client is then +- * free to use any supported version. Currently, only version 1 is defined. +- * +- * A server which subsequently receives an xvp Client Message requesting an +- * operation which it is unable to perform, informs the client of this by +- * sending a message with an Xvp_FAIL xvp-message-code, and the same +- * xvp-extension-version as included in the client's operation request. +- * +- * A client supporting the xvp extension sends this to request that the server +- * initiate a clean shutdown, clean reboot or abrupt reset of the system whose +- * framebuffer the client is displaying. +- */ +- +- +-typedef struct { +- uint8_t type; /* always rfbXvp */ +- uint8_t pad; +- uint8_t version; /* xvp extension version */ +- uint8_t code; /* xvp message code */ +-} rfbXvpMsg; +- +-#define sz_rfbXvpMsg (4) +- +-/* server message codes */ +-#define rfbXvp_Fail 0 +-#define rfbXvp_Init 1 +-/* client message codes */ +-#define rfbXvp_Shutdown 2 +-#define rfbXvp_Reboot 3 +-#define rfbXvp_Reset 4 +- +- +-/*----------------------------------------------------------------------------- +- * Modif sf@2002 +- * ResizeFrameBuffer - The Client must change the size of its framebuffer +- */ +- +-typedef struct _rfbResizeFrameBufferMsg { +- uint8_t type; /* always rfbResizeFrameBuffer */ +- uint8_t pad1; +- uint16_t framebufferWidth; /* FrameBuffer width */ +- uint16_t framebufferHeigth; /* FrameBuffer height */ +-} rfbResizeFrameBufferMsg; +- +-#define sz_rfbResizeFrameBufferMsg 6 +- +- +-/*----------------------------------------------------------------------------- +- * Copyright (C) 2001 Harakan Software +- * PalmVNC 1.4 & 2.? ResizeFrameBuffer message +- * ReSizeFrameBuffer - tell the RFB client to alter its framebuffer, either +- * due to a resize of the server desktop or a client-requested scaling factor. +- * The pixel format remains unchanged. +- */ +- +-typedef struct { +- uint8_t type; /* always rfbReSizeFrameBuffer */ +- uint8_t pad1; +- uint16_t desktop_w; /* Desktop width */ +- uint16_t desktop_h; /* Desktop height */ +- uint16_t buffer_w; /* FrameBuffer width */ +- uint16_t buffer_h; /* Framebuffer height */ +- uint16_t pad2; +- +-} rfbPalmVNCReSizeFrameBufferMsg; +- +-#define sz_rfbPalmVNCReSizeFrameBufferMsg (12) +- +- +- +- +-/*----------------------------------------------------------------------------- +- * Union of all server->client messages. +- */ +- +-typedef union { +- uint8_t type; +- rfbFramebufferUpdateMsg fu; +- rfbSetColourMapEntriesMsg scme; +- rfbBellMsg b; +- rfbServerCutTextMsg sct; +- rfbResizeFrameBufferMsg rsfb; +- rfbPalmVNCReSizeFrameBufferMsg prsfb; +- rfbFileTransferMsg ft; +- rfbTextChatMsg tc; +- rfbXvpMsg xvp; +-} rfbServerToClientMsg; +- +- +- +-/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +- * RDV Cache Encoding. +- * special is not used at this point, can be used to reset cache or other specials +- * just put it to make sure we don't have to change the encoding again. +- */ +- +-typedef struct { +- uint16_t special; +-} rfbCacheRect; +- +-#define sz_rfbCacheRect 2 +- +- +- +- +-/***************************************************************************** +- * +- * Message definitions (client -> server) +- * +- *****************************************************************************/ +- +- +-/*----------------------------------------------------------------------------- +- * SetPixelFormat - tell the RFB server the format in which the client wants +- * pixels sent. +- */ +- +-typedef struct { +- uint8_t type; /* always rfbSetPixelFormat */ +- uint8_t pad1; +- uint16_t pad2; +- rfbPixelFormat format; +-} rfbSetPixelFormatMsg; +- +-#define sz_rfbSetPixelFormatMsg (sz_rfbPixelFormat + 4) +- +- +-/*----------------------------------------------------------------------------- +- * FixColourMapEntries - when the pixel format uses a "colour map", fix +- * read-only colour map entries. +- * +- * ***************** NOT CURRENTLY SUPPORTED ***************** +- */ +- +-typedef struct { +- uint8_t type; /* always rfbFixColourMapEntries */ +- uint8_t pad; +- uint16_t firstColour; +- uint16_t nColours; +- +- /* Followed by nColours * 3 * uint16_t +- r1, g1, b1, r2, g2, b2, r3, g3, b3, ..., rn, bn, gn */ +- +-} rfbFixColourMapEntriesMsg; +- +-#define sz_rfbFixColourMapEntriesMsg 6 +- +- +-/*----------------------------------------------------------------------------- +- * SetEncodings - tell the RFB server which encoding types we accept. Put them +- * in order of preference, if we have any. We may always receive raw +- * encoding, even if we don't specify it here. +- */ +- +-typedef struct { +- uint8_t type; /* always rfbSetEncodings */ +- uint8_t pad; +- uint16_t nEncodings; +- /* followed by nEncodings * uint32_t encoding types */ +-} rfbSetEncodingsMsg; +- +-#define sz_rfbSetEncodingsMsg 4 +- +- +-/*----------------------------------------------------------------------------- +- * FramebufferUpdateRequest - request for a framebuffer update. If incremental +- * is true then the client just wants the changes since the last update. If +- * false then it wants the whole of the specified rectangle. +- */ +- +-typedef struct { +- uint8_t type; /* always rfbFramebufferUpdateRequest */ +- uint8_t incremental; +- uint16_t x; +- uint16_t y; +- uint16_t w; +- uint16_t h; +-} rfbFramebufferUpdateRequestMsg; +- +-#define sz_rfbFramebufferUpdateRequestMsg 10 +- +- +-/*----------------------------------------------------------------------------- +- * KeyEvent - key press or release +- * +- * Keys are specified using the "keysym" values defined by the X Window System. +- * For most ordinary keys, the keysym is the same as the corresponding ASCII +- * value. Other common keys are: +- * +- * BackSpace 0xff08 +- * Tab 0xff09 +- * Return or Enter 0xff0d +- * Escape 0xff1b +- * Insert 0xff63 +- * Delete 0xffff +- * Home 0xff50 +- * End 0xff57 +- * Page Up 0xff55 +- * Page Down 0xff56 +- * Left 0xff51 +- * Up 0xff52 +- * Right 0xff53 +- * Down 0xff54 +- * F1 0xffbe +- * F2 0xffbf +- * ... ... +- * F12 0xffc9 +- * Shift 0xffe1 +- * Control 0xffe3 +- * Meta 0xffe7 +- * Alt 0xffe9 +- */ +- +-typedef struct { +- uint8_t type; /* always rfbKeyEvent */ +- uint8_t down; /* true if down (press), false if up */ +- uint16_t pad; +- uint32_t key; /* key is specified as an X keysym */ +-} rfbKeyEventMsg; +- +-#define sz_rfbKeyEventMsg 8 +- +- +-/*----------------------------------------------------------------------------- +- * PointerEvent - mouse/pen move and/or button press. +- */ +- +-typedef struct { +- uint8_t type; /* always rfbPointerEvent */ +- uint8_t buttonMask; /* bits 0-7 are buttons 1-8, 0=up, 1=down */ +- uint16_t x; +- uint16_t y; +-} rfbPointerEventMsg; +- +-#define rfbButton1Mask 1 +-#define rfbButton2Mask 2 +-#define rfbButton3Mask 4 +-#define rfbButton4Mask 8 +-#define rfbButton5Mask 16 +-/* RealVNC 335 method */ +-#define rfbWheelUpMask rfbButton4Mask +-#define rfbWheelDownMask rfbButton5Mask +- +-#define sz_rfbPointerEventMsg 6 +- +- +- +-/*----------------------------------------------------------------------------- +- * ClientCutText - the client has new text in its cut buffer. +- */ +- +-typedef struct { +- uint8_t type; /* always rfbClientCutText */ +- uint8_t pad1; +- uint16_t pad2; +- uint32_t length; +- /* followed by char text[length] */ +-} rfbClientCutTextMsg; +- +-#define sz_rfbClientCutTextMsg 8 +- +- +- +-/*----------------------------------------------------------------------------- +- * sf@2002 - Set Server Scale +- * SetServerScale - Server must change the scale of the client buffer. +- */ +- +-typedef struct _rfbSetScaleMsg { +- uint8_t type; /* always rfbSetScale */ +- uint8_t scale; /* Scale value 1server messages. +- */ +- +-typedef union { +- uint8_t type; +- rfbSetPixelFormatMsg spf; +- rfbFixColourMapEntriesMsg fcme; +- rfbSetEncodingsMsg se; +- rfbFramebufferUpdateRequestMsg fur; +- rfbKeyEventMsg ke; +- rfbPointerEventMsg pe; +- rfbClientCutTextMsg cct; +- rfbSetScaleMsg ssc; +- rfbPalmVNCSetScaleFactorMsg pssf; +- rfbSetServerInputMsg sim; +- rfbFileTransferMsg ft; +- rfbSetSWMsg sw; +- rfbTextChatMsg tc; +- rfbXvpMsg xvp; +-} rfbClientToServerMsg; +- +-/* +- * vncauth.h - describes the functions provided by the vncauth library. +- */ +- +-#define MAXPWLEN 8 +-#define CHALLENGESIZE 16 +- +-extern int rfbEncryptAndStorePasswd(char *passwd, char *fname); +-extern char *rfbDecryptPasswdFromFile(char *fname); +-extern void rfbRandomBytes(unsigned char *bytes); +-extern void rfbEncryptBytes(unsigned char *bytes, char *passwd); +- +- +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbregion.h b/remmina-plugins/vnc/libvncserver/rfb/rfbregion.h +deleted file mode 100644 +index 53da667..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfb/rfbregion.h ++++ /dev/null +@@ -1,65 +0,0 @@ +-#ifndef SRAREGION_H +-#define SRAREGION_H +- +-/* -=- SRA - Simple Region Algorithm +- * A simple rectangular region implementation. +- * Copyright (c) 2001 James "Wez" Weatherall, Johannes E. Schindelin +- */ +- +-/* -=- sraRect */ +- +-typedef struct _rect { +- int x1; +- int y1; +- int x2; +- int y2; +-} sraRect; +- +-typedef struct sraRegion sraRegion; +- +-/* -=- Region manipulation functions */ +- +-extern sraRegion *sraRgnCreate(); +-extern sraRegion *sraRgnCreateRect(int x1, int y1, int x2, int y2); +-extern sraRegion *sraRgnCreateRgn(const sraRegion *src); +- +-extern void sraRgnDestroy(sraRegion *rgn); +-extern void sraRgnMakeEmpty(sraRegion *rgn); +-extern rfbBool sraRgnAnd(sraRegion *dst, const sraRegion *src); +-extern void sraRgnOr(sraRegion *dst, const sraRegion *src); +-extern rfbBool sraRgnSubtract(sraRegion *dst, const sraRegion *src); +- +-extern void sraRgnOffset(sraRegion *dst, int dx, int dy); +- +-extern rfbBool sraRgnPopRect(sraRegion *region, sraRect *rect, +- unsigned long flags); +- +-extern unsigned long sraRgnCountRects(const sraRegion *rgn); +-extern rfbBool sraRgnEmpty(const sraRegion *rgn); +- +-extern sraRegion *sraRgnBBox(const sraRegion *src); +- +-/* -=- rectangle iterator */ +- +-typedef struct sraRectangleIterator { +- rfbBool reverseX,reverseY; +- int ptrSize,ptrPos; +- struct sraSpan** sPtrs; +-} sraRectangleIterator; +- +-extern sraRectangleIterator *sraRgnGetIterator(sraRegion *s); +-extern sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,rfbBool reverseX,rfbBool reverseY); +-extern rfbBool sraRgnIteratorNext(sraRectangleIterator *i,sraRect *r); +-extern void sraRgnReleaseIterator(sraRectangleIterator *i); +- +-void sraRgnPrint(const sraRegion *s); +- +-/* -=- Rectangle clipper (for speed) */ +- +-extern rfbBool sraClipRect(int *x, int *y, int *w, int *h, +- int cx, int cy, int cw, int ch); +- +-extern rfbBool sraClipRect2(int *x, int *y, int *x2, int *y2, +- int cx, int cy, int cx2, int cy2); +- +-#endif +diff --git a/remmina-plugins/vnc/libvncserver/rfbconfig.h.in b/remmina-plugins/vnc/libvncserver/rfbconfig.h.in +deleted file mode 100644 +index cdd322b..0000000 +--- a/remmina-plugins/vnc/libvncserver/rfbconfig.h.in ++++ /dev/null +@@ -1,420 +0,0 @@ +-/* rfbconfig.h.in. Generated from configure.ac by autoheader. */ +- +-/* Define if building universal (internal helper macro) */ +-#undef AC_APPLE_UNIVERSAL_BUILD +- +-/* Enable 24 bit per pixel in native framebuffer */ +-#undef ALLOW24BPP +- +-/* work around when write() returns ENOENT but does not mean it */ +-#undef ENOENT_WORKAROUND +- +-/* Use ffmpeg (for vnc2mpg) */ +-#undef FFMPEG +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_ARPA_INET_H +- +-/* Avahi/mDNS client build environment present */ +-#undef HAVE_AVAHI +- +-/* Define to 1 if you have the `crypt' function. */ +-#undef HAVE_CRYPT +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_DLFCN_H +- +-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +-#undef HAVE_DOPRNT +- +-/* DPMS extension build environment present */ +-#undef HAVE_DPMS +- +-/* FBPM extension build environment present */ +-#undef HAVE_FBPM +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_FCNTL_H +- +-/* Define to 1 if you have the `fork' function. */ +-#undef HAVE_FORK +- +-/* Define to 1 if you have the `ftime' function. */ +-#undef HAVE_FTIME +- +-/* Define to 1 if you have the `geteuid' function. */ +-#undef HAVE_GETEUID +- +-/* Define to 1 if you have the `gethostbyname' function. */ +-#undef HAVE_GETHOSTBYNAME +- +-/* Define to 1 if you have the `gethostname' function. */ +-#undef HAVE_GETHOSTNAME +- +-/* Define to 1 if you have the `getpwnam' function. */ +-#undef HAVE_GETPWNAM +- +-/* Define to 1 if you have the `getpwuid' function. */ +-#undef HAVE_GETPWUID +- +-/* Define to 1 if you have the `getspnam' function. */ +-#undef HAVE_GETSPNAM +- +-/* Define to 1 if you have the `gettimeofday' function. */ +-#undef HAVE_GETTIMEOFDAY +- +-/* Define to 1 if you have the `getuid' function. */ +-#undef HAVE_GETUID +- +-/* Define to 1 if you have the `grantpt' function. */ +-#undef HAVE_GRANTPT +- +-/* Define to 1 if you have the `inet_ntoa' function. */ +-#undef HAVE_INET_NTOA +- +-/* Define to 1 if you have the `initgroups' function. */ +-#undef HAVE_INITGROUPS +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_INTTYPES_H +- +-/* IRIX XReadDisplay available */ +-#undef HAVE_IRIX_XREADDISPLAY +- +-/* libcrypt library present */ +-#undef HAVE_LIBCRYPT +- +-/* openssl libcrypto library present */ +-#undef HAVE_LIBCRYPTO +- +-/* Define to 1 if you have the `cygipc' library (-lcygipc). */ +-#undef HAVE_LIBCYGIPC +- +-/* Define to 1 if you have the `jpeg' library (-ljpeg). */ +-#undef HAVE_LIBJPEG +- +-/* Define to 1 if you have the `nsl' library (-lnsl). */ +-#undef HAVE_LIBNSL +- +-/* Define to 1 if you have the `pthread' library (-lpthread). */ +-#undef HAVE_LIBPTHREAD +- +-/* Define to 1 if you have the `socket' library (-lsocket). */ +-#undef HAVE_LIBSOCKET +- +-/* openssl libssl library present */ +-#undef HAVE_LIBSSL +- +-/* XDAMAGE extension build environment present */ +-#undef HAVE_LIBXDAMAGE +- +-/* XFIXES extension build environment present */ +-#undef HAVE_LIBXFIXES +- +-/* XINERAMA extension build environment present */ +-#undef HAVE_LIBXINERAMA +- +-/* XRANDR extension build environment present */ +-#undef HAVE_LIBXRANDR +- +-/* DEC-XTRAP extension build environment present */ +-#undef HAVE_LIBXTRAP +- +-/* Define to 1 if you have the `z' library (-lz). */ +-#undef HAVE_LIBZ +- +-/* linux fb device build environment present */ +-#undef HAVE_LINUX_FB_H +- +-/* linux/input.h present */ +-#undef HAVE_LINUX_INPUT_H +- +-/* linux uinput device build environment present */ +-#undef HAVE_LINUX_UINPUT_H +- +-/* video4linux build environment present */ +-#undef HAVE_LINUX_VIDEODEV_H +- +-/* build MacOS X native display support */ +-#undef HAVE_MACOSX_NATIVE_DISPLAY +- +-/* MacOS X OpenGL present */ +-#undef HAVE_MACOSX_OPENGL_H +- +-/* Define to 1 if you have the `memmove' function. */ +-#undef HAVE_MEMMOVE +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_MEMORY_H +- +-/* Define to 1 if you have the `memset' function. */ +-#undef HAVE_MEMSET +- +-/* Define to 1 if you have the `mkfifo' function. */ +-#undef HAVE_MKFIFO +- +-/* Define to 1 if you have the `mmap' function. */ +-#undef HAVE_MMAP +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_NETDB_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_NETINET_IN_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_PWD_H +- +-/* RECORD extension build environment present */ +-#undef HAVE_RECORD +- +-/* Define to 1 if you have the `select' function. */ +-#undef HAVE_SELECT +- +-/* Define to 1 if you have the `setegid' function. */ +-#undef HAVE_SETEGID +- +-/* Define to 1 if you have the `seteuid' function. */ +-#undef HAVE_SETEUID +- +-/* Define to 1 if you have the `setgid' function. */ +-#undef HAVE_SETGID +- +-/* Define to 1 if you have the `setpgrp' function. */ +-#undef HAVE_SETPGRP +- +-/* Define to 1 if you have the `setsid' function. */ +-#undef HAVE_SETSID +- +-/* Define to 1 if you have the `setuid' function. */ +-#undef HAVE_SETUID +- +-/* Define to 1 if you have the `setutxent' function. */ +-#undef HAVE_SETUTXENT +- +-/* Define to 1 if you have the `shmat' function. */ +-#undef HAVE_SHMAT +- +-/* Define to 1 if you have the `socket' function. */ +-#undef HAVE_SOCKET +- +-/* Solaris XReadScreen available */ +-#undef HAVE_SOLARIS_XREADSCREEN +- +-/* Define to 1 if `stat' has the bug that it succeeds when given the +- zero-length file name argument. */ +-#undef HAVE_STAT_EMPTY_STRING_BUG +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_STDINT_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_STDLIB_H +- +-/* Define to 1 if you have the `strchr' function. */ +-#undef HAVE_STRCHR +- +-/* Define to 1 if you have the `strcspn' function. */ +-#undef HAVE_STRCSPN +- +-/* Define to 1 if you have the `strdup' function. */ +-#undef HAVE_STRDUP +- +-/* Define to 1 if you have the `strerror' function. */ +-#undef HAVE_STRERROR +- +-/* Define to 1 if you have the `strftime' function. */ +-#undef HAVE_STRFTIME +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_STRINGS_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_STRING_H +- +-/* Define to 1 if you have the `strstr' function. */ +-#undef HAVE_STRSTR +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYSLOG_H +- +-/* Use the system libvncserver build environment for x11vnc. */ +-#undef HAVE_SYSTEM_LIBVNCSERVER +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_IOCTL_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_SOCKET_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_STAT_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_STROPTS_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_TIMEB_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_TIME_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_SYS_TYPES_H +- +-/* Define to 1 if you have that is POSIX.1 compatible. */ +-#undef HAVE_SYS_WAIT_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_TERMIOS_H +- +-/* Define to 1 if compiler supports __thread */ +-#undef HAVE_TLS +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_UNISTD_H +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_UTMPX_H +- +-/* Define to 1 if you have the `vfork' function. */ +-#undef HAVE_VFORK +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_VFORK_H +- +-/* Define to 1 if you have the `vprintf' function. */ +-#undef HAVE_VPRINTF +- +-/* Define to 1 if you have the `waitpid' function. */ +-#undef HAVE_WAITPID +- +-/* Define to 1 if `fork' works. */ +-#undef HAVE_WORKING_FORK +- +-/* Define to 1 if `vfork' works. */ +-#undef HAVE_WORKING_VFORK +- +-/* Define to 1 if you have the header file. */ +-#undef HAVE_WS2TCPIP_H +- +-/* X11 build environment present */ +-#undef HAVE_X11 +- +-/* open ssl X509_print_ex_fp available */ +-#undef HAVE_X509_PRINT_EX_FP +- +-/* XKEYBOARD extension build environment present */ +-#undef HAVE_XKEYBOARD +- +-/* MIT-SHM extension build environment present */ +-#undef HAVE_XSHM +- +-/* XTEST extension build environment present */ +-#undef HAVE_XTEST +- +-/* XTEST extension has XTestGrabControl */ +-#undef HAVE_XTESTGRABCONTROL +- +-/* Enable IPv6 support */ +-#undef IPv6 +- +-/* Define to 1 if `lstat' dereferences a symlink specified with a trailing +- slash. */ +-#undef LSTAT_FOLLOWS_SLASHED_SYMLINK +- +-/* Need a typedef for in_addr_t */ +-#undef NEED_INADDR_T +- +-/* Define to 1 if your C compiler doesn't accept -c and -o together. */ +-#undef NO_MINUS_C_MINUS_O +- +-/* Name of package */ +-#undef PACKAGE +- +-/* Define to the address where bug reports for this package should be sent. */ +-#undef PACKAGE_BUGREPORT +- +-/* Define to the full name of this package. */ +-#undef PACKAGE_NAME +- +-/* Define to the full name and version of this package. */ +-#undef PACKAGE_STRING +- +-/* Define to the one symbol short name of this package. */ +-#undef PACKAGE_TARNAME +- +-/* Define to the home page for this package. */ +-#undef PACKAGE_URL +- +-/* Define to the version of this package. */ +-#undef PACKAGE_VERSION +- +-/* The number of bytes in type char */ +-#undef SIZEOF_CHAR +- +-/* The number of bytes in type int */ +-#undef SIZEOF_INT +- +-/* The number of bytes in type long */ +-#undef SIZEOF_LONG +- +-/* The number of bytes in type short */ +-#undef SIZEOF_SHORT +- +-/* The number of bytes in type void* */ +-#undef SIZEOF_VOIDP +- +-/* Define to 1 if you have the ANSI C header files. */ +-#undef STDC_HEADERS +- +-/* Define to 1 if you can safely include both and . */ +-#undef TIME_WITH_SYS_TIME +- +-/* Version number of package */ +-#undef VERSION +- +-/* Enable support for libgcrypt in libvncclient */ +-#undef WITH_CLIENT_GCRYPT +- +-/* Enable support for gnutls in libvncclient */ +-#undef WITH_CLIENT_TLS +- +-/* Disable TightVNCFileTransfer protocol */ +-#undef WITH_TIGHTVNC_FILETRANSFER +- +-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most +- significant byte first (like Motorola and SPARC, unlike Intel). */ +-#if defined AC_APPLE_UNIVERSAL_BUILD +-# if defined __BIG_ENDIAN__ +-# define WORDS_BIGENDIAN 1 +-# endif +-#else +-# ifndef WORDS_BIGENDIAN +-# undef WORDS_BIGENDIAN +-# endif +-#endif +- +-/* Define to 1 if the X Window System is missing or not being used. */ +-#undef X_DISPLAY_MISSING +- +-/* Define to empty if `const' does not conform to ANSI C. */ +-#undef const +- +-/* Define to `__inline__' or `__inline' if that's what the C compiler +- calls it, or to nothing if 'inline' is not supported under any name. */ +-#ifndef __cplusplus +-#undef inline +-#endif +- +-/* Define to `int' if does not define. */ +-#undef pid_t +- +-/* Define to `unsigned int' if does not define. */ +-#undef size_t +- +-/* The type for socklen */ +-#undef socklen_t +- +-/* Define as `fork' if `vfork' does not work. */ +-#undef vfork diff --git a/remmina-1.0.0-trayicon-patch b/remmina-1.0.0-trayicon-patch new file mode 100644 index 0000000..d940dbd --- /dev/null +++ b/remmina-1.0.0-trayicon-patch @@ -0,0 +1,53 @@ +From cb0b209b775e08b0529786d18079437a58398621 Mon Sep 17 00:00:00 2001 +From: Rex Tsai +Date: Wed, 7 Mar 2012 16:44:01 +0800 +Subject: [PATCH] Add --icon/-i option, contributed by Whoopie. fixed #14 + +Signed-off-by: Rex Tsai +--- + remmina/src/remmina.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/remmina/src/remmina.c b/remmina/src/remmina.c +index 2a9c74b..c121880 100644 +--- a/remmina/src/remmina.c ++++ b/remmina/src/remmina.c +@@ -55,6 +55,7 @@ + static gboolean remmina_option_quit; + static gchar *remmina_option_server; + static gchar *remmina_option_protocol; ++static gboolean remmina_option_icon; + + static GOptionEntry remmina_options[] = + { +@@ -68,6 +69,7 @@ + { "quit", 'q', 0, G_OPTION_ARG_NONE, &remmina_option_quit, "Quit the application", NULL }, + { "server", 's', 0, G_OPTION_ARG_STRING, &remmina_option_server, "Use default server name S", "S" }, + { "protocol", 't', 0, G_OPTION_ARG_STRING, &remmina_option_protocol, "Use default protocol T", "T" }, ++{ "icon", 'i', 0, G_OPTION_ARG_NONE, &remmina_option_icon, "Start as tray icon", NULL }, + { NULL } }; + + static gint remmina_on_command_line(GApplication *app, GApplicationCommandLine *cmdline) +@@ -90,6 +92,7 @@ static gint remmina_on_command_line(GApplication *app, GApplicationCommandLine * + remmina_option_plugin = NULL; + remmina_option_server = NULL; + remmina_option_protocol = NULL; ++ remmina_option_icon = FALSE; + + argv = g_application_command_line_get_arguments(cmdline, &argc); + +@@ -157,6 +160,11 @@ static gint remmina_on_command_line(GApplication *app, GApplicationCommandLine * + remmina_exec_command(REMMINA_COMMAND_PLUGIN, remmina_option_plugin); + executed = TRUE; + } ++ if (remmina_option_icon) ++ { ++ remmina_exec_command(REMMINA_COMMAND_NONE, remmina_option_icon); ++ executed = TRUE; ++ } + if (!executed) + { + remmina_exec_command(REMMINA_COMMAND_MAIN, NULL); +-- +1.8.1.6 + From dd784075e986f4756ddd9b88e2a079595f87b3e8 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 07:28:12 -0500 Subject: [PATCH 030/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 722b7f4..52aa93e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.0.0 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -411,6 +411,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 1.0.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Tue May 07 2013 Christoph Wickert - 1.0.0-7 - Fix scrolling in VNC (#830210) - Handle GDK_SCROLL_SMOOTH in VNC and RDP From 916b8e34487af62ba0ef1fce7aff8a6f8410181f Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 2 Dec 2013 16:57:06 -0700 Subject: [PATCH 031/185] Obsolete/Provide qtnx (Bug #1034046) --- remmina.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 52aa93e..eb041d9 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.0.0 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -143,6 +143,8 @@ Summary: NX plugin for Remmina Remote Desktop Client Group: Applications/System Requires: %{name}%{?_isa} = %{version}-%{release} Requires: nx +Obsoletes: qtnx < 0.9-17 +Provides: qtnx = 0.9-17 %description plugins-nx Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -411,6 +413,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Dec 02 2013 Orion Poplawski - 1.0.0-9 +- Obsolete/Provide qtnx (Bug #1034046) + * Sun Aug 04 2013 Fedora Release Engineering - 1.0.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 361777dac866b6f46d06ace357d487c89b358539 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 24 Apr 2014 22:35:07 +0200 Subject: [PATCH 032/185] Rebuild for new libgcrypt --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index eb041d9..d43138b 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.0.0 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Remote Desktop Client Group: Applications/Internet @@ -413,6 +413,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Apr 24 2014 Tomáš Mráz - 1.0.0-10 +- Rebuild for new libgcrypt + * Mon Dec 02 2013 Orion Poplawski - 1.0.0-9 - Obsolete/Provide qtnx (Bug #1034046) From da4b3887ee903ba91b8cc8bcebbaec12e7a42997 Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Thu, 22 May 2014 13:33:24 +0400 Subject: [PATCH 033/185] Commit by request of Simone Caronni to coordinate common work under it. Attempt build master branch of Remmina and freerdp in rawhide. They are built (see my copr repo http://copr.fedoraproject.org/coprs/hubbitus/test/repo/fedora-rawhide-i386/hubbitus-test-fedora-rawhide-i386.repo) but still segfaults: https://github.com/FreeRDP/Remmina/issues/269 https://github.com/FreeRDP/Remmina/issues/270 Arm build also failed: http://koji.fedoraproject.org/koji/taskinfo?taskID=6872274 Meantime commit is not so bad because it already have broken deps in rawhide and even failed to build now (from mail): -- from mail -- remmina has broken dependencies in the rawhide tree: On x86_64: remmina-1.0.0-8.fc20.x86_64 requires libgcrypt.so.11(GCRYPT_1.2)(64bit) remmina-1.0.0-8.fc20.x86_64 requires libgcrypt.so.11()(64bit) On i386: remmina-1.0.0-8.fc20.i686 requires libgcrypt.so.11(GCRYPT_1.2) remmina-1.0.0-8.fc20.i686 requires libgcrypt.so.11 On armhfp: remmina-1.0.0-8.fc20.armv7hl requires libgcrypt.so.11(GCRYPT_1.2) remmina-1.0.0-8.fc20.armv7hl requires libgcrypt.so.11 On x86_64: remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-rail.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-kbd.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-gdi.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-core.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-codec.so.1.0()(64bit) remmina-plugins-rdp-1.0.0-8.fc20.x86_64 requires libfreerdp-channels.so.1.0()(64bit) On i386: remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-rail.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-kbd.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-gdi.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-core.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-codec.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.i686 requires libfreerdp-channels.so.1.0 On armhfp: remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-rail.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-kbd.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-gdi.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-core.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-codec.so.1.0 remmina-plugins-rdp-1.0.0-8.fc20.armv7hl requires libfreerdp-channels.so.1.0 Please resolve this as soon as possible. -- /from mail -- --- .gitignore | 1 + ...-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch | 82 - remmina-1.0.0-add-clipboard-support.patch | 663 - remmina-1.0.0-clipboard-bugfix.patch | 73 - ...1.0.0-close-SSH-tunnel-on-disconnect.patch | 44 - ...nect-signal-handler-after-disconnect.patch | 53 - remmina-1.0.0-dsofix.patch | 11 - remmina-1.0.0-fix-crashes-in-some-cases.patch | 71 - remmina-1.0.0-fix-desktop-file.patch | 39 - ...ix-fullscreen-with-multiple-monitors.patch | 35 - remmina-1.0.0-fix-install-paths.patch | 13 - remmina-1.0.0-fix-library-name.patch | 25 - remmina-1.0.0-fix-memory-leak.patch | 24 - ...na-1.0.0-fix-scrolling-in-vnc-plugin.patch | 32 - ...a-1.0.0-fix-typo-when-fitting-window.patch | 25 - remmina-1.0.0-linker-error.patch | 262 - ...ina-1.0.0-remove-inline-libvncserver.patch | 20338 ---------------- remmina-1.0.0-some-more-clipboard-fixes.patch | 180 - remmina-1.0.0-trayicon-patch | 53 - remmina.spec | 170 +- sources | 2 +- 21 files changed, 42 insertions(+), 22154 deletions(-) delete mode 100644 remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch delete mode 100644 remmina-1.0.0-add-clipboard-support.patch delete mode 100644 remmina-1.0.0-clipboard-bugfix.patch delete mode 100644 remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch delete mode 100644 remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch delete mode 100644 remmina-1.0.0-dsofix.patch delete mode 100644 remmina-1.0.0-fix-crashes-in-some-cases.patch delete mode 100644 remmina-1.0.0-fix-desktop-file.patch delete mode 100644 remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch delete mode 100644 remmina-1.0.0-fix-install-paths.patch delete mode 100644 remmina-1.0.0-fix-library-name.patch delete mode 100644 remmina-1.0.0-fix-memory-leak.patch delete mode 100644 remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch delete mode 100644 remmina-1.0.0-fix-typo-when-fitting-window.patch delete mode 100644 remmina-1.0.0-linker-error.patch delete mode 100644 remmina-1.0.0-remove-inline-libvncserver.patch delete mode 100644 remmina-1.0.0-some-more-clipboard-fixes.patch delete mode 100644 remmina-1.0.0-trayicon-patch diff --git a/.gitignore b/.gitignore index 7332920..4f85810 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ remmina-0.7.5.tar.gz /remmina-0.9.3.tar.gz /remmina-20120330gitffba771d.tar.bz2 /Remmina-1.0.0.tar.gz +/Remmina-26b814aec6e930746d079c885449dd50d3484fb0.tar.gz diff --git a/remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch b/remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch deleted file mode 100644 index 49f8b14..0000000 --- a/remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch +++ /dev/null @@ -1,82 +0,0 @@ -From fe1b698e4a6bba7783edcb3d0431e6acb24323f4 Mon Sep 17 00:00:00 2001 -From: Jean-Louis Dupond -Date: Sun, 22 Apr 2012 23:08:47 +0200 -Subject: [PATCH] Also handle GDK_SCROLL_SMOOTH - ---- - remmina-plugins/rdp/rdp_event.c | 9 +++++++++ - remmina-plugins/vnc/vnc_plugin.c | 12 ++++++++++++ - remmina/src/remmina_connection_window.c | 14 ++++++++++++++ - 3 files changed, 35 insertions(+) - -diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c -index de8e01f..3d3e67a 100644 ---- a/remmina-plugins/rdp/rdp_event.c -+++ b/remmina-plugins/rdp/rdp_event.c -@@ -377,6 +377,15 @@ static gboolean remmina_rdp_event_on_scroll(GtkWidget* widget, GdkEventScroll* e - case GDK_SCROLL_DOWN: - flag = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088; - break; -+ -+ case GDK_SCROLL_SMOOTH: -+ if (event->delta_y < 0) -+ flag = PTR_FLAGS_WHEEL | 0x0078; -+ if (event->delta_y > 0) -+ flag = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088; -+ if (!flag) -+ return FALSE; -+ break; - - default: - return FALSE; -diff --git a/remmina-plugins/vnc/vnc_plugin.c b/remmina-plugins/vnc/vnc_plugin.c -index 0321057..f000ccb 100644 ---- a/remmina-plugins/vnc/vnc_plugin.c -+++ b/remmina-plugins/vnc/vnc_plugin.c -@@ -1426,6 +1426,18 @@ static gboolean remmina_plugin_vnc_on_scroll(GtkWidget *widget, GdkEventScroll * - case GDK_SCROLL_RIGHT: - mask = (1 << 6); - break; -+ case GDK_SCROLL_SMOOTH: -+ if (event->delta_y < 0) -+ mask = (1 << 3); -+ if (event->delta_y > 0) -+ mask = (1 << 4); -+ if (event->delta_x < 0) -+ mask = (1 << 5); -+ if (event->delta_x > 0) -+ mask = (1 << 6); -+ if (!mask) -+ return FALSE; -+ break; - default: - return FALSE; - } -diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c -index dfcc353..5487697 100644 ---- a/remmina/src/remmina_connection_window.c -+++ b/remmina/src/remmina_connection_window.c -@@ -1477,6 +1477,20 @@ static gboolean remmina_connection_holder_toolbar_scroll(GtkWidget* widget, GdkE - return TRUE; - } - break; -+ case GDK_SCROLL_SMOOTH: -+ if (event->delta_y < 0 && opacity > 0) -+ { -+ remmina_file_set_int(cnnobj->remmina_file, "toolbar_opacity", opacity - 1); -+ remmina_connection_holder_update_toolbar_opacity(cnnhld); -+ return TRUE; -+ } -+ if (event->delta_y > 0 && opacity < TOOLBAR_OPACITY_LEVEL) -+ { -+ remmina_file_set_int(cnnobj->remmina_file, "toolbar_opacity", opacity + 1); -+ remmina_connection_holder_update_toolbar_opacity(cnnhld); -+ return TRUE; -+ } -+ break; - default: - break; - } --- -1.8.1.6 - diff --git a/remmina-1.0.0-add-clipboard-support.patch b/remmina-1.0.0-add-clipboard-support.patch deleted file mode 100644 index 57b16b9..0000000 --- a/remmina-1.0.0-add-clipboard-support.patch +++ /dev/null @@ -1,663 +0,0 @@ -From 3ebdd6e7b0ee53ecdaf0d14bada6b92e7334b12a Mon Sep 17 00:00:00 2001 -From: Jean-Louis Dupond -Date: Mon, 30 Apr 2012 23:10:04 +0200 -Subject: [PATCH] Add clipboard support - ---- - remmina-plugins/rdp/CMakeLists.txt | 2 + - remmina-plugins/rdp/rdp_cliprdr.c | 459 ++++++++++++++++++++++++++++++++++++ - remmina-plugins/rdp/rdp_cliprdr.h | 33 +++ - remmina-plugins/rdp/rdp_event.c | 19 ++ - remmina-plugins/rdp/rdp_plugin.c | 15 ++ - remmina-plugins/rdp/rdp_plugin.h | 6 +- - 6 files changed, 533 insertions(+), 1 deletion(-) - create mode 100644 remmina-plugins/rdp/rdp_cliprdr.c - create mode 100644 remmina-plugins/rdp/rdp_cliprdr.h - -diff --git a/remmina-plugins/rdp/CMakeLists.txt b/remmina-plugins/rdp/CMakeLists.txt -index e3ec20b..8ae4a4d 100644 ---- a/remmina-plugins/rdp/CMakeLists.txt -+++ b/remmina-plugins/rdp/CMakeLists.txt -@@ -33,6 +33,8 @@ set(REMMINA_PLUGIN_RDP_SRCS - rdp_gdi.h - rdp_graphics.c - rdp_graphics.h -+ rdp_cliprdr.c -+ rdp_cliprdr.h - ) - - add_library(remmina-plugin-rdp ${REMMINA_PLUGIN_RDP_SRCS}) -diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c -new file mode 100644 -index 0000000..0821ffa ---- /dev/null -+++ b/remmina-plugins/rdp/rdp_cliprdr.c -@@ -0,0 +1,459 @@ -+/* -+ * Remmina - The GTK+ Remote Desktop Client -+ * Copyright (C) 2012-2012 Jean-Louis Dupond -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, -+ * Boston, MA 02111-1307, USA. -+ */ -+ -+#include "rdp_plugin.h" -+#include "rdp_cliprdr.h" -+ -+#include -+#include -+#include -+#include -+ -+/* -+ * Get the formats we can export based on the current clipboard data. -+ */ -+void remmina_rdp_cliprdr_get_target_types(uint32** dst_formats, uint16* size, GdkAtom* types, int count) -+{ -+ int i; -+ gboolean image = FALSE; -+ gboolean text = FALSE; -+ gboolean textutf8 = FALSE; -+ int matches = 1; -+ uint32* formats = (uint32*) xmalloc(sizeof(uint32) * 10); -+ -+ formats[0] = CB_FORMAT_RAW; -+ for (i = 0; i < count; i++) -+ { -+ GdkAtom atom = GDK_POINTER_TO_ATOM(types[i]); -+ gchar* name = gdk_atom_name(atom); -+ if (g_strcmp0("UTF8_STRING", name) == 0 || g_strcmp0("text/plain;charset=utf-8", name) == 0) -+ { -+ textutf8 = TRUE; -+ } -+ if (g_strcmp0("TEXT", name) == 0 || g_strcmp0("text/plain", name) == 0) -+ { -+ text = TRUE; -+ } -+ if (g_strcmp0("text/html", name) == 0) -+ { -+ formats[matches] = CB_FORMAT_HTML; -+ matches++; -+ } -+ if (g_strcmp0("image/png", name) == 0) -+ { -+ formats[matches] = CB_FORMAT_PNG; -+ image = TRUE; -+ matches++; -+ } -+ if (g_strcmp0("image/jpeg", name) == 0) -+ { -+ formats[matches] = CB_FORMAT_JPEG; -+ image = TRUE; -+ matches++; -+ } -+ if (g_strcmp0("image/bmp", name) == 0) -+ { -+ formats[matches] = CB_FORMAT_DIB; -+ image = TRUE; -+ matches++; -+ } -+ } -+ //Only add text formats if we don't have image formats -+ if (!image) -+ { -+ if (textutf8) -+ { -+ formats[matches] = CB_FORMAT_UNICODETEXT; -+ matches++; -+ } -+ if (text) -+ { -+ formats[matches] = CB_FORMAT_TEXT; -+ matches++; -+ } -+ } -+ -+ *size = (uint16)matches; -+ *dst_formats = (uint32*) xmalloc(sizeof(uint32) * matches); -+ memcpy(*dst_formats, formats, sizeof(uint32) * matches); -+ g_free(formats); -+} -+ -+int remmina_rdp_cliprdr_send_format_list_event(RemminaProtocolWidget* gp) -+{ -+ GtkClipboard* clipboard; -+ GdkAtom* targets; -+ gboolean result = 0; -+ gint count; -+ RDP_EVENT* rdp_event; -+ RDP_CB_FORMAT_LIST_EVENT* format_list_event; -+ rfContext* rfi = GET_DATA(gp); -+ -+ /* Lets see if we have something in our clipboard */ -+ THREADS_ENTER -+ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); -+ if (clipboard) -+ { -+ result = gtk_clipboard_wait_for_targets(clipboard, &targets, &count); -+ } -+ THREADS_LEAVE -+ -+ if (!result) -+ return 1; -+ -+ int i; -+ for (i = 0; i < count; i++) -+ { -+ g_printf("Target %d: %s\n", i, gdk_atom_name(targets[i])); -+ } -+ -+ rdp_event = (RDP_EVENT*) xnew(RDP_CB_FORMAT_LIST_EVENT); -+ rdp_event->event_class = RDP_EVENT_CLASS_CLIPRDR; -+ rdp_event->event_type = RDP_EVENT_TYPE_CB_FORMAT_LIST; -+ format_list_event = (RDP_CB_FORMAT_LIST_EVENT*) rdp_event; -+ -+ remmina_rdp_cliprdr_get_target_types(&format_list_event->formats, &format_list_event->num_formats, targets, count); -+ g_free(targets); -+ -+ int num_formats = format_list_event->num_formats; -+ g_printf("Sending %d formats\n", num_formats); -+ for (i = 0; i < num_formats; i++) -+ { -+ g_printf("Sending format %#X\n", format_list_event->formats[i]); -+ } -+ -+ return freerdp_channels_send_event(rfi->channels, (RDP_EVENT*) format_list_event); -+} -+ -+static uint8* lf2crlf(uint8* data, int* size) -+{ -+ uint8 c; -+ uint8* outbuf; -+ uint8* out; -+ uint8* in_end; -+ uint8* in; -+ int out_size; -+ -+ out_size = (*size) * 2 + 1; -+ outbuf = (uint8*) xmalloc(out_size); -+ out = outbuf; -+ in = data; -+ in_end = data + (*size); -+ -+ while (in < in_end) -+ { -+ c = *in++; -+ if (c == '\n') -+ { -+ *out++ = '\r'; -+ *out++ = '\n'; -+ } -+ else -+ { -+ *out++ = c; -+ } -+ } -+ -+ *out++ = 0; -+ *size = out - outbuf; -+ -+ return outbuf; -+} -+ -+static void crlf2lf(uint8* data, int* size) -+{ -+ uint8 c; -+ uint8* out; -+ uint8* in; -+ uint8* in_end; -+ -+ out = data; -+ in = data; -+ in_end = data + (*size); -+ -+ while (in < in_end) -+ { -+ c = *in++; -+ -+ if (c != '\r') -+ *out++ = c; -+ } -+ -+ *size = out - data; -+} -+ -+uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, int* size) -+{ -+ g_printf("GetData: Requested Format: %#X\n", format); -+ rfContext* rfi = GET_DATA(gp); -+ GtkClipboard* clipboard; -+ uint8* inbuf = NULL; -+ uint8* outbuf = NULL; -+ GdkPixbuf *image = NULL; -+ -+ THREADS_ENTER -+ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); -+ if (clipboard) -+ { -+ if (format == CB_FORMAT_TEXT || format == CB_FORMAT_UNICODETEXT || format == CB_FORMAT_HTML) -+ { -+ inbuf = (uint8*)gtk_clipboard_wait_for_text(clipboard); -+ } -+ if (format == CB_FORMAT_PNG || format == CB_FORMAT_JPEG || format == CB_FORMAT_DIB) -+ { -+ image = gtk_clipboard_wait_for_image(clipboard); -+ } -+ } -+ THREADS_LEAVE -+ -+ if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT) -+ { -+ lf2crlf(inbuf, size); -+ if (format == CB_FORMAT_TEXT) -+ { -+ outbuf = inbuf; -+ } -+ if (format == CB_FORMAT_HTML) -+ { -+ //TODO: check if we need special handling for HTML -+ outbuf = inbuf; -+ } -+ if (format == CB_FORMAT_UNICODETEXT) -+ { -+ size_t out_size; -+ UNICONV* uniconv; -+ -+ uniconv = freerdp_uniconv_new(); -+ outbuf = (uint8*) freerdp_uniconv_out(uniconv, (char*) inbuf, &out_size); -+ freerdp_uniconv_free(uniconv); -+ *size = out_size + 2; -+ } -+ } -+ if (format == CB_FORMAT_PNG || format == CB_FORMAT_JPEG || format == CB_FORMAT_DIB) -+ { -+ gchar* data; -+ gsize buffersize; -+ if (format == CB_FORMAT_PNG) -+ { -+ gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "png", NULL, NULL); -+ memcpy(outbuf, data, buffersize); -+ } -+ if (format == CB_FORMAT_JPEG) -+ { -+ gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "jpeg", NULL, NULL); -+ memcpy(outbuf, data, buffersize); -+ } -+ if (format == CB_FORMAT_DIB) -+ { -+ gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "bmp", NULL, NULL); -+ *size = buffersize - 14; -+ g_printf("Size of pixels: %d\n", *size); -+ outbuf = (uint8*) xmalloc(*size); -+ memcpy(outbuf, data + 14, *size); -+ } -+ } -+ -+ if (!outbuf) -+ outbuf = (uint8*)""; -+ -+ return outbuf; -+} -+ -+void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVENT* event) -+{ -+ g_printf("Received RDP_EVENT_TYPE_CB_DATA_RESPONSE\n"); -+ -+ GtkClipboard* clipboard; -+ GdkPixbuf *image = NULL; -+ uint8* data; -+ int size; -+ gboolean text = FALSE; -+ gboolean img = FALSE; -+ rfContext* rfi = GET_DATA(gp); -+ RDP_CB_DATA_RESPONSE_EVENT* data_response_event; -+ -+ data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*) event; -+ data = data_response_event->data; -+ size = data_response_event->size; -+ -+ g_printf("Requested format was: 0x%x\n", rfi->requested_format); -+ -+ if (rfi->requested_format == CB_FORMAT_TEXT || rfi->requested_format == CB_FORMAT_UNICODETEXT || rfi->requested_format == CB_FORMAT_HTML) -+ { -+ if (rfi->requested_format == CB_FORMAT_UNICODETEXT) -+ { -+ UNICONV* uniconv; -+ -+ uniconv = freerdp_uniconv_new(); -+ data = (uint8*) freerdp_uniconv_in(uniconv, data, size); -+ size = strlen((char*) data); -+ freerdp_uniconv_free(uniconv); -+ } -+ crlf2lf(data, &size); -+ text = TRUE; -+ } -+ if (rfi->requested_format == CB_FORMAT_DIB || rfi->requested_format == CB_FORMAT_PNG || rfi->requested_format == CB_FORMAT_JPEG) -+ { -+ /* Reconstruct header */ -+ if (rfi->requested_format == CB_FORMAT_DIB) -+ { -+ STREAM* s; -+ uint16 bpp; -+ uint32 offset; -+ uint32 ncolors; -+ -+ s = stream_new(0); -+ stream_attach(s, data, size); -+ stream_seek(s, 14); -+ stream_read_uint16(s, bpp); -+ stream_read_uint32(s, ncolors); -+ offset = 14 + 40 + (bpp <= 8 ? (ncolors == 0 ? (1 << bpp) : ncolors) * 4 : 0); -+ stream_detach(s); -+ stream_free(s); -+ -+ s = stream_new(14 + size); -+ stream_write_uint8(s, 'B'); -+ stream_write_uint8(s, 'M'); -+ stream_write_uint32(s, 14 + size); -+ stream_write_uint32(s, 0); -+ stream_write_uint32(s, offset); -+ stream_write(s, data, size); -+ -+ data = stream_get_head(s); -+ size = stream_get_length(s); -+ stream_detach(s); -+ stream_free(s); -+ } -+ GdkPixbufLoader *pixbuf; -+ pixbuf = gdk_pixbuf_loader_new(); -+ gdk_pixbuf_loader_write(pixbuf, data, size, NULL); -+ image = gdk_pixbuf_loader_get_pixbuf(pixbuf); -+ img = TRUE; -+ } -+ -+ THREADS_ENTER -+ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); -+ if (clipboard) -+ { -+ if (text || img) -+ rfi->clipboard_wait = TRUE; -+ if (text) -+ gtk_clipboard_set_text(clipboard, (gchar*)data, size); -+ if (img) -+ gtk_clipboard_set_image(clipboard, image); -+ } -+ THREADS_LEAVE -+ -+} -+ -+void remmina_handle_channel_event(RemminaProtocolWidget* gp, RDP_EVENT* event) -+{ -+ RDP_EVENT* rdp_event = NULL; -+ rfContext* rfi = GET_DATA(gp); -+ -+ switch (event->event_class) -+ { -+ case RDP_EVENT_CLASS_CLIPRDR: -+ g_printf("Event ID: %d\n", event->event_type); -+ if (event->event_type == RDP_EVENT_TYPE_CB_MONITOR_READY) -+ { -+ g_printf("Received CB_MONITOR_READY - Sending RDP_EVENT_TYPE_CB_FORMAT_LIST\n"); -+ /* Sending our format list */ -+ remmina_rdp_cliprdr_send_format_list_event(gp); -+ } -+ if (event->event_type == RDP_EVENT_TYPE_CB_FORMAT_LIST) -+ { -+ /* We received a FORMAT_LIST from the server, update our clipboard */ -+ g_printf("Received RDP_EVENT_TYPE_CB_FORMAT_LIST\n"); -+ int i; -+ uint32 format = CB_FORMAT_RAW; -+ RDP_CB_FORMAT_LIST_EVENT* format_list_event; -+ -+ format_list_event = (RDP_CB_FORMAT_LIST_EVENT*) event; -+ -+ g_printf("Format List Size: %d\n", format_list_event->num_formats); -+ for (i = 0; i < format_list_event->num_formats; i++) -+ { -+ g_printf("Format: 0x%X\n", format_list_event->formats[i]); -+ if (format_list_event->formats[i] == CB_FORMAT_UNICODETEXT) -+ { -+ format = CB_FORMAT_UNICODETEXT; -+ break; -+ } -+ if (format_list_event->formats[i] == CB_FORMAT_DIB) -+ { -+ format = CB_FORMAT_DIB; -+ break; -+ } -+ if (format_list_event->formats[i] == CB_FORMAT_JPEG) -+ { -+ format = CB_FORMAT_JPEG; -+ break; -+ } -+ if (format_list_event->formats[i] == CB_FORMAT_PNG) -+ { -+ format = CB_FORMAT_PNG; -+ break; -+ } -+ if (format_list_event->formats[i] == CB_FORMAT_TEXT) -+ { -+ format = CB_FORMAT_TEXT; -+ break; -+ } -+ } -+ rfi->requested_format = format; -+ -+ g_printf("Format Requested: 0x%X\n", format); -+ /* Request Clipboard data of the server */ -+ RDP_CB_DATA_REQUEST_EVENT* data_request_event; -+ rdp_event = (RDP_EVENT*) xnew(RDP_CB_DATA_REQUEST_EVENT); -+ rdp_event->event_class = RDP_EVENT_CLASS_CLIPRDR; -+ rdp_event->event_type = RDP_EVENT_TYPE_CB_DATA_REQUEST; -+ data_request_event = (RDP_CB_DATA_REQUEST_EVENT*) rdp_event; -+ data_request_event->format = format; -+ freerdp_channels_send_event(rfi->channels, (RDP_EVENT*) data_request_event); -+ } -+ if (event->event_type == RDP_EVENT_TYPE_CB_DATA_REQUEST) -+ { -+ g_printf("Received RDP_EVENT_TYPE_CB_DATA_REQUEST\n"); -+ -+ uint8* data; -+ int size; -+ RDP_CB_DATA_REQUEST_EVENT* data_request_event = (RDP_CB_DATA_REQUEST_EVENT*) event; -+ RDP_CB_DATA_RESPONSE_EVENT* data_response_event; -+ -+ g_printf("Event Format: %d\n", data_request_event->format); -+ -+ /* Send Data */ -+ rdp_event = (RDP_EVENT*) xnew(RDP_CB_DATA_RESPONSE_EVENT); -+ rdp_event->event_class = RDP_EVENT_CLASS_CLIPRDR; -+ rdp_event->event_type = RDP_EVENT_TYPE_CB_DATA_RESPONSE; -+ data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*) rdp_event; -+ data = remmina_rdp_cliprdr_get_data(gp, data_request_event->format, &size); -+ data_response_event->data = data; -+ data_response_event->size = size; -+ freerdp_channels_send_event(rfi->channels, rdp_event); -+ } -+ if (event->event_type == RDP_EVENT_TYPE_CB_DATA_RESPONSE) -+ { -+ remmina_rdp_cliprdr_parse_response_event(gp, event); -+ } -+ } -+} -diff --git a/remmina-plugins/rdp/rdp_cliprdr.h b/remmina-plugins/rdp/rdp_cliprdr.h -new file mode 100644 -index 0000000..ed6bf70 ---- /dev/null -+++ b/remmina-plugins/rdp/rdp_cliprdr.h -@@ -0,0 +1,33 @@ -+/* -+ * Remmina - The GTK+ Remote Desktop Client -+ * Copyright (C) 2010-2011 Vic Lee -+ * Copyright (C) 2012-2012 Jean-Louis Dupond -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, -+ * Boston, MA 02111-1307, USA. -+ */ -+ -+#ifndef __REMMINA_RDP_CLIPRDR_H__ -+#define __REMMINA_RDP_CLIPRDR_H__ -+ -+G_BEGIN_DECLS -+ -+RDP_EVENT* remmina_rdp_cliprdr_get_event(uint16 event_type); -+int remmina_rdp_cliprdr_send_format_list_event(RemminaProtocolWidget* gp); -+void remmina_handle_channel_event(RemminaProtocolWidget* gp, RDP_EVENT* event); -+ -+G_END_DECLS -+ -+#endif -diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c -index f77f5f1..a936fb1 100644 ---- a/remmina-plugins/rdp/rdp_event.c -+++ b/remmina-plugins/rdp/rdp_event.c -@@ -452,6 +452,16 @@ static gboolean remmina_rdp_event_on_key(GtkWidget* widget, GdkEventKey* event, - return TRUE; - } - -+static gboolean remmina_rdp_event_on_clipboard(GtkClipboard *clipboard, GdkEvent *event, RemminaProtocolWidget *gp) -+{ -+ RemminaPluginRdpEvent rdp_event = { 0 }; -+ -+ rdp_event.type = REMMINA_RDP_EVENT_TYPE_CLIPBOARD; -+ remmina_rdp_event_event_push(gp, &rdp_event); -+ -+ return TRUE; -+} -+ - void remmina_rdp_event_init(RemminaProtocolWidget* gp) - { - gint n; -@@ -461,6 +471,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) - XPixmapFormatValues* pf; - XPixmapFormatValues* pfs; - rfContext* rfi; -+ GtkClipboard* clipboard; - - rfi = GET_DATA(gp); - rfi->drawing_area = gtk_drawing_area_new(); -@@ -499,6 +510,14 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) - g_signal_connect(G_OBJECT(rfi->drawing_area), "key-release-event", - G_CALLBACK(remmina_rdp_event_on_key), gp); - -+ RemminaFile* remminafile = remmina_plugin_service->protocol_plugin_get_file(gp); -+ if (!remmina_plugin_service->file_get_int(remminafile, "disableclipboard", FALSE)) -+ { -+ clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); -+ g_signal_connect(clipboard, "owner-change", -+ G_CALLBACK(remmina_rdp_event_on_clipboard), gp); -+ } -+ - rfi->pressed_keys = g_array_new(FALSE, TRUE, sizeof (gint)); - rfi->event_queue = g_async_queue_new_full(g_free); - rfi->ui_queue = g_async_queue_new(); -diff --git a/remmina-plugins/rdp/rdp_plugin.c b/remmina-plugins/rdp/rdp_plugin.c -index 08874e6..fd0fe08 100644 ---- a/remmina-plugins/rdp/rdp_plugin.c -+++ b/remmina-plugins/rdp/rdp_plugin.c -@@ -24,6 +24,7 @@ - #include "rdp_graphics.h" - #include "rdp_file.h" - #include "rdp_settings.h" -+#include "rdp_cliprdr.h" - - #include - #include -@@ -31,6 +32,7 @@ - #include - #include - #include -+#include - - #define REMMINA_RDP_FEATURE_TOOL_REFRESH 1 - #define REMMINA_RDP_FEATURE_SCALE 2 -@@ -155,6 +157,11 @@ boolean rf_check_fds(RemminaProtocolWidget* gp) - input->MouseEvent(input, event->mouse_event.flags, - event->mouse_event.x, event->mouse_event.y); - break; -+ case REMMINA_RDP_EVENT_TYPE_CLIPBOARD: -+ if (!rfi->clipboard_wait) -+ remmina_rdp_cliprdr_send_format_list_event(gp); -+ rfi->clipboard_wait = FALSE; -+ break; - } - - g_free(event); -@@ -530,6 +537,7 @@ static boolean remmina_rdp_verify_certificate(freerdp* instance, char* subject, - - static int remmina_rdp_receive_channel_data(freerdp* instance, int channelId, uint8* data, int size, int flags, int total_size) - { -+ g_printf("EVENT RECEIVED -> DATA: %s\nSIZE: %d\nFLAGS: %d\n", (char*)data, size, flags); - return freerdp_channels_data(instance, channelId, data, size, flags, total_size); - } - -@@ -545,6 +553,7 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp) - fd_set rfds_set; - fd_set wfds_set; - rfContext* rfi; -+ RDP_EVENT* event; - - memset(rfds, 0, sizeof(rfds)); - memset(wfds, 0, sizeof(wfds)); -@@ -618,6 +627,12 @@ static void remmina_rdp_main_loop(RemminaProtocolWidget* gp) - { - break; - } -+ else -+ { -+ event = freerdp_channels_pop_event(rfi->channels); -+ if (event) -+ remmina_handle_channel_event(gp, event); -+ } - /* check ui */ - if (!rf_check_fds(gp)) - { -diff --git a/remmina-plugins/rdp/rdp_plugin.h b/remmina-plugins/rdp/rdp_plugin.h -index a3774d9..1931384 100644 ---- a/remmina-plugins/rdp/rdp_plugin.h -+++ b/remmina-plugins/rdp/rdp_plugin.h -@@ -133,12 +133,16 @@ struct rf_context - GArray* pressed_keys; - GAsyncQueue* event_queue; - gint event_pipe[2]; -+ -+ gboolean clipboard_wait; -+ uint32 requested_format; - }; - - typedef enum - { - REMMINA_RDP_EVENT_TYPE_SCANCODE, -- REMMINA_RDP_EVENT_TYPE_MOUSE -+ REMMINA_RDP_EVENT_TYPE_MOUSE, -+ REMMINA_RDP_EVENT_TYPE_CLIPBOARD - } RemminaPluginRdpEventType; - - struct remmina_plugin_rdp_event --- -1.7.10 - diff --git a/remmina-1.0.0-clipboard-bugfix.patch b/remmina-1.0.0-clipboard-bugfix.patch deleted file mode 100644 index c564c8e..0000000 --- a/remmina-1.0.0-clipboard-bugfix.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 97c2af8ccc913b0850ed4a54ed6c477cfbd7b475 Mon Sep 17 00:00:00 2001 -From: Jean-Louis Dupond -Date: Tue, 1 May 2012 17:37:21 +0200 -Subject: [PATCH] clipboard bugfix + cleanup of memory - ---- - remmina-plugins/rdp/rdp_cliprdr.c | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - -diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c -index 0821ffa..b9b37ad 100644 ---- a/remmina-plugins/rdp/rdp_cliprdr.c -+++ b/remmina-plugins/rdp/rdp_cliprdr.c -@@ -225,7 +225,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - - if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT) - { -- lf2crlf(inbuf, size); -+ inbuf = lf2crlf(inbuf, size); - if (format == CB_FORMAT_TEXT) - { - outbuf = inbuf; -@@ -269,6 +269,11 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - memcpy(outbuf, data + 14, *size); - } - } -+ -+ if (inbuf) -+ g_free(inbuf); -+ if (G_IS_OBJECT(image)) -+ g_object_unref(image); - - if (!outbuf) - outbuf = (uint8*)""; -@@ -288,7 +293,7 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE - gboolean img = FALSE; - rfContext* rfi = GET_DATA(gp); - RDP_CB_DATA_RESPONSE_EVENT* data_response_event; -- -+ GdkPixbufLoader *pixbuf; - data_response_event = (RDP_CB_DATA_RESPONSE_EVENT*) event; - data = data_response_event->data; - size = data_response_event->size; -@@ -341,7 +346,6 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE - stream_detach(s); - stream_free(s); - } -- GdkPixbufLoader *pixbuf; - pixbuf = gdk_pixbuf_loader_new(); - gdk_pixbuf_loader_write(pixbuf, data, size, NULL); - image = gdk_pixbuf_loader_get_pixbuf(pixbuf); -@@ -355,9 +359,17 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE - if (text || img) - rfi->clipboard_wait = TRUE; - if (text) -- gtk_clipboard_set_text(clipboard, (gchar*)data, size); -+ { -+ gtk_clipboard_set_text(clipboard, (gchar*)data, size); -+ gtk_clipboard_store(clipboard); -+ } - if (img) -+ { - gtk_clipboard_set_image(clipboard, image); -+ gtk_clipboard_store(clipboard); -+ gdk_pixbuf_loader_close(pixbuf, NULL); -+ g_object_unref(pixbuf); -+ } - } - THREADS_LEAVE - --- -1.7.10 - diff --git a/remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch b/remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch deleted file mode 100644 index 23faf23..0000000 --- a/remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit bed49ad62d78718c0876c000a97c68cc87f12c7c -Author: Jean-Louis Dupond -Date: Sat Sep 1 20:56:09 2012 +0200 - - Closes #77: Close the SSH tunnel after the connection has been closed - -Index: FreeRDP-Remmina-356c033/remmina/src/remmina_protocol_widget.c -=================================================================== ---- FreeRDP-Remmina-356c033.orig/remmina/src/remmina_protocol_widget.c -+++ FreeRDP-Remmina-356c033/remmina/src/remmina_protocol_widget.c -@@ -267,13 +267,7 @@ gboolean remmina_protocol_widget_close_c - gp->priv->chat_window = NULL; - } - --#ifdef HAVE_LIBSSH -- if (gp->priv->ssh_tunnel) -- { -- remmina_ssh_tunnel_free(gp->priv->ssh_tunnel); -- gp->priv->ssh_tunnel = NULL; -- } --#endif -+ gboolean retval; - - if (!gp->priv->plugin || !gp->priv->plugin->close_connection) - { -@@ -281,7 +275,17 @@ gboolean remmina_protocol_widget_close_c - return FALSE; - } - -- return gp->priv->plugin->close_connection(gp); -+ retval = gp->priv->plugin->close_connection(gp); -+ -+ #ifdef HAVE_LIBSSH -+ if (gp->priv->ssh_tunnel) -+ { -+ remmina_ssh_tunnel_free(gp->priv->ssh_tunnel); -+ gp->priv->ssh_tunnel = NULL; -+ } -+ #endif -+ -+ return retval; - } - - static gboolean remmina_protocol_widget_emit_signal_timeout(gpointer user_data) diff --git a/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch b/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch deleted file mode 100644 index 4258919..0000000 --- a/remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch +++ /dev/null @@ -1,53 +0,0 @@ -From c1ef3a162622942d7c556c5a4352e626c7bcb28f Mon Sep 17 00:00:00 2001 -From: Jean-Louis Dupond -Date: Tue, 8 May 2012 14:44:16 +0200 -Subject: [PATCH] Disconnect signal handler after disconnect - ---- - remmina-plugins/rdp/rdp_event.c | 10 ++++++++-- - remmina-plugins/rdp/rdp_plugin.h | 1 + - 2 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/remmina-plugins/rdp/rdp_event.c b/remmina-plugins/rdp/rdp_event.c -index a936fb1..2c050c6 100644 ---- a/remmina-plugins/rdp/rdp_event.c -+++ b/remmina-plugins/rdp/rdp_event.c -@@ -514,8 +514,7 @@ void remmina_rdp_event_init(RemminaProtocolWidget* gp) - if (!remmina_plugin_service->file_get_int(remminafile, "disableclipboard", FALSE)) - { - clipboard = gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD); -- g_signal_connect(clipboard, "owner-change", -- G_CALLBACK(remmina_rdp_event_on_clipboard), gp); -+ rfi->clipboard_handler = g_signal_connect(clipboard, "owner-change", G_CALLBACK(remmina_rdp_event_on_clipboard), gp); - } - - rfi->pressed_keys = g_array_new(FALSE, TRUE, sizeof (gint)); -@@ -566,6 +565,13 @@ void remmina_rdp_event_uninit(RemminaProtocolWidget* gp) - - rfi = GET_DATA(gp); - -+ -+ /* unregister the clipboard monitor */ -+ if (rfi->clipboard_handler) -+ { -+ g_signal_handler_disconnect(G_OBJECT(gtk_widget_get_clipboard(rfi->drawing_area, GDK_SELECTION_CLIPBOARD)), rfi->clipboard_handler); -+ rfi->clipboard_handler = NULL; -+ } - if (rfi->scale_handler) - { - g_source_remove(rfi->scale_handler); -diff --git a/remmina-plugins/rdp/rdp_plugin.h b/remmina-plugins/rdp/rdp_plugin.h -index ff66906..08b8891 100644 ---- a/remmina-plugins/rdp/rdp_plugin.h -+++ b/remmina-plugins/rdp/rdp_plugin.h -@@ -134,6 +134,7 @@ struct rf_context - GAsyncQueue* event_queue; - gint event_pipe[2]; - -+ gint clipboard_handler; - gint clipboard_wait; - uint32 requested_format; - }; --- -1.7.10 - diff --git a/remmina-1.0.0-dsofix.patch b/remmina-1.0.0-dsofix.patch deleted file mode 100644 index 2778e0d..0000000 --- a/remmina-1.0.0-dsofix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- remmina-plugins/vnc/CMakeLists.txt 2012-06-04 13:03:46.542093149 -0600 -+++ remmina-plugins/vnc/CMakeLists.txt 2012-06-04 13:03:34.112332497 -0600 -@@ -28,7 +28,7 @@ - set_target_properties(remmina-plugin-vnc PROPERTIES PREFIX "") - - include_directories(${REMMINA_COMMON_INCLUDE_DIRS} ${LIBVNCSERVER_INCLUDE_DIRS}) --target_link_libraries(remmina-plugin-vnc ${REMMINA_COMMON_LIBRARIES} ${LIBVNCSERVER_LIBRARIES}) -+target_link_libraries(remmina-plugin-vnc ${REMMINA_COMMON_LIBRARIES} ${LIBVNCSERVER_LIBRARIES} gnutls ) - - install(TARGETS remmina-plugin-vnc DESTINATION ${REMMINA_PLUGINDIR}) - diff --git a/remmina-1.0.0-fix-crashes-in-some-cases.patch b/remmina-1.0.0-fix-crashes-in-some-cases.patch deleted file mode 100644 index 64baac0..0000000 --- a/remmina-1.0.0-fix-crashes-in-some-cases.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 6ee2028996ee9d8802201e95f3cec56e2b307ddb Mon Sep 17 00:00:00 2001 -From: Jean-Louis Dupond -Date: Sat, 5 May 2012 16:54:18 +0200 -Subject: [PATCH] Fix crashes in some cases - ---- - remmina-plugins/rdp/rdp_cliprdr.c | 19 +++++++++++++------ - 1 file changed, 13 insertions(+), 6 deletions(-) - -diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c -index d84374e..772709c 100644 ---- a/remmina-plugins/rdp/rdp_cliprdr.c -+++ b/remmina-plugins/rdp/rdp_cliprdr.c -@@ -204,7 +204,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - g_printf("GetData: Requested Format: %#X\n", format); - rfContext* rfi = GET_DATA(gp); - GtkClipboard* clipboard; -- uint8* inbuf = (uint8*)""; -+ uint8* inbuf = NULL; - uint8* outbuf = NULL; - GdkPixbuf *image = NULL; - -@@ -223,10 +223,18 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - } - THREADS_LEAVE - -+ /* No data received, send nothing */ -+ if (inbuf == NULL && image == NULL) -+ { -+ g_printf("NO DATA RECEIVED\n"); -+ *size = 0; -+ return NULL; -+ } -+ -+ - if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT) - { -- if (inbuf == NULL) -- inbuf = (uint8*)""; -+ *size = strlen((char*)inbuf); - inbuf = lf2crlf(inbuf, size); - if (format == CB_FORMAT_TEXT) - { -@@ -258,12 +266,14 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "png", NULL, NULL); - outbuf = (uint8*) xmalloc(buffersize); - memcpy(outbuf, data, buffersize); -+ *size = buffersize; - } - if (format == CB_FORMAT_JPEG) - { - gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "jpeg", NULL, NULL); - outbuf = (uint8*) xmalloc(buffersize); - memcpy(outbuf, data, buffersize); -+ *size = buffersize; - } - if (format == CB_FORMAT_DIB) - { -@@ -276,9 +286,6 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - g_object_unref(image); - } - -- if (!outbuf) -- outbuf = (uint8*)""; -- - return outbuf; - } - --- -1.7.10 - diff --git a/remmina-1.0.0-fix-desktop-file.patch b/remmina-1.0.0-fix-desktop-file.patch deleted file mode 100644 index 5fd5eef..0000000 --- a/remmina-1.0.0-fix-desktop-file.patch +++ /dev/null @@ -1,39 +0,0 @@ -Index: remmina-1.0.0/remmina/desktop/CMakeLists.txt -=================================================================== ---- remmina-1.0.0.orig/remmina/desktop/CMakeLists.txt -+++ remmina-1.0.0/remmina/desktop/CMakeLists.txt -@@ -38,3 +38,4 @@ install(FILES ${ICON32_DATA} DESTINATION - install(FILES ${ICON48_DATA} DESTINATION ${ICON48_DIR}) - install(FILES ${ICONSVG_DATA} DESTINATION ${ICONSVG_DIR}) - -+install(FILES remmina.desktop DESTINATION "${REMMINA_DATADIR}/applications") -Index: remmina-1.0.0/CMakeLists.txt -=================================================================== ---- remmina-1.0.0.orig/CMakeLists.txt -+++ remmina-1.0.0/CMakeLists.txt -@@ -78,7 +78,7 @@ include_directories(.) - include_directories(remmina/include) - - set(REMMINA_VERSION "0.9.99.1") --set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share/remmina") -+set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share") - set(REMMINA_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale") - set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/lib/remmina/plugins") - -Index: remmina-1.0.0/remmina/desktop/remmina.desktop -=================================================================== ---- /dev/null -+++ remmina-1.0.0/remmina/desktop/remmina.desktop -@@ -0,0 +1,12 @@ -+[Desktop Entry] -+Version=1.0 -+Name=Remmina Remote Desktop Client -+Comment=Connect to remote desktops -+TryExec=remmina -+Exec=remmina -+Icon=remmina -+Terminal=false -+Type=Application -+Actions= -+Categories=GTK;GNOME;X-GNOME-NetworkSettings;Network; -+ diff --git a/remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch b/remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch deleted file mode 100644 index 0996515..0000000 --- a/remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch +++ /dev/null @@ -1,35 +0,0 @@ -commit 348e01d27869a577ad5df9bf6286f876b34a40c0 -Author: Jean-Louis Dupond -Date: Mon Sep 10 20:08:00 2012 +0200 - - Fix fullscreen mode with multiple monitors - -diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c -index 761b2f4..7a5b214 100644 ---- a/remmina/src/remmina_connection_window.c -+++ b/remmina/src/remmina_connection_window.c -@@ -496,13 +496,21 @@ static void remmina_connection_holder_check_resize(RemminaConnectionHolder* cnnh - DECLARE_CNNOBJ - gboolean scroll_required = FALSE; - GdkScreen* screen; -+ gint monitor; -+ GdkRectangle screen_size; - gint screen_width, screen_height; - gint server_width, server_height; - - remmina_connection_holder_get_desktop_size(cnnhld, &server_width, &server_height, FALSE); -- screen = gdk_screen_get_default(); -- screen_width = gdk_screen_get_width(screen); -- screen_height = gdk_screen_get_height(screen); -+ screen = gtk_window_get_screen(GTK_WINDOW(cnnhld->cnnwin)); -+ monitor = gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(GTK_WIDGET(cnnhld->cnnwin))); -+#ifdef gdk_screen_get_monitor_workarea -+ gdk_screen_get_monitor_workarea(screen, monitor, &screen_size); -+#else -+ gdk_screen_get_monitor_geometry(screen, monitor, &screen_size); -+#endif -+ screen_width = screen_size.width; -+ screen_height = screen_size.height; - - if (!remmina_protocol_widget_get_expand(REMMINA_PROTOCOL_WIDGET(cnnobj->proto)) - && (server_width <= 0 || server_height <= 0 || screen_width < server_width diff --git a/remmina-1.0.0-fix-install-paths.patch b/remmina-1.0.0-fix-install-paths.patch deleted file mode 100644 index e47203e..0000000 --- a/remmina-1.0.0-fix-install-paths.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: remmina-1.0.0/CMakeLists.txt -=================================================================== ---- remmina-1.0.0.orig/CMakeLists.txt -+++ remmina-1.0.0/CMakeLists.txt -@@ -80,7 +80,7 @@ include_directories(remmina/include) - set(REMMINA_VERSION "0.9.99.1") - set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share") - set(REMMINA_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale") --set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/lib/remmina/plugins") -+set(REMMINA_PLUGINDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/remmina/plugins") - - find_suggested_package(PTHREAD) - if(PTHREAD_FOUND) diff --git a/remmina-1.0.0-fix-library-name.patch b/remmina-1.0.0-fix-library-name.patch deleted file mode 100644 index 1774dd6..0000000 --- a/remmina-1.0.0-fix-library-name.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 503a008e4aedc74b775c785f96292b8f5c448137 Mon Sep 17 00:00:00 2001 -From: Andrey -Date: Sat, 10 Mar 2012 01:00:32 +0400 -Subject: [PATCH] fix library name mistake - ---- - cmake/FindGTK3.cmake | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake -index c1b019e..f73b64d 100644 ---- a/cmake/FindGTK3.cmake -+++ b/cmake/FindGTK3.cmake -@@ -48,7 +48,7 @@ find_path(GDKPIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h - HINTS ${PC_GDKPIXBUF_INCLUDEDIR} ${PC_GDKPIXBUF_INCLUDE_DIRS} - PATH_SUFFIXES gdk-pixbuf-2.0) - --find_library(GDKPIXBUF_LIBRARY NAMES gdk-3 -+find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0 - HINTS ${PC_GDKPIXBUF_LIBDIR} ${PC_GDKPIXBUF_LIBRARY_DIRS}) - - # Glib --- -1.7.5.4 - diff --git a/remmina-1.0.0-fix-memory-leak.patch b/remmina-1.0.0-fix-memory-leak.patch deleted file mode 100644 index a0aac1a..0000000 --- a/remmina-1.0.0-fix-memory-leak.patch +++ /dev/null @@ -1,24 +0,0 @@ -From b22778270ad05fed21797d5a5d4b782d6e273a59 Mon Sep 17 00:00:00 2001 -From: Jean-Louis Dupond -Date: Sat, 5 May 2012 17:15:29 +0200 -Subject: [PATCH] Fix memory leak - ---- - remmina-plugins/rdp/rdp_cliprdr.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c -index 772709c..ea8baa0 100644 ---- a/remmina-plugins/rdp/rdp_cliprdr.c -+++ b/remmina-plugins/rdp/rdp_cliprdr.c -@@ -74,6 +74,7 @@ void remmina_rdp_cliprdr_get_target_types(uint32** dst_formats, uint16* size, Gd - image = TRUE; - matches++; - } -+ g_free(name); - } - //Only add text formats if we don't have image formats - if (!image) --- -1.7.10 - diff --git a/remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch b/remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch deleted file mode 100644 index 56e23fd..0000000 --- a/remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit c422e9c0396e405ef5a3d2a6b24dbc83c20afe2f -Author: Jean-Louis Dupond -Date: Wed Apr 25 11:57:39 2012 +0200 - - Also fix scrolling on VNC plugin - -Index: FreeRDP-Remmina-356c033/remmina-plugins/rdp/rdp_event.c -=================================================================== ---- FreeRDP-Remmina-356c033.orig/remmina-plugins/rdp/rdp_event.c -+++ FreeRDP-Remmina-356c033/remmina-plugins/rdp/rdp_event.c -@@ -468,7 +468,7 @@ void remmina_rdp_event_init(RemminaProto - gtk_container_add(GTK_CONTAINER(gp), rfi->drawing_area); - - gtk_widget_add_events(rfi->drawing_area, GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK -- | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK); -+ | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_SCROLL_MASK); - gtk_widget_set_can_focus(rfi->drawing_area, TRUE); - - remmina_plugin_service->protocol_plugin_register_hostkey(gp, rfi->drawing_area); -Index: FreeRDP-Remmina-356c033/remmina-plugins/vnc/vnc_plugin.c -=================================================================== ---- FreeRDP-Remmina-356c033.orig/remmina-plugins/vnc/vnc_plugin.c -+++ FreeRDP-Remmina-356c033/remmina-plugins/vnc/vnc_plugin.c -@@ -1847,7 +1847,7 @@ static void remmina_plugin_vnc_init(Remm - gtk_widget_add_events( - gpdata->drawing_area, - GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK -- | GDK_KEY_RELEASE_MASK); -+ | GDK_KEY_RELEASE_MASK | GDK_SCROLL_MASK); - gtk_widget_set_can_focus(gpdata->drawing_area, TRUE); - - #if GTK_VERSION == 3 diff --git a/remmina-1.0.0-fix-typo-when-fitting-window.patch b/remmina-1.0.0-fix-typo-when-fitting-window.patch deleted file mode 100644 index 799b059..0000000 --- a/remmina-1.0.0-fix-typo-when-fitting-window.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 1901a1e9e5282c1deca2f5f98476e2c7e9243d35 Mon Sep 17 00:00:00 2001 -From: Jean-Louis Dupond -Date: Mon, 10 Sep 2012 14:12:11 +0200 -Subject: [PATCH] Closes #63: fix typo when fitting window - ---- - remmina/src/remmina_connection_window.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/remmina/src/remmina_connection_window.c b/remmina/src/remmina_connection_window.c -index 7ff1246..2ba8193 100644 ---- a/remmina/src/remmina_connection_window.c -+++ b/remmina/src/remmina_connection_window.c -@@ -436,7 +436,7 @@ static gboolean remmina_connection_holder_toolbar_autofit_restore(RemminaConnect - remmina_connection_holder_get_desktop_size(cnnhld, &width, &height, TRUE); - gtk_widget_get_allocation(priv->notebook, &na); - gtk_widget_get_allocation(cnnobj->scrolled_container, &ca); -- gtk_widget_get_allocation(priv->toolbar, &ca); -+ gtk_widget_get_allocation(priv->toolbar, &ta); - gtk_window_resize(GTK_WINDOW(cnnhld->cnnwin), MAX(1, width + na.width - ca.width), - MAX(1, height + ta.height + na.height - ca.height)); - gtk_container_check_resize(GTK_CONTAINER(cnnhld->cnnwin)); --- -1.8.1.6 - diff --git a/remmina-1.0.0-linker-error.patch b/remmina-1.0.0-linker-error.patch deleted file mode 100644 index 298767c..0000000 --- a/remmina-1.0.0-linker-error.patch +++ /dev/null @@ -1,262 +0,0 @@ -From 13f203672155cd52278655f03da7ff8dcff75c29 Mon Sep 17 00:00:00 2001 -From: Andrey Gankov -Date: Sat, 10 Mar 2012 02:55:32 +0400 -Subject: [PATCH] Fix Issue #9: linker error - ---- - cmake/FindGLIB2.cmake | 120 ++++++++++++++++++++++++++++++++++++++++++++++++ - cmake/FindGTK2.cmake | 21 ++------- - cmake/FindGTK3.cmake | 24 +++------- - remmina/CMakeLists.txt | 9 ++++ - 4 files changed, 140 insertions(+), 34 deletions(-) - create mode 100644 cmake/FindGLIB2.cmake - -diff --git a/cmake/FindGLIB2.cmake b/cmake/FindGLIB2.cmake -new file mode 100644 -index 0000000..8208ded ---- /dev/null -+++ b/cmake/FindGLIB2.cmake -@@ -0,0 +1,120 @@ -+# Remmina - The GTK+ Remote Desktop Client -+# -+# Copyright (C) 2012 Andrey Gankov -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place, Suite 330, -+# Boston, MA 02111-1307, USA. -+ -+set(_GLIB_found_all true) -+ -+# Glib -+ -+pkg_check_modules(PC_GLIB2 glib-2.0) -+ -+if(NOT PC_GLIB2_FOUND) -+ set(_GLIB_found_all false) -+endif() -+ -+find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h -+ HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} -+ PATH_SUFFIXES glib-2.0) -+ -+find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h -+ HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} -+ PATH_SUFFIXES glib-2.0/include) -+ -+set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2}) -+ -+find_library(GLIB2_LIBRARY NAMES glib-2.0) -+ -+# GIO -+ -+pkg_check_modules(PC_GIO gio-2.0) -+ -+if(NOT PC_GIO_FOUND) -+ set(_GLIB_found_all false) -+endif() -+ -+find_path(GIO_INCLUDE_DIR gio/gio.h -+ HINTS ${PC_GIO_INCLUDEDIR} ${PC_GIO_INCLUDE_DIRS} -+ PATH_SUFFIXES gio-2.0) -+ -+find_library(GIO_LIBRARY NAMES gio-2.0 -+ HINTS ${PC_GIO_LIBDIR} ${PC_GIO_LIBRARY_DIRS}) -+ -+# gobject -+ -+pkg_check_modules(PC_GOBJECT gobject-2.0) -+ -+if(NOT PC_GOBJECT_FOUND) -+ set(_GLIB_found_all false) -+endif() -+ -+find_path(GOBJECT_INCLUDE_DIR gobject/gobject.h -+ HINTS ${PC_GOBJECT_INCLUDEDIR} ${PC_GOBJECT_INCLUDE_DIRS} -+ PATH_SUFFIXES gobject-2.0) -+ -+find_library(GOBJECT_LIBRARY NAMES gobject-2.0 -+ HINTS ${PC_GOBJECT_LIBDIR} ${PC_GOBJECT_LIBRARY_DIRS}) -+ -+# gmodule -+ -+pkg_check_modules(PC_GMODULE gmodule-2.0) -+ -+if(NOT PC_GMODULE_FOUND) -+ set(_GLIB_found_all false) -+endif() -+ -+find_path(GMODULE_INCLUDE_DIR gmodule.h -+ HINTS ${PC_GMODULE_INCLUDEDIR} ${PC_GMODULE_INCLUDE_DIRS} -+ PATH_SUFFIXES gmodule-2.0) -+ -+find_library(GMODULE_LIBRARY NAMES gmodule-2.0 -+ HINTS ${PC_GMODULE_LIBDIR} ${PC_GMODULE_LIBRARY_DIRS}) -+ -+# gthread -+ -+pkg_check_modules(PC_GTHREAD gthread-2.0) -+ -+if(NOT PC_GTHREAD_FOUND) -+ set(_GLIB_found_all false) -+endif() -+ -+find_path(GTHREAD_INCLUDE_DIR glib/gthread.h -+ HINTS ${PC_GTHREAD_INCLUDEDIR} ${PC_GTHREAD_INCLUDE_DIRS} -+ PATH_SUFFIXES gthread-2.0) -+ -+find_library(GTHREAD_LIBRARY NAMES gthread-2.0 -+ HINTS ${PC_GTHREAD_LIBDIR} ${PC_GTHREAD_LIBRARY_DIRS}) -+ -+# Finalize -+ -+if(_GLIB_found_all) -+ include(FindPackageHandleStandardArgs) -+ -+ find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARY GLIB2_INCLUDE_DIR) -+ -+ set(GLIB2_LIBRARIES ${GLIB2_LIBRARY} ${GIO_LIBRARY} ${GOBJECT_LIBRARY} ${GMODULE_LIBRARY} ${GTHREAD_LIBRARY}) -+ set(GLIB2_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${GIO_INCLUDE_DIR} ${GOBJECT_INCLUDE_DIR} ${GMODULE_INCLUDE_DIR} ${GTHREAD_INCLUDE_DIR}) -+ -+ mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARY) -+ -+ set(GLIB_FOUND true) -+else() -+ unset(GLIB2_LIBRARY) -+ unset(GLIB2_INCLUDE_DIR) -+ -+ set(GLIB_FOUND false) -+endif() -diff --git a/cmake/FindGTK2.cmake b/cmake/FindGTK2.cmake -index b33966e..caf0295 100644 ---- a/cmake/FindGTK2.cmake -+++ b/cmake/FindGTK2.cmake -@@ -63,24 +63,11 @@ find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0 - - # Glib - --pkg_check_modules(PC_GLIB2 glib-2.0) -- --if(NOT PC_GLIB2_FOUND) -+find_required_package(GLIB2) -+if(NOT GLIB2_FOUND) - set(_GTK2_found_all false) - endif() - --find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h -- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} -- PATH_SUFFIXES glib-2.0) -- --find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h -- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} -- PATH_SUFFIXES glib-2.0/include) -- --set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2}) -- --find_library(GLIB2_LIBRARY NAMES glib-2.0) -- - # Pango - - pkg_check_modules(PC_PANGO pango) -@@ -129,8 +116,8 @@ if(_GTK2_found_all) - - find_package_handle_standard_args(GTK2 DEFAULT_MSG GTK2_LIBRARY GTK2_INCLUDE_DIR) - -- set(GTK2_LIBRARIES ${GTK2_LIBRARY} ${GDK2_LIBRARY} ${GLIB2_LIBRARY} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) -- set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIR} ${GDK2_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) -+ set(GTK2_LIBRARIES ${GTK2_LIBRARY} ${GDK2_LIBRARY} ${GLIB2_LIBRARIES} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) -+ set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIR} ${GDK2_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) - - mark_as_advanced(GTK2_INCLUDE_DIR GTK2_LIBRARY) - -diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake -index f73b64d..decb00a 100644 ---- a/cmake/FindGTK3.cmake -+++ b/cmake/FindGTK3.cmake -@@ -53,24 +53,11 @@ find_library(GDKPIXBUF_LIBRARY NAMES gdk_pixbuf-2.0 - - # Glib - --pkg_check_modules(PC_GLIB2 glib-2.0) -- --if(NOT PC_GLIB2_FOUND) -+find_required_package(GLIB2) -+if(NOT GLIB2_FOUND) - set(_GTK3_found_all false) - endif() - --find_path(GLIB2_INCLUDE_DIR_PART1 NAMES glib.h -- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} -- PATH_SUFFIXES glib-2.0) -- --find_path(GLIB2_INCLUDE_DIR_PART2 NAMES glibconfig.h -- HINTS ${PC_GLIB2_INCLUDEDIR} ${PC_GLIB2_INCLUDE_DIRS} -- PATH_SUFFIXES glib-2.0/include) -- --set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR_PART1} ${GLIB2_INCLUDE_DIR_PART2}) -- --find_library(GLIB2_LIBRARY NAMES glib-2.0) -- - # Pango - - pkg_check_modules(PC_PANGO pango) -@@ -119,14 +106,17 @@ if(_GTK3_found_all) - - find_package_handle_standard_args(GTK3 DEFAULT_MSG GTK3_LIBRARY GTK3_INCLUDE_DIR) - -- set(GTK3_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GLIB2_LIBRARY} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) -- set(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) -+ set(GTK3_LIBRARIES ${GTK3_LIBRARY} ${GDK3_LIBRARY} ${GLIB2_LIBRARIES} ${PANGO_LIBRARY} ${CAIRO_LIBRARY} ${GDKPIXBUF_LIBRARY} ${ATK_LIBRARY}) -+ set(GTK3_INCLUDE_DIRS ${GTK3_INCLUDE_DIR} ${GLIB2_INCLUDE_DIRS} ${PANGO_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} ${GDKPIXBUF_INCLUDE_DIR} ${ATK_INCLUDE_DIR}) - - mark_as_advanced(GTK3_INCLUDE_DIR GTK3_LIBRARY) - - set(GTK3_FOUND true) - else() - unset(GTK3_LIBRARY) -+ unset(GTK3_INCLUDE_DIR) -+ -+ unset(GDK3_LIBRARY) - unset(GDK3_INCLUDE_DIR) - - set(GTK3_FOUND false) -diff --git a/remmina/CMakeLists.txt b/remmina/CMakeLists.txt -index 0fe7bbf..9e7c982 100644 ---- a/remmina/CMakeLists.txt -+++ b/remmina/CMakeLists.txt -@@ -93,6 +93,10 @@ add_executable(remmina ${REMMINA_SRCS}) - include_directories(${GTK_INCLUDE_DIRS}) - target_link_libraries(remmina ${GTK_LIBRARIES}) - -+find_package(X11) -+include_directories(${X11_INCLUDE_DIR}) -+target_link_libraries(remmina ${X11_LIBRARIES}) -+ - find_suggested_package(LIBSSH) - if(LIBSSH_FOUND) - add_definitions(-DHAVE_LIBSSH) -@@ -100,6 +104,11 @@ if(LIBSSH_FOUND) - target_link_libraries(remmina ${LIBSSH_LIBRARIES}) - endif() - -+if(PTHREAD_FOUND) -+ include_directories(${PTHREAD_INCLUDE_DIRS}) -+ target_link_libraries(remmina ${PTHREAD_LIBRARIES}) -+endif() -+ - if(GCRYPT_FOUND) - include_directories(${GCRYPT_INCLUDE_DIRS}) - target_link_libraries(remmina ${GCRYPT_LIBRARIES}) --- -1.7.5.4 - diff --git a/remmina-1.0.0-remove-inline-libvncserver.patch b/remmina-1.0.0-remove-inline-libvncserver.patch deleted file mode 100644 index 4c8cae1..0000000 --- a/remmina-1.0.0-remove-inline-libvncserver.patch +++ /dev/null @@ -1,20338 +0,0 @@ -commit 58881d4dd9129f56cb5ed9e56c54236be494d30a -Author: Luca Falavigna -Date: Sun Feb 12 17:24:29 2012 +0100 - - Do not use convenience copy of libvncserver - -diff --git a/cmake/FindLIBVNCSERVER.cmake b/cmake/FindLIBVNCSERVER.cmake -new file mode 100644 -index 0000000..dfb0ebb ---- /dev/null -+++ b/cmake/FindLIBVNCSERVER.cmake -@@ -0,0 +1,37 @@ -+# Remmina - The GTK+ Remote Desktop Client -+# -+# Copyright (C) 2012 Luca Falavigna -+# -+# This program is free software; you can redistribute it and/or modify -+# it under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+# -+# This program is distributed in the hope that it will be useful, -+# but WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+# GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License -+# along with this program; if not, write to the Free Software -+# Foundation, Inc., 59 Temple Place, Suite 330, -+# Boston, MA 02111-1307, USA. -+ -+find_package(PkgConfig) -+pkg_check_modules(PC_LIBVNCSERVER LibVNCServer) -+set(LIBVNCSERVER_DEFINITIONS ${PC_LIBVNCSERVER_CFLAGS_OTHER}) -+ -+find_path(LIBVNCSERVER_INCLUDE_DIR NAMES rfb/rfb.h -+ HINTS ${PC_LIBVNCSERVER_INCLUDEDIR} ${PC_LIBVNCSERVER_INCLUDE_DIRS}) -+ -+find_library(LIBVNCSERVER_LIBRARY NAMES vncserver -+ HINTS ${PC_LIBVNCSERVER_LIBDIR} ${PC_LIBVNCSERVER_LIBRARY_DIRS}) -+ -+include(FindPackageHandleStandardArgs) -+ -+find_package_handle_standard_args(LIBVNCSERVER DEFAULT_MSG LIBVNCSERVER_LIBRARY LIBVNCSERVER_INCLUDE_DIR) -+ -+set(LIBVNCSERVER_LIBRARIES ${LIBVNCSERVER_LIBRARY}) -+set(LIBVNCSERVER_INCLUDE_DIRS ${LIBVNCSERVER_INCLUDE_DIR}) -+ -+mark_as_advanced(LIBVNCSERVER_INCLUDE_DIR LIBVNCSERVER_LIBRARY) -diff --git a/remmina-plugins/CMakeLists.txt b/remmina-plugins/CMakeLists.txt -index e33cd10..646eb2e 100644 ---- a/remmina-plugins/CMakeLists.txt -+++ b/remmina-plugins/CMakeLists.txt -@@ -32,6 +32,8 @@ if(LIBSSH_FOUND) - target_link_libraries(remmina ${SSH_LIBRARIES}) - endif() - -+find_required_package(LIBVNCSERVER) -+ - find_required_package(XKBFILE) - - if(LIBSSH_FOUND AND XKBFILE_FOUND) -@@ -53,7 +55,6 @@ endif() - find_suggested_package(ZLIB) - - if(ZLIB_FOUND) -- add_subdirectory(vnc/libvncserver) - add_subdirectory(vnc) - endif() - -diff --git a/remmina-plugins/vnc/CMakeLists.txt b/remmina-plugins/vnc/CMakeLists.txt -index d8edd37..6a59fb7 100644 ---- a/remmina-plugins/vnc/CMakeLists.txt -+++ b/remmina-plugins/vnc/CMakeLists.txt -@@ -17,7 +17,7 @@ - # Foundation, Inc., 59 Temple Place, Suite 330, - # Boston, MA 02111-1307, USA. - --set(LIBVNCSERVER_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libvncserver) -+set(LIBVNCSERVER_INCLUDE_DIRS) - set(LIBVNCSERVER_LIBRARIES vncclient) - - set(REMMINA_PLUGIN_VNC_SRCS -diff --git a/remmina-plugins/vnc/libvncserver/CMakeLists.txt b/remmina-plugins/vnc/libvncserver/CMakeLists.txt -deleted file mode 100644 -index 88a0af2..0000000 ---- a/remmina-plugins/vnc/libvncserver/CMakeLists.txt -+++ /dev/null -@@ -1,102 +0,0 @@ -- --include(CheckFunctionExists) --include(CheckIncludeFile) --include(CheckTypeSize) --include(TestBigEndian) -- --#set(PACKAGE_NAME "LibVNCServer") --#set(FULL_PACKAGE_NAME "LibVNCServer") --#set(PACKAGE_VERSION "0.9.8.2") --#set(PROJECT_BUGREPORT_PATH "http://sourceforge.net/projects/libvncserver") -- --include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/common) -- --find_package(ZLIB) --find_package(JPEG) --find_package(GnuTLS) --find_package(Threads) --find_package(X11) --find_library(LIBGCRYPT_LIBRARIES gcrypt) -- --if(Threads_FOUND) -- option(TIGHTVNC_FILETRANSFER "Enable filetransfer" ON) --endif(Threads_FOUND) --if(ZLIB_FOUND) -- set(LIBVNCSERVER_HAVE_LIBZ 1) --endif(ZLIB_FOUND) --if(JPEG_FOUND) -- set(LIBVNCSERVER_HAVE_LIBJPEG 1) --endif(JPEG_FOUND) --option(LIBVNCSERVER_ALLOW24BPP "Allow 24 bpp" ON) --if(GNUTLS_FOUND) -- set(LIBVNCSERVER_WITH_CLIENT_TLS 1) --endif(GNUTLS_FOUND) --if(LIBGCRYPT_LIBRARIES) -- message(STATUS "Found libgcrypt: ${LIBGCRYPT_LIBRARIES}") -- set(LIBVNCSERVER_WITH_CLIENT_GCRYPT 1) --endif(LIBGCRYPT_LIBRARIES) -- --check_include_file("fcntl.h" LIBVNCSERVER_HAVE_FCNTL_H) --check_include_file("netinet/in.h" LIBVNCSERVER_HAVE_NETINET_IN_H) --check_include_file("sys/socket.h" LIBVNCSERVER_HAVE_SYS_SOCKET_H) --check_include_file("sys/stat.h" LIBVNCSERVER_HAVE_SYS_STAT_H) --check_include_file("sys/time.h" LIBVNCSERVER_HAVE_SYS_TIME_H) --check_include_file("sys/types.h" LIBVNCSERVER_HAVE_SYS_TYPES_H) --check_include_file("sys/wait.h" LIBVNCSERVER_HAVE_SYS_WAIT_H) --check_include_file("unistd.h" LIBVNCSERVER_HAVE_UNISTD_H) -- --# headers needed for check_type_size() --check_include_file("arpa/inet.h" HAVE_ARPA_INET_H) --check_include_file("stdint.h" HAVE_STDINT_H) --check_include_file("stddef.h" HAVE_STDDEF_H) --check_include_file("sys/types.h" HAVE_SYS_TYPES_H) -- --check_function_exists(gettimeofday LIBVNCSERVER_HAVE_GETTIMEOFDAY) -- --if(CMAKE_USE_PTHREADS_INIT) -- set(LIBVNCSERVER_HAVE_LIBPTHREAD 1) --endif(CMAKE_USE_PTHREADS_INIT) --if(LIBVNCSERVER_HAVE_SYS_SOCKET_H) -- # socklen_t -- list(APPEND CMAKE_EXTRA_INCLUDE_FILES "sys/socket.h") --endif(LIBVNCSERVER_HAVE_SYS_SOCKET_H) --if(HAVE_ARPA_INET_H) -- # in_addr_t -- list(APPEND CMAKE_EXTRA_INCLUDE_FILES "arpa/inet.h") --endif(HAVE_ARPA_INET_H) -- --check_type_size(pid_t LIBVNCSERVER_PID_T) --check_type_size(size_t LIBVNCSERVER_SIZE_T) --check_type_size(socklen_t LIBVNCSERVER_SOCKLEN_T) --check_type_size(in_addr_t LIBVNCSERVER_IN_ADDR_T) -- --if(NOT HAVE_LIBVNCSERVER_IN_ADDR_T) -- set(LIBVNCSERVER_NEED_INADDR_T 1) --endif(NOT HAVE_LIBVNCSERVER_IN_ADDR_T) -- --TEST_BIG_ENDIAN(LIBVNCSERVER_WORDS_BIGENDIAN) -- --configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbconfig.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbconfig.h) --configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbint.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/rfb/rfbint.h) -- --set(COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/common) --set(LIBVNCCLIENT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libvncclient) -- --set(LIBVNCCLIENT_SOURCES -- ${LIBVNCCLIENT_DIR}/cursor.c -- ${LIBVNCCLIENT_DIR}/listen.c -- ${LIBVNCCLIENT_DIR}/rfbproto.c -- ${LIBVNCCLIENT_DIR}/sockets.c -- ${LIBVNCCLIENT_DIR}/vncviewer.c -- ${COMMON_DIR}/minilzo.c -- ${LIBVNCCLIENT_DIR}/tls.c --) -- --add_library(vncclient STATIC ${LIBVNCCLIENT_SOURCES}) -- --if(WIN32) -- set(ADDITIONAL_LIBS ws2_32) --endif(WIN32) -- --target_link_libraries(vncclient ${ADDITIONAL_LIBS} ${ZLIB_LIBRARIES} ${JPEG_LIBRARIES}) -- -diff --git a/remmina-plugins/vnc/libvncserver/common/d3des.c b/remmina-plugins/vnc/libvncserver/common/d3des.c -deleted file mode 100644 -index 2df1aab..0000000 ---- a/remmina-plugins/vnc/libvncserver/common/d3des.c -+++ /dev/null -@@ -1,436 +0,0 @@ --/* -- * This is D3DES (V5.09) by Richard Outerbridge with the double and -- * triple-length support removed for use in VNC. Also the bytebit[] array -- * has been reversed so that the most significant bit in each byte of the -- * key is ignored, not the least significant. -- * -- * These changes are: -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- */ -- --/* D3DES (V5.09) - -- * -- * A portable, public domain, version of the Data Encryption Standard. -- * -- * Written with Symantec's THINK (Lightspeed) C by Richard Outerbridge. -- * Thanks to: Dan Hoey for his excellent Initial and Inverse permutation -- * code; Jim Gillogly & Phil Karn for the DES key schedule code; Dennis -- * Ferguson, Eric Young and Dana How for comparing notes; and Ray Lau, -- * for humouring me on. -- * -- * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge. -- * (GEnie : OUTER; CIS : [71755,204]) Graven Imagery, 1992. -- */ -- --#include "d3des.h" -- --static void scrunch(unsigned char *, unsigned long *); --static void unscrun(unsigned long *, unsigned char *); --static void desfunc(unsigned long *, unsigned long *); --static void cookey(unsigned long *); -- --static unsigned long KnL[32] = { 0L }; --/* --static unsigned long KnR[32] = { 0L }; --static unsigned long Kn3[32] = { 0L }; --static unsigned char Df_Key[24] = { -- 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, -- 0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10, -- 0x89,0xab,0xcd,0xef,0x01,0x23,0x45,0x67 }; --*/ -- --static unsigned short bytebit[8] = { -- 01, 02, 04, 010, 020, 040, 0100, 0200 }; -- --static unsigned long bigbyte[24] = { -- 0x800000L, 0x400000L, 0x200000L, 0x100000L, -- 0x80000L, 0x40000L, 0x20000L, 0x10000L, -- 0x8000L, 0x4000L, 0x2000L, 0x1000L, -- 0x800L, 0x400L, 0x200L, 0x100L, -- 0x80L, 0x40L, 0x20L, 0x10L, -- 0x8L, 0x4L, 0x2L, 0x1L }; -- --/* Use the key schedule specified in the Standard (ANSI X3.92-1981). */ -- --static unsigned char pc1[56] = { -- 56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17, -- 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, -- 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, -- 13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3 }; -- --static unsigned char totrot[16] = { -- 1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28 }; -- --static unsigned char pc2[48] = { -- 13, 16, 10, 23, 0, 4, 2, 27, 14, 5, 20, 9, -- 22, 18, 11, 3, 25, 7, 15, 6, 26, 19, 12, 1, -- 40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47, -- 43, 48, 38, 55, 33, 52, 45, 41, 49, 35, 28, 31 }; -- --void rfbDesKey(unsigned char *key, -- int edf) --{ -- register int i, j, l, m, n; -- unsigned char pc1m[56], pcr[56]; -- unsigned long kn[32]; -- -- for ( j = 0; j < 56; j++ ) { -- l = pc1[j]; -- m = l & 07; -- pc1m[j] = (key[l >> 3] & bytebit[m]) ? 1 : 0; -- } -- for( i = 0; i < 16; i++ ) { -- if( edf == DE1 ) m = (15 - i) << 1; -- else m = i << 1; -- n = m + 1; -- kn[m] = kn[n] = 0L; -- for( j = 0; j < 28; j++ ) { -- l = j + totrot[i]; -- if( l < 28 ) pcr[j] = pc1m[l]; -- else pcr[j] = pc1m[l - 28]; -- } -- for( j = 28; j < 56; j++ ) { -- l = j + totrot[i]; -- if( l < 56 ) pcr[j] = pc1m[l]; -- else pcr[j] = pc1m[l - 28]; -- } -- for( j = 0; j < 24; j++ ) { -- if( pcr[pc2[j]] ) kn[m] |= bigbyte[j]; -- if( pcr[pc2[j+24]] ) kn[n] |= bigbyte[j]; -- } -- } -- cookey(kn); -- return; -- } -- --static void cookey(register unsigned long *raw1) --{ -- register unsigned long *cook, *raw0; -- unsigned long dough[32]; -- register int i; -- -- cook = dough; -- for( i = 0; i < 16; i++, raw1++ ) { -- raw0 = raw1++; -- *cook = (*raw0 & 0x00fc0000L) << 6; -- *cook |= (*raw0 & 0x00000fc0L) << 10; -- *cook |= (*raw1 & 0x00fc0000L) >> 10; -- *cook++ |= (*raw1 & 0x00000fc0L) >> 6; -- *cook = (*raw0 & 0x0003f000L) << 12; -- *cook |= (*raw0 & 0x0000003fL) << 16; -- *cook |= (*raw1 & 0x0003f000L) >> 4; -- *cook++ |= (*raw1 & 0x0000003fL); -- } -- rfbUseKey(dough); -- return; -- } -- --void rfbCPKey(register unsigned long *into) --{ -- register unsigned long *from, *endp; -- -- from = KnL, endp = &KnL[32]; -- while( from < endp ) *into++ = *from++; -- return; -- } -- --void rfbUseKey(register unsigned long *from) --{ -- register unsigned long *to, *endp; -- -- to = KnL, endp = &KnL[32]; -- while( to < endp ) *to++ = *from++; -- return; -- } -- --void rfbDes(unsigned char *inblock, -- unsigned char *outblock) --{ -- unsigned long work[2]; -- -- scrunch(inblock, work); -- desfunc(work, KnL); -- unscrun(work, outblock); -- return; -- } -- --static void scrunch(register unsigned char *outof, -- register unsigned long *into) --{ -- *into = (*outof++ & 0xffL) << 24; -- *into |= (*outof++ & 0xffL) << 16; -- *into |= (*outof++ & 0xffL) << 8; -- *into++ |= (*outof++ & 0xffL); -- *into = (*outof++ & 0xffL) << 24; -- *into |= (*outof++ & 0xffL) << 16; -- *into |= (*outof++ & 0xffL) << 8; -- *into |= (*outof & 0xffL); -- return; -- } -- --static void unscrun(register unsigned long *outof, -- register unsigned char *into) --{ -- *into++ = (unsigned char)((*outof >> 24) & 0xffL); -- *into++ = (unsigned char)((*outof >> 16) & 0xffL); -- *into++ = (unsigned char)((*outof >> 8) & 0xffL); -- *into++ = (unsigned char)( *outof++ & 0xffL); -- *into++ = (unsigned char)((*outof >> 24) & 0xffL); -- *into++ = (unsigned char)((*outof >> 16) & 0xffL); -- *into++ = (unsigned char)((*outof >> 8) & 0xffL); -- *into = (unsigned char)( *outof & 0xffL); -- return; -- } -- --static unsigned long SP1[64] = { -- 0x01010400L, 0x00000000L, 0x00010000L, 0x01010404L, -- 0x01010004L, 0x00010404L, 0x00000004L, 0x00010000L, -- 0x00000400L, 0x01010400L, 0x01010404L, 0x00000400L, -- 0x01000404L, 0x01010004L, 0x01000000L, 0x00000004L, -- 0x00000404L, 0x01000400L, 0x01000400L, 0x00010400L, -- 0x00010400L, 0x01010000L, 0x01010000L, 0x01000404L, -- 0x00010004L, 0x01000004L, 0x01000004L, 0x00010004L, -- 0x00000000L, 0x00000404L, 0x00010404L, 0x01000000L, -- 0x00010000L, 0x01010404L, 0x00000004L, 0x01010000L, -- 0x01010400L, 0x01000000L, 0x01000000L, 0x00000400L, -- 0x01010004L, 0x00010000L, 0x00010400L, 0x01000004L, -- 0x00000400L, 0x00000004L, 0x01000404L, 0x00010404L, -- 0x01010404L, 0x00010004L, 0x01010000L, 0x01000404L, -- 0x01000004L, 0x00000404L, 0x00010404L, 0x01010400L, -- 0x00000404L, 0x01000400L, 0x01000400L, 0x00000000L, -- 0x00010004L, 0x00010400L, 0x00000000L, 0x01010004L }; -- --static unsigned long SP2[64] = { -- 0x80108020L, 0x80008000L, 0x00008000L, 0x00108020L, -- 0x00100000L, 0x00000020L, 0x80100020L, 0x80008020L, -- 0x80000020L, 0x80108020L, 0x80108000L, 0x80000000L, -- 0x80008000L, 0x00100000L, 0x00000020L, 0x80100020L, -- 0x00108000L, 0x00100020L, 0x80008020L, 0x00000000L, -- 0x80000000L, 0x00008000L, 0x00108020L, 0x80100000L, -- 0x00100020L, 0x80000020L, 0x00000000L, 0x00108000L, -- 0x00008020L, 0x80108000L, 0x80100000L, 0x00008020L, -- 0x00000000L, 0x00108020L, 0x80100020L, 0x00100000L, -- 0x80008020L, 0x80100000L, 0x80108000L, 0x00008000L, -- 0x80100000L, 0x80008000L, 0x00000020L, 0x80108020L, -- 0x00108020L, 0x00000020L, 0x00008000L, 0x80000000L, -- 0x00008020L, 0x80108000L, 0x00100000L, 0x80000020L, -- 0x00100020L, 0x80008020L, 0x80000020L, 0x00100020L, -- 0x00108000L, 0x00000000L, 0x80008000L, 0x00008020L, -- 0x80000000L, 0x80100020L, 0x80108020L, 0x00108000L }; -- --static unsigned long SP3[64] = { -- 0x00000208L, 0x08020200L, 0x00000000L, 0x08020008L, -- 0x08000200L, 0x00000000L, 0x00020208L, 0x08000200L, -- 0x00020008L, 0x08000008L, 0x08000008L, 0x00020000L, -- 0x08020208L, 0x00020008L, 0x08020000L, 0x00000208L, -- 0x08000000L, 0x00000008L, 0x08020200L, 0x00000200L, -- 0x00020200L, 0x08020000L, 0x08020008L, 0x00020208L, -- 0x08000208L, 0x00020200L, 0x00020000L, 0x08000208L, -- 0x00000008L, 0x08020208L, 0x00000200L, 0x08000000L, -- 0x08020200L, 0x08000000L, 0x00020008L, 0x00000208L, -- 0x00020000L, 0x08020200L, 0x08000200L, 0x00000000L, -- 0x00000200L, 0x00020008L, 0x08020208L, 0x08000200L, -- 0x08000008L, 0x00000200L, 0x00000000L, 0x08020008L, -- 0x08000208L, 0x00020000L, 0x08000000L, 0x08020208L, -- 0x00000008L, 0x00020208L, 0x00020200L, 0x08000008L, -- 0x08020000L, 0x08000208L, 0x00000208L, 0x08020000L, -- 0x00020208L, 0x00000008L, 0x08020008L, 0x00020200L }; -- --static unsigned long SP4[64] = { -- 0x00802001L, 0x00002081L, 0x00002081L, 0x00000080L, -- 0x00802080L, 0x00800081L, 0x00800001L, 0x00002001L, -- 0x00000000L, 0x00802000L, 0x00802000L, 0x00802081L, -- 0x00000081L, 0x00000000L, 0x00800080L, 0x00800001L, -- 0x00000001L, 0x00002000L, 0x00800000L, 0x00802001L, -- 0x00000080L, 0x00800000L, 0x00002001L, 0x00002080L, -- 0x00800081L, 0x00000001L, 0x00002080L, 0x00800080L, -- 0x00002000L, 0x00802080L, 0x00802081L, 0x00000081L, -- 0x00800080L, 0x00800001L, 0x00802000L, 0x00802081L, -- 0x00000081L, 0x00000000L, 0x00000000L, 0x00802000L, -- 0x00002080L, 0x00800080L, 0x00800081L, 0x00000001L, -- 0x00802001L, 0x00002081L, 0x00002081L, 0x00000080L, -- 0x00802081L, 0x00000081L, 0x00000001L, 0x00002000L, -- 0x00800001L, 0x00002001L, 0x00802080L, 0x00800081L, -- 0x00002001L, 0x00002080L, 0x00800000L, 0x00802001L, -- 0x00000080L, 0x00800000L, 0x00002000L, 0x00802080L }; -- --static unsigned long SP5[64] = { -- 0x00000100L, 0x02080100L, 0x02080000L, 0x42000100L, -- 0x00080000L, 0x00000100L, 0x40000000L, 0x02080000L, -- 0x40080100L, 0x00080000L, 0x02000100L, 0x40080100L, -- 0x42000100L, 0x42080000L, 0x00080100L, 0x40000000L, -- 0x02000000L, 0x40080000L, 0x40080000L, 0x00000000L, -- 0x40000100L, 0x42080100L, 0x42080100L, 0x02000100L, -- 0x42080000L, 0x40000100L, 0x00000000L, 0x42000000L, -- 0x02080100L, 0x02000000L, 0x42000000L, 0x00080100L, -- 0x00080000L, 0x42000100L, 0x00000100L, 0x02000000L, -- 0x40000000L, 0x02080000L, 0x42000100L, 0x40080100L, -- 0x02000100L, 0x40000000L, 0x42080000L, 0x02080100L, -- 0x40080100L, 0x00000100L, 0x02000000L, 0x42080000L, -- 0x42080100L, 0x00080100L, 0x42000000L, 0x42080100L, -- 0x02080000L, 0x00000000L, 0x40080000L, 0x42000000L, -- 0x00080100L, 0x02000100L, 0x40000100L, 0x00080000L, -- 0x00000000L, 0x40080000L, 0x02080100L, 0x40000100L }; -- --static unsigned long SP6[64] = { -- 0x20000010L, 0x20400000L, 0x00004000L, 0x20404010L, -- 0x20400000L, 0x00000010L, 0x20404010L, 0x00400000L, -- 0x20004000L, 0x00404010L, 0x00400000L, 0x20000010L, -- 0x00400010L, 0x20004000L, 0x20000000L, 0x00004010L, -- 0x00000000L, 0x00400010L, 0x20004010L, 0x00004000L, -- 0x00404000L, 0x20004010L, 0x00000010L, 0x20400010L, -- 0x20400010L, 0x00000000L, 0x00404010L, 0x20404000L, -- 0x00004010L, 0x00404000L, 0x20404000L, 0x20000000L, -- 0x20004000L, 0x00000010L, 0x20400010L, 0x00404000L, -- 0x20404010L, 0x00400000L, 0x00004010L, 0x20000010L, -- 0x00400000L, 0x20004000L, 0x20000000L, 0x00004010L, -- 0x20000010L, 0x20404010L, 0x00404000L, 0x20400000L, -- 0x00404010L, 0x20404000L, 0x00000000L, 0x20400010L, -- 0x00000010L, 0x00004000L, 0x20400000L, 0x00404010L, -- 0x00004000L, 0x00400010L, 0x20004010L, 0x00000000L, -- 0x20404000L, 0x20000000L, 0x00400010L, 0x20004010L }; -- --static unsigned long SP7[64] = { -- 0x00200000L, 0x04200002L, 0x04000802L, 0x00000000L, -- 0x00000800L, 0x04000802L, 0x00200802L, 0x04200800L, -- 0x04200802L, 0x00200000L, 0x00000000L, 0x04000002L, -- 0x00000002L, 0x04000000L, 0x04200002L, 0x00000802L, -- 0x04000800L, 0x00200802L, 0x00200002L, 0x04000800L, -- 0x04000002L, 0x04200000L, 0x04200800L, 0x00200002L, -- 0x04200000L, 0x00000800L, 0x00000802L, 0x04200802L, -- 0x00200800L, 0x00000002L, 0x04000000L, 0x00200800L, -- 0x04000000L, 0x00200800L, 0x00200000L, 0x04000802L, -- 0x04000802L, 0x04200002L, 0x04200002L, 0x00000002L, -- 0x00200002L, 0x04000000L, 0x04000800L, 0x00200000L, -- 0x04200800L, 0x00000802L, 0x00200802L, 0x04200800L, -- 0x00000802L, 0x04000002L, 0x04200802L, 0x04200000L, -- 0x00200800L, 0x00000000L, 0x00000002L, 0x04200802L, -- 0x00000000L, 0x00200802L, 0x04200000L, 0x00000800L, -- 0x04000002L, 0x04000800L, 0x00000800L, 0x00200002L }; -- --static unsigned long SP8[64] = { -- 0x10001040L, 0x00001000L, 0x00040000L, 0x10041040L, -- 0x10000000L, 0x10001040L, 0x00000040L, 0x10000000L, -- 0x00040040L, 0x10040000L, 0x10041040L, 0x00041000L, -- 0x10041000L, 0x00041040L, 0x00001000L, 0x00000040L, -- 0x10040000L, 0x10000040L, 0x10001000L, 0x00001040L, -- 0x00041000L, 0x00040040L, 0x10040040L, 0x10041000L, -- 0x00001040L, 0x00000000L, 0x00000000L, 0x10040040L, -- 0x10000040L, 0x10001000L, 0x00041040L, 0x00040000L, -- 0x00041040L, 0x00040000L, 0x10041000L, 0x00001000L, -- 0x00000040L, 0x10040040L, 0x00001000L, 0x00041040L, -- 0x10001000L, 0x00000040L, 0x10000040L, 0x10040000L, -- 0x10040040L, 0x10000000L, 0x00040000L, 0x10001040L, -- 0x00000000L, 0x10041040L, 0x00040040L, 0x10000040L, -- 0x10040000L, 0x10001000L, 0x10001040L, 0x00000000L, -- 0x10041040L, 0x00041000L, 0x00041000L, 0x00001040L, -- 0x00001040L, 0x00040040L, 0x10000000L, 0x10041000L }; -- --static void desfunc(register unsigned long *block, -- register unsigned long *keys) --{ -- register unsigned long fval, work, right, leftt; -- register int round; -- -- leftt = block[0]; -- right = block[1]; -- work = ((leftt >> 4) ^ right) & 0x0f0f0f0fL; -- right ^= work; -- leftt ^= (work << 4); -- work = ((leftt >> 16) ^ right) & 0x0000ffffL; -- right ^= work; -- leftt ^= (work << 16); -- work = ((right >> 2) ^ leftt) & 0x33333333L; -- leftt ^= work; -- right ^= (work << 2); -- work = ((right >> 8) ^ leftt) & 0x00ff00ffL; -- leftt ^= work; -- right ^= (work << 8); -- right = ((right << 1) | ((right >> 31) & 1L)) & 0xffffffffL; -- work = (leftt ^ right) & 0xaaaaaaaaL; -- leftt ^= work; -- right ^= work; -- leftt = ((leftt << 1) | ((leftt >> 31) & 1L)) & 0xffffffffL; -- -- for( round = 0; round < 8; round++ ) { -- work = (right << 28) | (right >> 4); -- work ^= *keys++; -- fval = SP7[ work & 0x3fL]; -- fval |= SP5[(work >> 8) & 0x3fL]; -- fval |= SP3[(work >> 16) & 0x3fL]; -- fval |= SP1[(work >> 24) & 0x3fL]; -- work = right ^ *keys++; -- fval |= SP8[ work & 0x3fL]; -- fval |= SP6[(work >> 8) & 0x3fL]; -- fval |= SP4[(work >> 16) & 0x3fL]; -- fval |= SP2[(work >> 24) & 0x3fL]; -- leftt ^= fval; -- work = (leftt << 28) | (leftt >> 4); -- work ^= *keys++; -- fval = SP7[ work & 0x3fL]; -- fval |= SP5[(work >> 8) & 0x3fL]; -- fval |= SP3[(work >> 16) & 0x3fL]; -- fval |= SP1[(work >> 24) & 0x3fL]; -- work = leftt ^ *keys++; -- fval |= SP8[ work & 0x3fL]; -- fval |= SP6[(work >> 8) & 0x3fL]; -- fval |= SP4[(work >> 16) & 0x3fL]; -- fval |= SP2[(work >> 24) & 0x3fL]; -- right ^= fval; -- } -- -- right = (right << 31) | (right >> 1); -- work = (leftt ^ right) & 0xaaaaaaaaL; -- leftt ^= work; -- right ^= work; -- leftt = (leftt << 31) | (leftt >> 1); -- work = ((leftt >> 8) ^ right) & 0x00ff00ffL; -- right ^= work; -- leftt ^= (work << 8); -- work = ((leftt >> 2) ^ right) & 0x33333333L; -- right ^= work; -- leftt ^= (work << 2); -- work = ((right >> 16) ^ leftt) & 0x0000ffffL; -- leftt ^= work; -- right ^= (work << 16); -- work = ((right >> 4) ^ leftt) & 0x0f0f0f0fL; -- leftt ^= work; -- right ^= (work << 4); -- *block++ = right; -- *block = leftt; -- return; -- } -- --/* Validation sets: -- * -- * Single-length key, single-length plaintext - -- * Key : 0123 4567 89ab cdef -- * Plain : 0123 4567 89ab cde7 -- * Cipher : c957 4425 6a5e d31d -- * -- * Double-length key, single-length plaintext - -- * Key : 0123 4567 89ab cdef fedc ba98 7654 3210 -- * Plain : 0123 4567 89ab cde7 -- * Cipher : 7f1d 0a77 826b 8aff -- * -- * Double-length key, double-length plaintext - -- * Key : 0123 4567 89ab cdef fedc ba98 7654 3210 -- * Plain : 0123 4567 89ab cdef 0123 4567 89ab cdff -- * Cipher : 27a0 8440 406a df60 278f 47cf 42d6 15d7 -- * -- * Triple-length key, single-length plaintext - -- * Key : 0123 4567 89ab cdef fedc ba98 7654 3210 89ab cdef 0123 4567 -- * Plain : 0123 4567 89ab cde7 -- * Cipher : de0b 7c06 ae5e 0ed5 -- * -- * Triple-length key, double-length plaintext - -- * Key : 0123 4567 89ab cdef fedc ba98 7654 3210 89ab cdef 0123 4567 -- * Plain : 0123 4567 89ab cdef 0123 4567 89ab cdff -- * Cipher : ad0d 1b30 ac17 cf07 0ed1 1c63 81e4 4de5 -- * -- * d3des V5.0a rwo 9208.07 18:44 Graven Imagery -- **********************************************************************/ -diff --git a/remmina-plugins/vnc/libvncserver/common/d3des.h b/remmina-plugins/vnc/libvncserver/common/d3des.h -deleted file mode 100644 -index e3761ca..0000000 ---- a/remmina-plugins/vnc/libvncserver/common/d3des.h -+++ /dev/null -@@ -1,56 +0,0 @@ --#ifndef D3DES_H --#define D3DES_H -- --/* -- * This is D3DES (V5.09) by Richard Outerbridge with the double and -- * triple-length support removed for use in VNC. -- * -- * These changes are: -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- */ -- --/* d3des.h - -- * -- * Headers and defines for d3des.c -- * Graven Imagery, 1992. -- * -- * Copyright (c) 1988,1989,1990,1991,1992 by Richard Outerbridge -- * (GEnie : OUTER; CIS : [71755,204]) -- */ -- --#define EN0 0 /* MODE == encrypt */ --#define DE1 1 /* MODE == decrypt */ -- --extern void rfbDesKey(unsigned char *, int); --/* hexkey[8] MODE -- * Sets the internal key register according to the hexadecimal -- * key contained in the 8 bytes of hexkey, according to the DES, -- * for encryption or decryption according to MODE. -- */ -- --extern void rfbUseKey(unsigned long *); --/* cookedkey[32] -- * Loads the internal key register with the data in cookedkey. -- */ -- --extern void rfbCPKey(unsigned long *); --/* cookedkey[32] -- * Copies the contents of the internal key register into the storage -- * located at &cookedkey[0]. -- */ -- --extern void rfbDes(unsigned char *, unsigned char *); --/* from[8] to[8] -- * Encrypts/Decrypts (according to the key currently loaded in the -- * internal key register) one block of eight bytes at address 'from' -- * into the block at address 'to'. They can be the same. -- */ -- --/* d3des.h V5.09 rwo 9208.04 15:06 Graven Imagery -- ********************************************************************/ -- --#endif -diff --git a/remmina-plugins/vnc/libvncserver/common/lzoconf.h b/remmina-plugins/vnc/libvncserver/common/lzoconf.h -deleted file mode 100644 -index d6125e8..0000000 ---- a/remmina-plugins/vnc/libvncserver/common/lzoconf.h -+++ /dev/null -@@ -1,419 +0,0 @@ --/* lzoconf.h -- configuration for the LZO real-time data compression library -- -- This file is part of the LZO real-time data compression library. -- -- Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer -- All Rights Reserved. -- -- The LZO library is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 2 of -- the License, or (at your option) any later version. -- -- The LZO library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with the LZO library; see the file COPYING. -- If not, write to the Free Software Foundation, Inc., -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- -- Markus F.X.J. Oberhumer -- -- http://www.oberhumer.com/opensource/lzo/ -- */ -- -- --#ifndef __LZOCONF_H_INCLUDED --#define __LZOCONF_H_INCLUDED 1 -- --#define LZO_VERSION 0x2040 --#define LZO_VERSION_STRING "2.04" --#define LZO_VERSION_DATE "Oct 31 2010" -- --/* internal Autoconf configuration file - only used when building LZO */ --#if defined(LZO_HAVE_CONFIG_H) --# include --#endif --#include --#include -- -- --/*********************************************************************** --// LZO requires a conforming --************************************************************************/ -- --#if !defined(CHAR_BIT) || (CHAR_BIT != 8) --# error "invalid CHAR_BIT" --#endif --#if !defined(UCHAR_MAX) || !defined(UINT_MAX) || !defined(ULONG_MAX) --# error "check your compiler installation" --#endif --#if (USHRT_MAX < 1) || (UINT_MAX < 1) || (ULONG_MAX < 1) --# error "your limits.h macros are broken" --#endif -- --/* get OS and architecture defines */ --#ifndef __LZODEFS_H_INCLUDED --#include "lzodefs.h" --#endif -- -- --#ifdef __cplusplus --extern "C" { --#endif -- -- --/*********************************************************************** --// some core defines --************************************************************************/ -- --#if !defined(LZO_UINT32_C) --# if (UINT_MAX < LZO_0xffffffffL) --# define LZO_UINT32_C(c) c ## UL --# else --# define LZO_UINT32_C(c) ((c) + 0U) --# endif --#endif -- --/* memory checkers */ --#if !defined(__LZO_CHECKER) --# if defined(__BOUNDS_CHECKING_ON) --# define __LZO_CHECKER 1 --# elif defined(__CHECKER__) --# define __LZO_CHECKER 1 --# elif defined(__INSURE__) --# define __LZO_CHECKER 1 --# elif defined(__PURIFY__) --# define __LZO_CHECKER 1 --# endif --#endif -- -- --/*********************************************************************** --// integral and pointer types --************************************************************************/ -- --/* lzo_uint should match size_t */ --#if !defined(LZO_UINT_MAX) --# if defined(LZO_ABI_LLP64) /* WIN64 */ --# if defined(LZO_OS_WIN64) -- typedef unsigned __int64 lzo_uint; -- typedef __int64 lzo_int; --# else -- typedef unsigned long long lzo_uint; -- typedef long long lzo_int; --# endif --# define LZO_UINT_MAX 0xffffffffffffffffull --# define LZO_INT_MAX 9223372036854775807LL --# define LZO_INT_MIN (-1LL - LZO_INT_MAX) --# elif defined(LZO_ABI_IP32L64) /* MIPS R5900 */ -- typedef unsigned int lzo_uint; -- typedef int lzo_int; --# define LZO_UINT_MAX UINT_MAX --# define LZO_INT_MAX INT_MAX --# define LZO_INT_MIN INT_MIN --# elif (ULONG_MAX >= LZO_0xffffffffL) -- typedef unsigned long lzo_uint; -- typedef long lzo_int; --# define LZO_UINT_MAX ULONG_MAX --# define LZO_INT_MAX LONG_MAX --# define LZO_INT_MIN LONG_MIN --# else --# error "lzo_uint" --# endif --#endif -- --/* Integral types with 32 bits or more. */ --#if !defined(LZO_UINT32_MAX) --# if (UINT_MAX >= LZO_0xffffffffL) -- typedef unsigned int lzo_uint32; -- typedef int lzo_int32; --# define LZO_UINT32_MAX UINT_MAX --# define LZO_INT32_MAX INT_MAX --# define LZO_INT32_MIN INT_MIN --# elif (ULONG_MAX >= LZO_0xffffffffL) -- typedef unsigned long lzo_uint32; -- typedef long lzo_int32; --# define LZO_UINT32_MAX ULONG_MAX --# define LZO_INT32_MAX LONG_MAX --# define LZO_INT32_MIN LONG_MIN --# else --# error "lzo_uint32" --# endif --#endif -- --/* The larger type of lzo_uint and lzo_uint32. */ --#if (LZO_UINT_MAX >= LZO_UINT32_MAX) --# define lzo_xint lzo_uint --#else --# define lzo_xint lzo_uint32 --#endif -- --/* Memory model that allows to access memory at offsets of lzo_uint. */ --#if !defined(__LZO_MMODEL) --# if (LZO_UINT_MAX <= UINT_MAX) --# define __LZO_MMODEL /*empty*/ --# elif defined(LZO_HAVE_MM_HUGE_PTR) --# define __LZO_MMODEL_HUGE 1 --# define __LZO_MMODEL __huge --# else --# define __LZO_MMODEL /*empty*/ --# endif --#endif -- --/* no typedef here because of const-pointer issues */ --#define lzo_bytep unsigned char __LZO_MMODEL * --#define lzo_charp char __LZO_MMODEL * --#define lzo_voidp void __LZO_MMODEL * --#define lzo_shortp short __LZO_MMODEL * --#define lzo_ushortp unsigned short __LZO_MMODEL * --#define lzo_uint32p lzo_uint32 __LZO_MMODEL * --#define lzo_int32p lzo_int32 __LZO_MMODEL * --#define lzo_uintp lzo_uint __LZO_MMODEL * --#define lzo_intp lzo_int __LZO_MMODEL * --#define lzo_xintp lzo_xint __LZO_MMODEL * --#define lzo_voidpp lzo_voidp __LZO_MMODEL * --#define lzo_bytepp lzo_bytep __LZO_MMODEL * --/* deprecated - use 'lzo_bytep' instead of 'lzo_byte *' */ --#define lzo_byte unsigned char __LZO_MMODEL -- --typedef int lzo_bool; -- -- --/*********************************************************************** --// function types --************************************************************************/ -- --/* name mangling */ --#if !defined(__LZO_EXTERN_C) --# ifdef __cplusplus --# define __LZO_EXTERN_C extern "C" --# else --# define __LZO_EXTERN_C extern --# endif --#endif -- --/* calling convention */ --#if !defined(__LZO_CDECL) --# define __LZO_CDECL __lzo_cdecl --#endif -- --/* DLL export information */ --#if !defined(__LZO_EXPORT1) --# define __LZO_EXPORT1 /*empty*/ --#endif --#if !defined(__LZO_EXPORT2) --# define __LZO_EXPORT2 /*empty*/ --#endif -- --/* __cdecl calling convention for public C and assembly functions */ --#if !defined(LZO_PUBLIC) --# define LZO_PUBLIC(_rettype) __LZO_EXPORT1 _rettype __LZO_EXPORT2 __LZO_CDECL --#endif --#if !defined(LZO_EXTERN) --# define LZO_EXTERN(_rettype) __LZO_EXTERN_C LZO_PUBLIC(_rettype) --#endif --#if !defined(LZO_PRIVATE) --# define LZO_PRIVATE(_rettype) static _rettype __LZO_CDECL --#endif -- --/* function types */ --typedef int --(__LZO_CDECL *lzo_compress_t) ( const lzo_bytep src, lzo_uint src_len, -- lzo_bytep dst, lzo_uintp dst_len, -- lzo_voidp wrkmem ); -- --typedef int --(__LZO_CDECL *lzo_decompress_t) ( const lzo_bytep src, lzo_uint src_len, -- lzo_bytep dst, lzo_uintp dst_len, -- lzo_voidp wrkmem ); -- --typedef int --(__LZO_CDECL *lzo_optimize_t) ( lzo_bytep src, lzo_uint src_len, -- lzo_bytep dst, lzo_uintp dst_len, -- lzo_voidp wrkmem ); -- --typedef int --(__LZO_CDECL *lzo_compress_dict_t)(const lzo_bytep src, lzo_uint src_len, -- lzo_bytep dst, lzo_uintp dst_len, -- lzo_voidp wrkmem, -- const lzo_bytep dict, lzo_uint dict_len ); -- --typedef int --(__LZO_CDECL *lzo_decompress_dict_t)(const lzo_bytep src, lzo_uint src_len, -- lzo_bytep dst, lzo_uintp dst_len, -- lzo_voidp wrkmem, -- const lzo_bytep dict, lzo_uint dict_len ); -- -- --/* Callback interface. Currently only the progress indicator ("nprogress") -- * is used, but this may change in a future release. */ -- --struct lzo_callback_t; --typedef struct lzo_callback_t lzo_callback_t; --#define lzo_callback_p lzo_callback_t __LZO_MMODEL * -- --/* malloc & free function types */ --typedef lzo_voidp (__LZO_CDECL *lzo_alloc_func_t) -- (lzo_callback_p self, lzo_uint items, lzo_uint size); --typedef void (__LZO_CDECL *lzo_free_func_t) -- (lzo_callback_p self, lzo_voidp ptr); -- --/* a progress indicator callback function */ --typedef void (__LZO_CDECL *lzo_progress_func_t) -- (lzo_callback_p, lzo_uint, lzo_uint, int); -- --struct lzo_callback_t --{ -- /* custom allocators (set to 0 to disable) */ -- lzo_alloc_func_t nalloc; /* [not used right now] */ -- lzo_free_func_t nfree; /* [not used right now] */ -- -- /* a progress indicator callback function (set to 0 to disable) */ -- lzo_progress_func_t nprogress; -- -- /* NOTE: the first parameter "self" of the nalloc/nfree/nprogress -- * callbacks points back to this struct, so you are free to store -- * some extra info in the following variables. */ -- lzo_voidp user1; -- lzo_xint user2; -- lzo_xint user3; --}; -- -- --/*********************************************************************** --// error codes and prototypes --************************************************************************/ -- --/* Error codes for the compression/decompression functions. Negative -- * values are errors, positive values will be used for special but -- * normal events. -- */ --#define LZO_E_OK 0 --#define LZO_E_ERROR (-1) --#define LZO_E_OUT_OF_MEMORY (-2) /* [not used right now] */ --#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ --#define LZO_E_INPUT_OVERRUN (-4) --#define LZO_E_OUTPUT_OVERRUN (-5) --#define LZO_E_LOOKBEHIND_OVERRUN (-6) --#define LZO_E_EOF_NOT_FOUND (-7) --#define LZO_E_INPUT_NOT_CONSUMED (-8) --#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ -- -- --#ifndef lzo_sizeof_dict_t --# define lzo_sizeof_dict_t ((unsigned)sizeof(lzo_bytep)) --#endif -- --/* lzo_init() should be the first function you call. -- * Check the return code ! -- * -- * lzo_init() is a macro to allow checking that the library and the -- * compiler's view of various types are consistent. -- */ --#define lzo_init() __lzo_init_v2(LZO_VERSION,(int)sizeof(short),(int)sizeof(int),\ -- (int)sizeof(long),(int)sizeof(lzo_uint32),(int)sizeof(lzo_uint),\ -- (int)lzo_sizeof_dict_t,(int)sizeof(char *),(int)sizeof(lzo_voidp),\ -- (int)sizeof(lzo_callback_t)) --LZO_EXTERN(int) __lzo_init_v2(unsigned,int,int,int,int,int,int,int,int,int); -- --/* version functions (useful for shared libraries) */ --LZO_EXTERN(unsigned) lzo_version(void); --LZO_EXTERN(const char *) lzo_version_string(void); --LZO_EXTERN(const char *) lzo_version_date(void); --LZO_EXTERN(const lzo_charp) _lzo_version_string(void); --LZO_EXTERN(const lzo_charp) _lzo_version_date(void); -- --/* string functions */ --LZO_EXTERN(int) -- lzo_memcmp(const lzo_voidp a, const lzo_voidp b, lzo_uint len); --LZO_EXTERN(lzo_voidp) -- lzo_memcpy(lzo_voidp dst, const lzo_voidp src, lzo_uint len); --LZO_EXTERN(lzo_voidp) -- lzo_memmove(lzo_voidp dst, const lzo_voidp src, lzo_uint len); --LZO_EXTERN(lzo_voidp) -- lzo_memset(lzo_voidp buf, int c, lzo_uint len); -- --/* checksum functions */ --LZO_EXTERN(lzo_uint32) -- lzo_adler32(lzo_uint32 c, const lzo_bytep buf, lzo_uint len); --LZO_EXTERN(lzo_uint32) -- lzo_crc32(lzo_uint32 c, const lzo_bytep buf, lzo_uint len); --LZO_EXTERN(const lzo_uint32p) -- lzo_get_crc32_table(void); -- --/* misc. */ --LZO_EXTERN(int) _lzo_config_check(void); --typedef union { lzo_bytep p; lzo_uint u; } __lzo_pu_u; --typedef union { lzo_bytep p; lzo_uint32 u32; } __lzo_pu32_u; --typedef union { void *vp; lzo_bytep bp; lzo_uint u; lzo_uint32 u32; unsigned long l; } lzo_align_t; -- --/* align a char pointer on a boundary that is a multiple of 'size' */ --LZO_EXTERN(unsigned) __lzo_align_gap(const lzo_voidp p, lzo_uint size); --#define LZO_PTR_ALIGN_UP(p,size) \ -- ((p) + (lzo_uint) __lzo_align_gap((const lzo_voidp)(p),(lzo_uint)(size))) -- -- --/*********************************************************************** --// deprecated macros - only for backward compatibility with LZO v1.xx --************************************************************************/ -- --#if defined(LZO_CFG_COMPAT) -- --#define __LZOCONF_H 1 -- --#if defined(LZO_ARCH_I086) --# define __LZO_i386 1 --#elif defined(LZO_ARCH_I386) --# define __LZO_i386 1 --#endif -- --#if defined(LZO_OS_DOS16) --# define __LZO_DOS 1 --# define __LZO_DOS16 1 --#elif defined(LZO_OS_DOS32) --# define __LZO_DOS 1 --#elif defined(LZO_OS_WIN16) --# define __LZO_WIN 1 --# define __LZO_WIN16 1 --#elif defined(LZO_OS_WIN32) --# define __LZO_WIN 1 --#endif -- --#define __LZO_CMODEL /*empty*/ --#define __LZO_DMODEL /*empty*/ --#define __LZO_ENTRY __LZO_CDECL --#define LZO_EXTERN_CDECL LZO_EXTERN --#define LZO_ALIGN LZO_PTR_ALIGN_UP -- --#define lzo_compress_asm_t lzo_compress_t --#define lzo_decompress_asm_t lzo_decompress_t -- --#endif /* LZO_CFG_COMPAT */ -- -- --#ifdef __cplusplus --} /* extern "C" */ --#endif -- --#endif /* already included */ -- -- --/* vim:set ts=4 et: */ -diff --git a/remmina-plugins/vnc/libvncserver/common/lzodefs.h b/remmina-plugins/vnc/libvncserver/common/lzodefs.h -deleted file mode 100644 -index 190013f..0000000 ---- a/remmina-plugins/vnc/libvncserver/common/lzodefs.h -+++ /dev/null -@@ -1,1851 +0,0 @@ --/* lzodefs.h -- architecture, OS and compiler specific defines -- -- This file is part of the LZO real-time data compression library. -- -- Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer -- All Rights Reserved. -- -- The LZO library is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 2 of -- the License, or (at your option) any later version. -- -- The LZO library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with the LZO library; see the file COPYING. -- If not, write to the Free Software Foundation, Inc., -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- -- Markus F.X.J. Oberhumer -- -- http://www.oberhumer.com/opensource/lzo/ -- */ -- -- --#ifndef __LZODEFS_H_INCLUDED --#define __LZODEFS_H_INCLUDED 1 -- --#if defined(__CYGWIN32__) && !defined(__CYGWIN__) --# define __CYGWIN__ __CYGWIN32__ --#endif --#if defined(__IBMCPP__) && !defined(__IBMC__) --# define __IBMC__ __IBMCPP__ --#endif --#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) --# define __INTEL_COMPILER __ICL --#endif --#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) --# define _ALL_SOURCE 1 --#endif --#if defined(__mips__) && defined(__R5900__) --# if !defined(__LONG_MAX__) --# define __LONG_MAX__ 9223372036854775807L --# endif --#endif --#if defined(__INTEL_COMPILER) && defined(__linux__) --# pragma warning(disable: 193) --#endif --#if defined(__KEIL__) && defined(__C166__) --# pragma warning disable = 322 --#elif 0 && defined(__C251__) --# pragma warning disable = 322 --#endif --#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) --# if (_MSC_VER >= 1300) --# pragma warning(disable: 4668) --# endif --#endif --#if 0 && defined(__WATCOMC__) --# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) --# pragma warning 203 9 --# endif --#endif --#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) --# pragma option -h --#endif --#if 0 --#define LZO_0xffffL 0xfffful --#define LZO_0xffffffffL 0xfffffffful --#else --#define LZO_0xffffL 65535ul --#define LZO_0xffffffffL 4294967295ul --#endif --#if (LZO_0xffffL == LZO_0xffffffffL) --# error "your preprocessor is broken 1" --#endif --#if (16ul * 16384ul != 262144ul) --# error "your preprocessor is broken 2" --#endif --#if 0 --#if (32767 >= 4294967295ul) --# error "your preprocessor is broken 3" --#endif --#if (65535u >= 4294967295ul) --# error "your preprocessor is broken 4" --#endif --#endif --#if (UINT_MAX == LZO_0xffffL) --#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) --# if !defined(MSDOS) --# define MSDOS 1 --# endif --# if !defined(_MSDOS) --# define _MSDOS 1 --# endif --#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) --# if (__VERSION == 520) && (MB_LEN_MAX == 1) --# if !defined(__AZTEC_C__) --# define __AZTEC_C__ __VERSION --# endif --# if !defined(__DOS__) --# define __DOS__ 1 --# endif --# endif --#endif --#endif --#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) --# define ptrdiff_t long --# define _PTRDIFF_T_DEFINED 1 --#endif --#if (UINT_MAX == LZO_0xffffL) --# undef __LZO_RENAME_A --# undef __LZO_RENAME_B --# if defined(__AZTEC_C__) && defined(__DOS__) --# define __LZO_RENAME_A 1 --# elif defined(_MSC_VER) && defined(MSDOS) --# if (_MSC_VER < 600) --# define __LZO_RENAME_A 1 --# elif (_MSC_VER < 700) --# define __LZO_RENAME_B 1 --# endif --# elif defined(__TSC__) && defined(__OS2__) --# define __LZO_RENAME_A 1 --# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) --# define __LZO_RENAME_A 1 --# elif defined(__PACIFIC__) && defined(DOS) --# if !defined(__far) --# define __far far --# endif --# if !defined(__near) --# define __near near --# endif --# endif --# if defined(__LZO_RENAME_A) --# if !defined(__cdecl) --# define __cdecl cdecl --# endif --# if !defined(__far) --# define __far far --# endif --# if !defined(__huge) --# define __huge huge --# endif --# if !defined(__near) --# define __near near --# endif --# if !defined(__pascal) --# define __pascal pascal --# endif --# if !defined(__huge) --# define __huge huge --# endif --# elif defined(__LZO_RENAME_B) --# if !defined(__cdecl) --# define __cdecl _cdecl --# endif --# if !defined(__far) --# define __far _far --# endif --# if !defined(__huge) --# define __huge _huge --# endif --# if !defined(__near) --# define __near _near --# endif --# if !defined(__pascal) --# define __pascal _pascal --# endif --# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) --# if !defined(__cdecl) --# define __cdecl cdecl --# endif --# if !defined(__pascal) --# define __pascal pascal --# endif --# endif --# undef __LZO_RENAME_A --# undef __LZO_RENAME_B --#endif --#if (UINT_MAX == LZO_0xffffL) --#if defined(__AZTEC_C__) && defined(__DOS__) --# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 --#elif defined(_MSC_VER) && defined(MSDOS) --# if (_MSC_VER < 600) --# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 --# endif --# if (_MSC_VER < 700) --# define LZO_BROKEN_INTEGRAL_PROMOTION 1 --# define LZO_BROKEN_SIZEOF 1 --# endif --#elif defined(__PACIFIC__) && defined(DOS) --# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 --#elif defined(__TURBOC__) && defined(__MSDOS__) --# if (__TURBOC__ < 0x0150) --# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 --# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 --# define LZO_BROKEN_INTEGRAL_PROMOTION 1 --# endif --# if (__TURBOC__ < 0x0200) --# define LZO_BROKEN_SIZEOF 1 --# endif --# if (__TURBOC__ < 0x0400) && defined(__cplusplus) --# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 --# endif --#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) --# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 --# define LZO_BROKEN_SIZEOF 1 --#endif --#endif --#if defined(__WATCOMC__) && (__WATCOMC__ < 900) --# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 --#endif --#if defined(_CRAY) && defined(_CRAY1) --# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 --#endif --#define LZO_PP_STRINGIZE(x) #x --#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) --#define LZO_PP_CONCAT2(a,b) a ## b --#define LZO_PP_CONCAT3(a,b,c) a ## b ## c --#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d --#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e --#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) --#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) --#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) --#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) --#if 1 --#define LZO_CPP_STRINGIZE(x) #x --#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) --#define LZO_CPP_CONCAT2(a,b) a ## b --#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c --#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d --#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e --#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) --#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) --#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) --#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) --#endif --#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) --#if 1 && defined(__cplusplus) --# if !defined(__STDC_CONSTANT_MACROS) --# define __STDC_CONSTANT_MACROS 1 --# endif --# if !defined(__STDC_LIMIT_MACROS) --# define __STDC_LIMIT_MACROS 1 --# endif --#endif --#if defined(__cplusplus) --# define LZO_EXTERN_C extern "C" --#else --# define LZO_EXTERN_C extern --#endif --#if !defined(__LZO_OS_OVERRIDE) --#if (LZO_OS_FREESTANDING) --# define LZO_INFO_OS "freestanding" --#elif (LZO_OS_EMBEDDED) --# define LZO_INFO_OS "embedded" --#elif 1 && defined(__IAR_SYSTEMS_ICC__) --# define LZO_OS_EMBEDDED 1 --# define LZO_INFO_OS "embedded" --#elif defined(__CYGWIN__) && defined(__GNUC__) --# define LZO_OS_CYGWIN 1 --# define LZO_INFO_OS "cygwin" --#elif defined(__EMX__) && defined(__GNUC__) --# define LZO_OS_EMX 1 --# define LZO_INFO_OS "emx" --#elif defined(__BEOS__) --# define LZO_OS_BEOS 1 --# define LZO_INFO_OS "beos" --#elif defined(__Lynx__) --# define LZO_OS_LYNXOS 1 --# define LZO_INFO_OS "lynxos" --#elif defined(__OS400__) --# define LZO_OS_OS400 1 --# define LZO_INFO_OS "os400" --#elif defined(__QNX__) --# define LZO_OS_QNX 1 --# define LZO_INFO_OS "qnx" --#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) --# define LZO_OS_DOS32 1 --# define LZO_INFO_OS "dos32" --#elif defined(__BORLANDC__) && defined(__DPMI16__) --# define LZO_OS_DOS16 1 --# define LZO_INFO_OS "dos16" --#elif defined(__ZTC__) && defined(DOS386) --# define LZO_OS_DOS32 1 --# define LZO_INFO_OS "dos32" --#elif defined(__OS2__) || defined(__OS2V2__) --# if (UINT_MAX == LZO_0xffffL) --# define LZO_OS_OS216 1 --# define LZO_INFO_OS "os216" --# elif (UINT_MAX == LZO_0xffffffffL) --# define LZO_OS_OS2 1 --# define LZO_INFO_OS "os2" --# else --# error "check your limits.h header" --# endif --#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) --# define LZO_OS_WIN64 1 --# define LZO_INFO_OS "win64" --#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) --# define LZO_OS_WIN32 1 --# define LZO_INFO_OS "win32" --#elif defined(__MWERKS__) && defined(__INTEL__) --# define LZO_OS_WIN32 1 --# define LZO_INFO_OS "win32" --#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) --# if (UINT_MAX == LZO_0xffffL) --# define LZO_OS_WIN16 1 --# define LZO_INFO_OS "win16" --# elif (UINT_MAX == LZO_0xffffffffL) --# define LZO_OS_WIN32 1 --# define LZO_INFO_OS "win32" --# else --# error "check your limits.h header" --# endif --#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) --# if (UINT_MAX == LZO_0xffffL) --# define LZO_OS_DOS16 1 --# define LZO_INFO_OS "dos16" --# elif (UINT_MAX == LZO_0xffffffffL) --# define LZO_OS_DOS32 1 --# define LZO_INFO_OS "dos32" --# else --# error "check your limits.h header" --# endif --#elif defined(__WATCOMC__) --# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) --# define LZO_OS_DOS16 1 --# define LZO_INFO_OS "dos16" --# elif defined(__NT__) && (__WATCOMC__ < 1100) --# define LZO_OS_WIN32 1 --# define LZO_INFO_OS "win32" --# elif defined(__linux__) || defined(__LINUX__) --# define LZO_OS_POSIX 1 --# define LZO_INFO_OS "posix" --# else --# error "please specify a target using the -bt compiler option" --# endif --#elif defined(__palmos__) --# define LZO_OS_PALMOS 1 --# define LZO_INFO_OS "palmos" --#elif defined(__TOS__) || defined(__atarist__) --# define LZO_OS_TOS 1 --# define LZO_INFO_OS "tos" --#elif defined(macintosh) && !defined(__ppc__) --# define LZO_OS_MACCLASSIC 1 --# define LZO_INFO_OS "macclassic" --#elif defined(__VMS) --# define LZO_OS_VMS 1 --# define LZO_INFO_OS "vms" --#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) --# define LZO_OS_CONSOLE 1 --# define LZO_OS_CONSOLE_PS2 1 --# define LZO_INFO_OS "console" --# define LZO_INFO_OS_CONSOLE "ps2" --#elif (defined(__mips__) && defined(__psp__)) --# define LZO_OS_CONSOLE 1 --# define LZO_OS_CONSOLE_PSP 1 --# define LZO_INFO_OS "console" --# define LZO_INFO_OS_CONSOLE "psp" --#else --# define LZO_OS_POSIX 1 --# define LZO_INFO_OS "posix" --#endif --#if (LZO_OS_POSIX) --# if defined(_AIX) || defined(__AIX__) || defined(__aix__) --# define LZO_OS_POSIX_AIX 1 --# define LZO_INFO_OS_POSIX "aix" --# elif defined(__FreeBSD__) --# define LZO_OS_POSIX_FREEBSD 1 --# define LZO_INFO_OS_POSIX "freebsd" --# elif defined(__hpux__) || defined(__hpux) --# define LZO_OS_POSIX_HPUX 1 --# define LZO_INFO_OS_POSIX "hpux" --# elif defined(__INTERIX) --# define LZO_OS_POSIX_INTERIX 1 --# define LZO_INFO_OS_POSIX "interix" --# elif defined(__IRIX__) || defined(__irix__) --# define LZO_OS_POSIX_IRIX 1 --# define LZO_INFO_OS_POSIX "irix" --# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) --# define LZO_OS_POSIX_LINUX 1 --# define LZO_INFO_OS_POSIX "linux" --# elif defined(__APPLE__) || defined(__MACOS__) --# define LZO_OS_POSIX_MACOSX 1 --# define LZO_INFO_OS_POSIX "macosx" --# elif defined(__minix__) || defined(__minix) --# define LZO_OS_POSIX_MINIX 1 --# define LZO_INFO_OS_POSIX "minix" --# elif defined(__NetBSD__) --# define LZO_OS_POSIX_NETBSD 1 --# define LZO_INFO_OS_POSIX "netbsd" --# elif defined(__OpenBSD__) --# define LZO_OS_POSIX_OPENBSD 1 --# define LZO_INFO_OS_POSIX "openbsd" --# elif defined(__osf__) --# define LZO_OS_POSIX_OSF 1 --# define LZO_INFO_OS_POSIX "osf" --# elif defined(__solaris__) || defined(__sun) --# if defined(__SVR4) || defined(__svr4__) --# define LZO_OS_POSIX_SOLARIS 1 --# define LZO_INFO_OS_POSIX "solaris" --# else --# define LZO_OS_POSIX_SUNOS 1 --# define LZO_INFO_OS_POSIX "sunos" --# endif --# elif defined(__ultrix__) || defined(__ultrix) --# define LZO_OS_POSIX_ULTRIX 1 --# define LZO_INFO_OS_POSIX "ultrix" --# elif defined(_UNICOS) --# define LZO_OS_POSIX_UNICOS 1 --# define LZO_INFO_OS_POSIX "unicos" --# else --# define LZO_OS_POSIX_UNKNOWN 1 --# define LZO_INFO_OS_POSIX "unknown" --# endif --#endif --#endif --#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) --# if (UINT_MAX != LZO_0xffffL) --# error "this should not happen" --# endif --# if (ULONG_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --#endif --#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) --# if (UINT_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --# if (ULONG_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --#endif --#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) --# define LZO_CC_CILLY 1 --# define LZO_INFO_CC "Cilly" --# if defined(__CILLY__) --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) --# else --# define LZO_INFO_CCVER "unknown" --# endif --#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) --# define LZO_CC_SDCC 1 --# define LZO_INFO_CC "sdcc" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) --#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) --# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) --# define LZO_INFO_CC "Pathscale C" --# define LZO_INFO_CCVER __PATHSCALE__ --#elif defined(__INTEL_COMPILER) --# define LZO_CC_INTELC 1 --# define LZO_INFO_CC "Intel C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) --# if defined(_WIN32) || defined(_WIN64) --# define LZO_CC_SYNTAX_MSC 1 --# else --# define LZO_CC_SYNTAX_GNUC 1 --# endif --#elif defined(__POCC__) && defined(_WIN32) --# define LZO_CC_PELLESC 1 --# define LZO_INFO_CC "Pelles C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) --#elif defined(__clang__) && defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) --# if defined(__GNUC_PATCHLEVEL__) --# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) --# else --# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) --# endif --# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) --# define LZO_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__) --# else --# define LZO_CC_CLANG_CLANG 0x020700L --# endif --# define LZO_CC_CLANG LZO_CC_CLANG_GNUC --# define LZO_INFO_CC "clang" --# define LZO_INFO_CCVER __VERSION__ --#elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) --# if defined(__GNUC_PATCHLEVEL__) --# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) --# else --# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) --# endif --# define LZO_CC_LLVM LZO_CC_LLVM_GNUC --# define LZO_INFO_CC "llvm-gcc" --# define LZO_INFO_CCVER __VERSION__ --#elif defined(__GNUC__) && defined(__VERSION__) --# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) --# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) --# elif defined(__GNUC_MINOR__) --# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) --# else --# define LZO_CC_GNUC (__GNUC__ * 0x10000L) --# endif --# define LZO_INFO_CC "gcc" --# define LZO_INFO_CCVER __VERSION__ --#elif defined(__ACK__) && defined(_ACK) --# define LZO_CC_ACK 1 --# define LZO_INFO_CC "Amsterdam Compiler Kit C" --# define LZO_INFO_CCVER "unknown" --#elif defined(__AZTEC_C__) --# define LZO_CC_AZTECC 1 --# define LZO_INFO_CC "Aztec C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) --#elif defined(__CODEGEARC__) --# define LZO_CC_CODEGEARC 1 --# define LZO_INFO_CC "CodeGear C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) --#elif defined(__BORLANDC__) --# define LZO_CC_BORLANDC 1 --# define LZO_INFO_CC "Borland C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) --#elif defined(_CRAYC) && defined(_RELEASE) --# define LZO_CC_CRAYC 1 --# define LZO_INFO_CC "Cray C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) --#elif defined(__DMC__) && defined(__SC__) --# define LZO_CC_DMC 1 --# define LZO_INFO_CC "Digital Mars C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) --#elif defined(__DECC) --# define LZO_CC_DECC 1 --# define LZO_INFO_CC "DEC C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) --#elif defined(__HIGHC__) --# define LZO_CC_HIGHC 1 --# define LZO_INFO_CC "MetaWare High C" --# define LZO_INFO_CCVER "unknown" --#elif defined(__IAR_SYSTEMS_ICC__) --# define LZO_CC_IARC 1 --# define LZO_INFO_CC "IAR C" --# if defined(__VER__) --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) --# else --# define LZO_INFO_CCVER "unknown" --# endif --#elif defined(__IBMC__) --# define LZO_CC_IBMC 1 --# define LZO_INFO_CC "IBM C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) --#elif defined(__KEIL__) && defined(__C166__) --# define LZO_CC_KEILC 1 --# define LZO_INFO_CC "Keil C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) --#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) --# define LZO_CC_LCCWIN32 1 --# define LZO_INFO_CC "lcc-win32" --# define LZO_INFO_CCVER "unknown" --#elif defined(__LCC__) --# define LZO_CC_LCC 1 --# define LZO_INFO_CC "lcc" --# if defined(__LCC_VERSION__) --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) --# else --# define LZO_INFO_CCVER "unknown" --# endif --#elif defined(_MSC_VER) --# define LZO_CC_MSC 1 --# define LZO_INFO_CC "Microsoft C" --# if defined(_MSC_FULL_VER) --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) --# else --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) --# endif --#elif defined(__MWERKS__) --# define LZO_CC_MWERKS 1 --# define LZO_INFO_CC "Metrowerks C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) --#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) --# define LZO_CC_NDPC 1 --# define LZO_INFO_CC "Microway NDP C" --# define LZO_INFO_CCVER "unknown" --#elif defined(__PACIFIC__) --# define LZO_CC_PACIFICC 1 --# define LZO_INFO_CC "Pacific C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) --#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) --# define LZO_CC_PGI 1 --# define LZO_INFO_CC "Portland Group PGI C" --# define LZO_INFO_CCVER "unknown" --#elif defined(__PUREC__) && defined(__TOS__) --# define LZO_CC_PUREC 1 --# define LZO_INFO_CC "Pure C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) --#elif defined(__SC__) && defined(__ZTC__) --# define LZO_CC_SYMANTECC 1 --# define LZO_INFO_CC "Symantec C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) --#elif defined(__SUNPRO_C) --# define LZO_INFO_CC "SunPro C" --# if ((__SUNPRO_C)+0 > 0) --# define LZO_CC_SUNPROC __SUNPRO_C --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) --# else --# define LZO_CC_SUNPROC 1 --# define LZO_INFO_CCVER "unknown" --# endif --#elif defined(__SUNPRO_CC) --# define LZO_INFO_CC "SunPro C" --# if ((__SUNPRO_CC)+0 > 0) --# define LZO_CC_SUNPROC __SUNPRO_CC --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) --# else --# define LZO_CC_SUNPROC 1 --# define LZO_INFO_CCVER "unknown" --# endif --#elif defined(__TINYC__) --# define LZO_CC_TINYC 1 --# define LZO_INFO_CC "Tiny C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) --#elif defined(__TSC__) --# define LZO_CC_TOPSPEEDC 1 --# define LZO_INFO_CC "TopSpeed C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) --#elif defined(__WATCOMC__) --# define LZO_CC_WATCOMC 1 --# define LZO_INFO_CC "Watcom C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) --#elif defined(__TURBOC__) --# define LZO_CC_TURBOC 1 --# define LZO_INFO_CC "Turbo C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) --#elif defined(__ZTC__) --# define LZO_CC_ZORTECHC 1 --# define LZO_INFO_CC "Zortech C" --# if (__ZTC__ == 0x310) --# define LZO_INFO_CCVER "0x310" --# else --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) --# endif --#else --# define LZO_CC_UNKNOWN 1 --# define LZO_INFO_CC "unknown" --# define LZO_INFO_CCVER "unknown" --#endif --#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) --# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" --#endif --#if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) --# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) --# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) --# define LZO_ARCH_CRAY_MPP 1 --# elif defined(_CRAY1) --# define LZO_ARCH_CRAY_PVP 1 --# endif --# endif --#endif --#if !defined(__LZO_ARCH_OVERRIDE) --#if (LZO_ARCH_GENERIC) --# define LZO_INFO_ARCH "generic" --#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) --# define LZO_ARCH_I086 1 --# define LZO_ARCH_IA16 1 --# define LZO_INFO_ARCH "i086" --#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) --# define LZO_ARCH_ALPHA 1 --# define LZO_INFO_ARCH "alpha" --#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) --# define LZO_ARCH_ALPHA 1 --# define LZO_INFO_ARCH "alpha" --#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) --# define LZO_ARCH_AMD64 1 --# define LZO_INFO_ARCH "amd64" --#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) --# define LZO_ARCH_ARM 1 --# define LZO_ARCH_ARM_THUMB 1 --# define LZO_INFO_ARCH "arm_thumb" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) --# define LZO_ARCH_ARM 1 --# if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1) --# define LZO_ARCH_ARM_THUMB 1 --# define LZO_INFO_ARCH "arm_thumb" --# elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2) --# define LZO_INFO_ARCH "arm" --# else --# define LZO_INFO_ARCH "arm" --# endif --#elif defined(__arm__) || defined(_M_ARM) --# define LZO_ARCH_ARM 1 --# define LZO_INFO_ARCH "arm" --#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) --# define LZO_ARCH_AVR 1 --# define LZO_INFO_ARCH "avr" --#elif defined(__avr32__) || defined(__AVR32__) --# define LZO_ARCH_AVR32 1 --# define LZO_INFO_ARCH "avr32" --#elif defined(__bfin__) --# define LZO_ARCH_BLACKFIN 1 --# define LZO_INFO_ARCH "blackfin" --#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) --# define LZO_ARCH_C166 1 --# define LZO_INFO_ARCH "c166" --#elif defined(__cris__) --# define LZO_ARCH_CRIS 1 --# define LZO_INFO_ARCH "cris" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) --# define LZO_ARCH_EZ80 1 --# define LZO_INFO_ARCH "ez80" --#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) --# define LZO_ARCH_H8300 1 --# define LZO_INFO_ARCH "h8300" --#elif defined(__hppa__) || defined(__hppa) --# define LZO_ARCH_HPPA 1 --# define LZO_INFO_ARCH "hppa" --#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) --# define LZO_ARCH_I386 1 --# define LZO_ARCH_IA32 1 --# define LZO_INFO_ARCH "i386" --#elif (LZO_CC_ZORTECHC && defined(__I86__)) --# define LZO_ARCH_I386 1 --# define LZO_ARCH_IA32 1 --# define LZO_INFO_ARCH "i386" --#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) --# define LZO_ARCH_I386 1 --# define LZO_ARCH_IA32 1 --# define LZO_INFO_ARCH "i386" --#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) --# define LZO_ARCH_IA64 1 --# define LZO_INFO_ARCH "ia64" --#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) --# define LZO_ARCH_M16C 1 --# define LZO_INFO_ARCH "m16c" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) --# define LZO_ARCH_M16C 1 --# define LZO_INFO_ARCH "m16c" --#elif defined(__m32r__) --# define LZO_ARCH_M32R 1 --# define LZO_INFO_ARCH "m32r" --#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) --# define LZO_ARCH_M68K 1 --# define LZO_INFO_ARCH "m68k" --#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) --# define LZO_ARCH_MCS251 1 --# define LZO_INFO_ARCH "mcs251" --#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) --# define LZO_ARCH_MCS51 1 --# define LZO_INFO_ARCH "mcs51" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) --# define LZO_ARCH_MCS51 1 --# define LZO_INFO_ARCH "mcs51" --#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) --# define LZO_ARCH_MIPS 1 --# define LZO_INFO_ARCH "mips" --#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) --# define LZO_ARCH_MSP430 1 --# define LZO_INFO_ARCH "msp430" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) --# define LZO_ARCH_MSP430 1 --# define LZO_INFO_ARCH "msp430" --#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) --# define LZO_ARCH_POWERPC 1 --# define LZO_INFO_ARCH "powerpc" --#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) --# define LZO_ARCH_S390 1 --# define LZO_INFO_ARCH "s390" --#elif defined(__sh__) || defined(_M_SH) --# define LZO_ARCH_SH 1 --# define LZO_INFO_ARCH "sh" --#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) --# define LZO_ARCH_SPARC 1 --# define LZO_INFO_ARCH "sparc" --#elif defined(__SPU__) --# define LZO_ARCH_SPU 1 --# define LZO_INFO_ARCH "spu" --#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) --# define LZO_ARCH_Z80 1 --# define LZO_INFO_ARCH "z80" --#elif (LZO_ARCH_CRAY_PVP) --# if defined(_CRAYSV1) --# define LZO_ARCH_CRAY_SV1 1 --# define LZO_INFO_ARCH "cray_sv1" --# elif (_ADDR64) --# define LZO_ARCH_CRAY_T90 1 --# define LZO_INFO_ARCH "cray_t90" --# elif (_ADDR32) --# define LZO_ARCH_CRAY_YMP 1 --# define LZO_INFO_ARCH "cray_ymp" --# else --# define LZO_ARCH_CRAY_XMP 1 --# define LZO_INFO_ARCH "cray_xmp" --# endif --#else --# define LZO_ARCH_UNKNOWN 1 --# define LZO_INFO_ARCH "unknown" --#endif --#endif --#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) --# error "FIXME - missing define for CPU architecture" --#endif --#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) --# error "FIXME - missing WIN32 define for CPU architecture" --#endif --#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) --# error "FIXME - missing WIN64 define for CPU architecture" --#endif --#if (LZO_OS_OS216 || LZO_OS_WIN16) --# define LZO_ARCH_I086PM 1 --# define LZO_ARCH_IA16PM 1 --#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) --# define LZO_ARCH_I086PM 1 --# define LZO_ARCH_IA16PM 1 --#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) --# define LZO_ARCH_I086PM 1 --# define LZO_ARCH_IA16PM 1 --#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) --# define LZO_ARCH_I086PM 1 --# define LZO_ARCH_IA16PM 1 --#endif --#if (LZO_ARCH_ARM_THUMB) && !(LZO_ARCH_ARM) --# error "this should not happen" --#endif --#if (LZO_ARCH_I086PM) && !(LZO_ARCH_I086) --# error "this should not happen" --#endif --#if (LZO_ARCH_I086) --# if (UINT_MAX != LZO_0xffffL) --# error "this should not happen" --# endif --# if (ULONG_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --#endif --#if (LZO_ARCH_I386) --# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) --# error "this should not happen" --# endif --# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) --# error "this should not happen" --# endif --# if (ULONG_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --#endif --#if !defined(__LZO_MM_OVERRIDE) --#if (LZO_ARCH_I086) --#if (UINT_MAX != LZO_0xffffL) --# error "this should not happen" --#endif --#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) --# define LZO_MM_TINY 1 --#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) --# define LZO_MM_HUGE 1 --#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) --# define LZO_MM_SMALL 1 --#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) --# define LZO_MM_MEDIUM 1 --#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) --# define LZO_MM_COMPACT 1 --#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) --# define LZO_MM_LARGE 1 --#elif (LZO_CC_AZTECC) --# if defined(_LARGE_CODE) && defined(_LARGE_DATA) --# define LZO_MM_LARGE 1 --# elif defined(_LARGE_CODE) --# define LZO_MM_MEDIUM 1 --# elif defined(_LARGE_DATA) --# define LZO_MM_COMPACT 1 --# else --# define LZO_MM_SMALL 1 --# endif --#elif (LZO_CC_ZORTECHC && defined(__VCM__)) --# define LZO_MM_LARGE 1 --#else --# error "unknown memory model" --#endif --#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) --#define LZO_HAVE_MM_HUGE_PTR 1 --#define LZO_HAVE_MM_HUGE_ARRAY 1 --#if (LZO_MM_TINY) --# undef LZO_HAVE_MM_HUGE_ARRAY --#endif --#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) --# undef LZO_HAVE_MM_HUGE_PTR --# undef LZO_HAVE_MM_HUGE_ARRAY --#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) --# undef LZO_HAVE_MM_HUGE_ARRAY --#elif (LZO_CC_MSC && defined(_QC)) --# undef LZO_HAVE_MM_HUGE_ARRAY --# if (_MSC_VER < 600) --# undef LZO_HAVE_MM_HUGE_PTR --# endif --#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) --# undef LZO_HAVE_MM_HUGE_ARRAY --#endif --#if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR) --# if (LZO_OS_DOS16) --# error "this should not happen" --# elif (LZO_CC_ZORTECHC) --# else --# error "this should not happen" --# endif --#endif --#ifdef __cplusplus --extern "C" { --#endif --#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) -- extern void __near __cdecl _AHSHIFT(void); --# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) --#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) -- extern void __near __cdecl _AHSHIFT(void); --# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) --#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) -- extern void __near __cdecl _AHSHIFT(void); --# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) --#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) -- extern void __near __cdecl _AHSHIFT(void); --# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) --#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) --# define LZO_MM_AHSHIFT 12 --#elif (LZO_CC_WATCOMC) -- extern unsigned char _HShift; --# define LZO_MM_AHSHIFT ((unsigned) _HShift) --#else --# error "FIXME - implement LZO_MM_AHSHIFT" --#endif --#ifdef __cplusplus --} --#endif --#endif --#elif (LZO_ARCH_C166) --#if !defined(__MODEL__) --# error "FIXME - C166 __MODEL__" --#elif ((__MODEL__) == 0) --# define LZO_MM_SMALL 1 --#elif ((__MODEL__) == 1) --# define LZO_MM_SMALL 1 --#elif ((__MODEL__) == 2) --# define LZO_MM_LARGE 1 --#elif ((__MODEL__) == 3) --# define LZO_MM_TINY 1 --#elif ((__MODEL__) == 4) --# define LZO_MM_XTINY 1 --#elif ((__MODEL__) == 5) --# define LZO_MM_XSMALL 1 --#else --# error "FIXME - C166 __MODEL__" --#endif --#elif (LZO_ARCH_MCS251) --#if !defined(__MODEL__) --# error "FIXME - MCS251 __MODEL__" --#elif ((__MODEL__) == 0) --# define LZO_MM_SMALL 1 --#elif ((__MODEL__) == 2) --# define LZO_MM_LARGE 1 --#elif ((__MODEL__) == 3) --# define LZO_MM_TINY 1 --#elif ((__MODEL__) == 4) --# define LZO_MM_XTINY 1 --#elif ((__MODEL__) == 5) --# define LZO_MM_XSMALL 1 --#else --# error "FIXME - MCS251 __MODEL__" --#endif --#elif (LZO_ARCH_MCS51) --#if !defined(__MODEL__) --# error "FIXME - MCS51 __MODEL__" --#elif ((__MODEL__) == 1) --# define LZO_MM_SMALL 1 --#elif ((__MODEL__) == 2) --# define LZO_MM_LARGE 1 --#elif ((__MODEL__) == 3) --# define LZO_MM_TINY 1 --#elif ((__MODEL__) == 4) --# define LZO_MM_XTINY 1 --#elif ((__MODEL__) == 5) --# define LZO_MM_XSMALL 1 --#else --# error "FIXME - MCS51 __MODEL__" --#endif --#elif (LZO_ARCH_CRAY_PVP) --# define LZO_MM_PVP 1 --#else --# define LZO_MM_FLAT 1 --#endif --#if (LZO_MM_COMPACT) --# define LZO_INFO_MM "compact" --#elif (LZO_MM_FLAT) --# define LZO_INFO_MM "flat" --#elif (LZO_MM_HUGE) --# define LZO_INFO_MM "huge" --#elif (LZO_MM_LARGE) --# define LZO_INFO_MM "large" --#elif (LZO_MM_MEDIUM) --# define LZO_INFO_MM "medium" --#elif (LZO_MM_PVP) --# define LZO_INFO_MM "pvp" --#elif (LZO_MM_SMALL) --# define LZO_INFO_MM "small" --#elif (LZO_MM_TINY) --# define LZO_INFO_MM "tiny" --#else --# error "unknown memory model" --#endif --#endif --#if defined(SIZEOF_SHORT) --# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) --#endif --#if defined(SIZEOF_INT) --# define LZO_SIZEOF_INT (SIZEOF_INT) --#endif --#if defined(SIZEOF_LONG) --# define LZO_SIZEOF_LONG (SIZEOF_LONG) --#endif --#if defined(SIZEOF_LONG_LONG) --# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) --#endif --#if defined(SIZEOF___INT16) --# define LZO_SIZEOF___INT16 (SIZEOF___INT16) --#endif --#if defined(SIZEOF___INT32) --# define LZO_SIZEOF___INT32 (SIZEOF___INT32) --#endif --#if defined(SIZEOF___INT64) --# define LZO_SIZEOF___INT64 (SIZEOF___INT64) --#endif --#if defined(SIZEOF_VOID_P) --# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) --#endif --#if defined(SIZEOF_SIZE_T) --# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) --#endif --#if defined(SIZEOF_PTRDIFF_T) --# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) --#endif --#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) --#if !defined(LZO_SIZEOF_SHORT) --# if (LZO_ARCH_CRAY_PVP) --# define LZO_SIZEOF_SHORT 8 --# elif (USHRT_MAX == LZO_0xffffL) --# define LZO_SIZEOF_SHORT 2 --# elif (__LZO_LSR(USHRT_MAX,7) == 1) --# define LZO_SIZEOF_SHORT 1 --# elif (__LZO_LSR(USHRT_MAX,15) == 1) --# define LZO_SIZEOF_SHORT 2 --# elif (__LZO_LSR(USHRT_MAX,31) == 1) --# define LZO_SIZEOF_SHORT 4 --# elif (__LZO_LSR(USHRT_MAX,63) == 1) --# define LZO_SIZEOF_SHORT 8 --# elif (__LZO_LSR(USHRT_MAX,127) == 1) --# define LZO_SIZEOF_SHORT 16 --# else --# error "LZO_SIZEOF_SHORT" --# endif --#endif --#if !defined(LZO_SIZEOF_INT) --# if (LZO_ARCH_CRAY_PVP) --# define LZO_SIZEOF_INT 8 --# elif (UINT_MAX == LZO_0xffffL) --# define LZO_SIZEOF_INT 2 --# elif (UINT_MAX == LZO_0xffffffffL) --# define LZO_SIZEOF_INT 4 --# elif (__LZO_LSR(UINT_MAX,7) == 1) --# define LZO_SIZEOF_INT 1 --# elif (__LZO_LSR(UINT_MAX,15) == 1) --# define LZO_SIZEOF_INT 2 --# elif (__LZO_LSR(UINT_MAX,31) == 1) --# define LZO_SIZEOF_INT 4 --# elif (__LZO_LSR(UINT_MAX,63) == 1) --# define LZO_SIZEOF_INT 8 --# elif (__LZO_LSR(UINT_MAX,127) == 1) --# define LZO_SIZEOF_INT 16 --# else --# error "LZO_SIZEOF_INT" --# endif --#endif --#if !defined(LZO_SIZEOF_LONG) --# if (ULONG_MAX == LZO_0xffffffffL) --# define LZO_SIZEOF_LONG 4 --# elif (__LZO_LSR(ULONG_MAX,7) == 1) --# define LZO_SIZEOF_LONG 1 --# elif (__LZO_LSR(ULONG_MAX,15) == 1) --# define LZO_SIZEOF_LONG 2 --# elif (__LZO_LSR(ULONG_MAX,31) == 1) --# define LZO_SIZEOF_LONG 4 --# elif (__LZO_LSR(ULONG_MAX,63) == 1) --# define LZO_SIZEOF_LONG 8 --# elif (__LZO_LSR(ULONG_MAX,127) == 1) --# define LZO_SIZEOF_LONG 16 --# else --# error "LZO_SIZEOF_LONG" --# endif --#endif --#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) --#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) --# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) --# if (LZO_CC_GNUC >= 0x030300ul) --# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) --# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG --# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) --# define LZO_SIZEOF_LONG_LONG 4 --# endif --# endif --# endif --#endif --#endif --#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) --#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) --#if (LZO_ARCH_I086 && LZO_CC_DMC) --#elif (LZO_CC_CILLY) && defined(__GNUC__) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define LZO_SIZEOF_LONG_LONG 8 --#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_OS_WIN64 || defined(_WIN64)) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) --# define LZO_SIZEOF___INT64 8 --#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) --#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) --# define LZO_SIZEOF_LONG_LONG 8 --#endif --#endif --#endif --#if defined(__cplusplus) && (LZO_CC_GNUC) --# if (LZO_CC_GNUC < 0x020800ul) --# undef LZO_SIZEOF_LONG_LONG --# endif --#endif --#if (LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) --# undef LZO_SIZEOF_LONG_LONG --#endif --#if !defined(LZO_SIZEOF_VOID_P) --#if (LZO_ARCH_I086) --# define __LZO_WORDSIZE 2 --# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) --# define LZO_SIZEOF_VOID_P 2 --# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) --# define LZO_SIZEOF_VOID_P 4 --# else --# error "LZO_MM" --# endif --#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) --# define __LZO_WORDSIZE 1 --# define LZO_SIZEOF_VOID_P 2 --#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) --# define LZO_SIZEOF_VOID_P 2 --#elif (LZO_ARCH_H8300) --# if defined(__NORMAL_MODE__) --# define __LZO_WORDSIZE 4 --# define LZO_SIZEOF_VOID_P 2 --# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) --# define __LZO_WORDSIZE 4 --# define LZO_SIZEOF_VOID_P 4 --# else --# define __LZO_WORDSIZE 2 --# define LZO_SIZEOF_VOID_P 2 --# endif --# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT --# endif --#elif (LZO_ARCH_M16C) --# define __LZO_WORDSIZE 2 --# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) --# define LZO_SIZEOF_VOID_P 4 --# else --# define LZO_SIZEOF_VOID_P 2 --# endif --#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) --# define __LZO_WORDSIZE 8 --# define LZO_SIZEOF_VOID_P 4 --#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) --# define __LZO_WORDSIZE 8 --# define LZO_SIZEOF_VOID_P 8 --#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) --# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG --#elif (LZO_OS_OS400 || defined(__OS400__)) --# define __LZO_WORDSIZE LZO_SIZEOF_LONG --# define LZO_SIZEOF_VOID_P 16 --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG --#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) --# define LZO_SIZEOF_VOID_P 8 --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG --#elif (LZO_ARCH_SPU) --# if 0 --# define __LZO_WORDSIZE 16 --# endif --# define LZO_SIZEOF_VOID_P 4 --#else --# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG --#endif --#endif --#if !defined(LZO_WORDSIZE) --# if defined(__LZO_WORDSIZE) --# define LZO_WORDSIZE __LZO_WORDSIZE --# else --# define LZO_WORDSIZE LZO_SIZEOF_VOID_P --# endif --#endif --#if !defined(LZO_SIZEOF_SIZE_T) --#if (LZO_ARCH_I086 || LZO_ARCH_M16C) --# define LZO_SIZEOF_SIZE_T 2 --#else --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P --#endif --#endif --#if !defined(LZO_SIZEOF_PTRDIFF_T) --#if (LZO_ARCH_I086) --# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P --# elif (LZO_MM_COMPACT || LZO_MM_LARGE) --# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) --# define LZO_SIZEOF_PTRDIFF_T 4 --# else --# define LZO_SIZEOF_PTRDIFF_T 2 --# endif --# else --# error "LZO_MM" --# endif --#else --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T --#endif --#endif --#if (LZO_ABI_NEUTRAL_ENDIAN) --# undef LZO_ABI_BIG_ENDIAN --# undef LZO_ABI_LITTLE_ENDIAN --#elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN) --#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) --# define LZO_ABI_BIG_ENDIAN 1 --#elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64) --# define LZO_ABI_LITTLE_ENDIAN 1 --#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) --# define LZO_ABI_LITTLE_ENDIAN 1 --#elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390) --# define LZO_ABI_BIG_ENDIAN 1 --#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) --# if (__LITTLE_ENDIAN__ == 1) --# define LZO_ABI_LITTLE_ENDIAN 1 --# else --# define LZO_ABI_BIG_ENDIAN 1 --# endif --#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) --# define LZO_ABI_BIG_ENDIAN 1 --#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) --# define LZO_ABI_LITTLE_ENDIAN 1 --#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) --# define LZO_ABI_BIG_ENDIAN 1 --#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) --# define LZO_ABI_LITTLE_ENDIAN 1 --#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) --# define LZO_ABI_BIG_ENDIAN 1 --#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) --# define LZO_ABI_LITTLE_ENDIAN 1 --#endif --#endif --#if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN) --# error "this should not happen" --#endif --#if (LZO_ABI_BIG_ENDIAN) --# define LZO_INFO_ABI_ENDIAN "be" --#elif (LZO_ABI_LITTLE_ENDIAN) --# define LZO_INFO_ABI_ENDIAN "le" --#elif (LZO_ABI_NEUTRAL_ENDIAN) --# define LZO_INFO_ABI_ENDIAN "neutral" --#endif --#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) --# define LZO_ABI_I8LP16 1 --# define LZO_INFO_ABI_PM "i8lp16" --#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) --# define LZO_ABI_ILP16 1 --# define LZO_INFO_ABI_PM "ilp16" --#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) --# define LZO_ABI_ILP32 1 --# define LZO_INFO_ABI_PM "ilp32" --#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) --# define LZO_ABI_LLP64 1 --# define LZO_INFO_ABI_PM "llp64" --#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) --# define LZO_ABI_LP64 1 --# define LZO_INFO_ABI_PM "lp64" --#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) --# define LZO_ABI_ILP64 1 --# define LZO_INFO_ABI_PM "ilp64" --#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) --# define LZO_ABI_IP32L64 1 --# define LZO_INFO_ABI_PM "ip32l64" --#endif --#if !defined(__LZO_LIBC_OVERRIDE) --#if (LZO_LIBC_NAKED) --# define LZO_INFO_LIBC "naked" --#elif (LZO_LIBC_FREESTANDING) --# define LZO_INFO_LIBC "freestanding" --#elif (LZO_LIBC_MOSTLY_FREESTANDING) --# define LZO_INFO_LIBC "mfreestanding" --#elif (LZO_LIBC_ISOC90) --# define LZO_INFO_LIBC "isoc90" --#elif (LZO_LIBC_ISOC99) --# define LZO_INFO_LIBC "isoc99" --#elif defined(__dietlibc__) --# define LZO_LIBC_DIETLIBC 1 --# define LZO_INFO_LIBC "dietlibc" --#elif defined(_NEWLIB_VERSION) --# define LZO_LIBC_NEWLIB 1 --# define LZO_INFO_LIBC "newlib" --#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) --# if defined(__UCLIBC_SUBLEVEL__) --# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) --# else --# define LZO_LIBC_UCLIBC 0x00090bL --# endif --# define LZO_INFO_LIBC "uclibc" --#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) --# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) --# define LZO_INFO_LIBC "glibc" --#elif (LZO_CC_MWERKS) && defined(__MSL__) --# define LZO_LIBC_MSL __MSL__ --# define LZO_INFO_LIBC "msl" --#elif 1 && defined(__IAR_SYSTEMS_ICC__) --# define LZO_LIBC_ISOC90 1 --# define LZO_INFO_LIBC "isoc90" --#else --# define LZO_LIBC_DEFAULT 1 --# define LZO_INFO_LIBC "default" --#endif --#endif --#if !defined(__lzo_gnuc_extension__) --#if (LZO_CC_GNUC >= 0x020800ul) --# define __lzo_gnuc_extension__ __extension__ --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_gnuc_extension__ __extension__ --#else --# define __lzo_gnuc_extension__ /*empty*/ --#endif --#endif --#if !defined(__lzo_ua_volatile) --# define __lzo_ua_volatile volatile --#endif --#if !defined(__lzo_alignof) --#if (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) --# define __lzo_alignof(e) __alignof__(e) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) --# define __lzo_alignof(e) __alignof__(e) --#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) --# define __lzo_alignof(e) __alignof(e) --#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) --# define __lzo_alignof(e) __alignof__(e) --#endif --#endif --#if defined(__lzo_alignof) --# define __lzo_HAVE_alignof 1 --#endif --#if !defined(__lzo_constructor) --#if (LZO_CC_GNUC >= 0x030400ul) --# define __lzo_constructor __attribute__((__constructor__,__used__)) --#elif (LZO_CC_GNUC >= 0x020700ul) --# define __lzo_constructor __attribute__((__constructor__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_constructor __attribute__((__constructor__)) --#endif --#endif --#if defined(__lzo_constructor) --# define __lzo_HAVE_constructor 1 --#endif --#if !defined(__lzo_destructor) --#if (LZO_CC_GNUC >= 0x030400ul) --# define __lzo_destructor __attribute__((__destructor__,__used__)) --#elif (LZO_CC_GNUC >= 0x020700ul) --# define __lzo_destructor __attribute__((__destructor__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_destructor __attribute__((__destructor__)) --#endif --#endif --#if defined(__lzo_destructor) --# define __lzo_HAVE_destructor 1 --#endif --#if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor) --# error "this should not happen" --#endif --#if !defined(__lzo_inline) --#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) --#elif defined(__cplusplus) --# define __lzo_inline inline --#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) --# define __lzo_inline __inline --#elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) --# define __lzo_inline __inline__ --#elif (LZO_CC_DMC) --# define __lzo_inline __inline --#elif (LZO_CC_INTELC) --# define __lzo_inline __inline --#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) --# define __lzo_inline __inline --#elif (LZO_CC_MSC && (_MSC_VER >= 900)) --# define __lzo_inline __inline --#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) --# define __lzo_inline __inline__ --#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) --# define __lzo_inline inline --#endif --#endif --#if defined(__lzo_inline) --# define __lzo_HAVE_inline 1 --#else --# define __lzo_inline /*empty*/ --#endif --#if !defined(__lzo_forceinline) --#if (LZO_CC_GNUC >= 0x030200ul) --# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) --# define __lzo_forceinline __forceinline --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) --# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) --#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) --# define __lzo_forceinline __forceinline --#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) --# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) --#endif --#endif --#if defined(__lzo_forceinline) --# define __lzo_HAVE_forceinline 1 --#else --# define __lzo_forceinline /*empty*/ --#endif --#if !defined(__lzo_noinline) --#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) --# define __lzo_noinline __attribute__((__noinline__,__used__)) --#elif (LZO_CC_GNUC >= 0x030200ul) --# define __lzo_noinline __attribute__((__noinline__)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC) --# define __lzo_noinline __declspec(noinline) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) --# define __lzo_noinline __attribute__((__noinline__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_noinline __attribute__((__noinline__)) --#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) --# define __lzo_noinline __declspec(noinline) --#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) --# if defined(__cplusplus) --# else --# define __lzo_noinline __declspec(noinline) --# endif --#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) --# define __lzo_noinline __attribute__((__noinline__)) --#endif --#endif --#if defined(__lzo_noinline) --# define __lzo_HAVE_noinline 1 --#else --# define __lzo_noinline /*empty*/ --#endif --#if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline) --# error "this should not happen" --#endif --#if !defined(__lzo_noreturn) --#if (LZO_CC_GNUC >= 0x020700ul) --# define __lzo_noreturn __attribute__((__noreturn__)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) --# define __lzo_noreturn __declspec(noreturn) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) --# define __lzo_noreturn __attribute__((__noreturn__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_noreturn __attribute__((__noreturn__)) --#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) --# define __lzo_noreturn __declspec(noreturn) --#endif --#endif --#if defined(__lzo_noreturn) --# define __lzo_HAVE_noreturn 1 --#else --# define __lzo_noreturn /*empty*/ --#endif --#if !defined(__lzo_nothrow) --#if (LZO_CC_GNUC >= 0x030300ul) --# define __lzo_nothrow __attribute__((__nothrow__)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus) --# define __lzo_nothrow __declspec(nothrow) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 900) && LZO_CC_SYNTAX_GNUC) --# define __lzo_nothrow __attribute__((__nothrow__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_nothrow __attribute__((__nothrow__)) --#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) --# define __lzo_nothrow __declspec(nothrow) --#endif --#endif --#if defined(__lzo_nothrow) --# define __lzo_HAVE_nothrow 1 --#else --# define __lzo_nothrow /*empty*/ --#endif --#if !defined(__lzo_restrict) --#if (LZO_CC_GNUC >= 0x030400ul) --# define __lzo_restrict __restrict__ --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) --# define __lzo_restrict __restrict__ --#elif (LZO_CC_CLANG || LZO_CC_LLVM) --# define __lzo_restrict __restrict__ --#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) --# define __lzo_restrict __restrict --#endif --#endif --#if defined(__lzo_restrict) --# define __lzo_HAVE_restrict 1 --#else --# define __lzo_restrict /*empty*/ --#endif --#if !defined(__lzo_likely) && !defined(__lzo_unlikely) --#if (LZO_CC_GNUC >= 0x030200ul) --# define __lzo_likely(e) (__builtin_expect(!!(e),1)) --# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) --# define __lzo_likely(e) (__builtin_expect(!!(e),1)) --# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_likely(e) (__builtin_expect(!!(e),1)) --# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) --#endif --#endif --#if defined(__lzo_likely) --# define __lzo_HAVE_likely 1 --#else --# define __lzo_likely(e) (e) --#endif --#if defined(__lzo_unlikely) --# define __lzo_HAVE_unlikely 1 --#else --# define __lzo_unlikely(e) (e) --#endif --#if !defined(LZO_UNUSED) --# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) --# define LZO_UNUSED(var) ((void) &var) --# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) --# define LZO_UNUSED(var) if (&var) ; else --# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define LZO_UNUSED(var) ((void) var) --# elif (LZO_CC_MSC && (_MSC_VER < 900)) --# define LZO_UNUSED(var) if (&var) ; else --# elif (LZO_CC_KEILC) --# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} --# elif (LZO_CC_PACIFICC) --# define LZO_UNUSED(var) ((void) sizeof(var)) --# elif (LZO_CC_WATCOMC) && defined(__cplusplus) --# define LZO_UNUSED(var) ((void) var) --# else --# define LZO_UNUSED(var) ((void) &var) --# endif --#endif --#if !defined(LZO_UNUSED_FUNC) --# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) --# define LZO_UNUSED_FUNC(func) ((void) func) --# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) --# define LZO_UNUSED_FUNC(func) if (func) ; else --# elif (LZO_CC_CLANG || LZO_CC_LLVM) --# define LZO_UNUSED_FUNC(func) ((void) &func) --# elif (LZO_CC_MSC && (_MSC_VER < 900)) --# define LZO_UNUSED_FUNC(func) if (func) ; else --# elif (LZO_CC_MSC) --# define LZO_UNUSED_FUNC(func) ((void) &func) --# elif (LZO_CC_KEILC || LZO_CC_PELLESC) --# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} --# else --# define LZO_UNUSED_FUNC(func) ((void) func) --# endif --#endif --#if !defined(LZO_UNUSED_LABEL) --# if (LZO_CC_WATCOMC) && defined(__cplusplus) --# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l --# elif (LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC) --# define LZO_UNUSED_LABEL(l) if (0) goto l --# else --# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l --# endif --#endif --#if !defined(LZO_DEFINE_UNINITIALIZED_VAR) --# if 0 --# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var --# elif 0 && (LZO_CC_GNUC) --# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var --# else --# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init --# endif --#endif --#if !defined(LZO_UNCONST_CAST) --# if 0 && defined(__cplusplus) --# define LZO_UNCONST_CAST(t,e) (const_cast (e)) --# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((lzo_uintptr_t) ((const void *) (e)))))) --# else --# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((const void *) (e))))) --# endif --#endif --#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) --# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) --# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; --# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) --# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; --# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) --# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; --# else --# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; --# endif --#endif --#if !defined(LZO_COMPILE_TIME_ASSERT) --# if (LZO_CC_AZTECC) --# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} --# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) --# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; --# elif (LZO_CC_MSC && (_MSC_VER < 900)) --# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; --# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) --# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; --# else --# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} --# endif --#endif --#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) --# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) --# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) --# define __lzo_cdecl __cdecl --# define __lzo_cdecl_atexit /*empty*/ --# define __lzo_cdecl_main __cdecl --# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) --# define __lzo_cdecl_qsort __pascal --# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) --# define __lzo_cdecl_qsort _stdcall --# else --# define __lzo_cdecl_qsort __cdecl --# endif --# elif (LZO_CC_WATCOMC) --# define __lzo_cdecl __cdecl --# else --# define __lzo_cdecl __cdecl --# define __lzo_cdecl_atexit __cdecl --# define __lzo_cdecl_main __cdecl --# define __lzo_cdecl_qsort __cdecl --# endif --# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) --# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) --# define __lzo_cdecl_sighandler __pascal --# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) --# define __lzo_cdecl_sighandler _stdcall --# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) --# define __lzo_cdecl_sighandler __clrcall --# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) --# if defined(_DLL) --# define __lzo_cdecl_sighandler _far _cdecl _loadds --# elif defined(_MT) --# define __lzo_cdecl_sighandler _far _cdecl --# else --# define __lzo_cdecl_sighandler _cdecl --# endif --# else --# define __lzo_cdecl_sighandler __cdecl --# endif --#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) --# define __lzo_cdecl __cdecl --#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) --# define __lzo_cdecl cdecl --#endif --#if !defined(__lzo_cdecl) --# define __lzo_cdecl /*empty*/ --#endif --#if !defined(__lzo_cdecl_atexit) --# define __lzo_cdecl_atexit /*empty*/ --#endif --#if !defined(__lzo_cdecl_main) --# define __lzo_cdecl_main /*empty*/ --#endif --#if !defined(__lzo_cdecl_qsort) --# define __lzo_cdecl_qsort /*empty*/ --#endif --#if !defined(__lzo_cdecl_sighandler) --# define __lzo_cdecl_sighandler /*empty*/ --#endif --#if !defined(__lzo_cdecl_va) --# define __lzo_cdecl_va __lzo_cdecl --#endif --#if !(LZO_CFG_NO_WINDOWS_H) --#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) --# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) --# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) --# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) --# else --# define LZO_HAVE_WINDOWS_H 1 --# endif --#endif --#endif --#if (LZO_ARCH_ALPHA) --# define LZO_OPT_AVOID_UINT_INDEX 1 --# define LZO_OPT_AVOID_SHORT 1 --# define LZO_OPT_AVOID_USHORT 1 --#elif (LZO_ARCH_AMD64) --# define LZO_OPT_AVOID_INT_INDEX 1 --# define LZO_OPT_AVOID_UINT_INDEX 1 --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --# define LZO_OPT_UNALIGNED64 1 --#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) --#elif (LZO_ARCH_ARM) --# define LZO_OPT_AVOID_SHORT 1 --# define LZO_OPT_AVOID_USHORT 1 --#elif (LZO_ARCH_CRIS) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --#elif (LZO_ARCH_I386) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --#elif (LZO_ARCH_IA64) --# define LZO_OPT_AVOID_INT_INDEX 1 --# define LZO_OPT_AVOID_UINT_INDEX 1 --# define LZO_OPT_PREFER_POSTINC 1 --#elif (LZO_ARCH_M68K) --# define LZO_OPT_PREFER_POSTINC 1 --# define LZO_OPT_PREFER_PREDEC 1 --# if defined(__mc68020__) && !defined(__mcoldfire__) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --# endif --#elif (LZO_ARCH_MIPS) --# define LZO_OPT_AVOID_UINT_INDEX 1 --#elif (LZO_ARCH_POWERPC) --# define LZO_OPT_PREFER_PREINC 1 --# define LZO_OPT_PREFER_PREDEC 1 --# if (LZO_ABI_BIG_ENDIAN) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --# endif --#elif (LZO_ARCH_S390) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --# if (LZO_SIZEOF_SIZE_T == 8) --# define LZO_OPT_UNALIGNED64 1 --# endif --#elif (LZO_ARCH_SH) --# define LZO_OPT_PREFER_POSTINC 1 --# define LZO_OPT_PREFER_PREDEC 1 --#endif --#ifndef LZO_CFG_NO_INLINE_ASM --#if (LZO_CC_LLVM) --# define LZO_CFG_NO_INLINE_ASM 1 --#endif --#endif --#ifndef LZO_CFG_NO_UNALIGNED --#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) --# define LZO_CFG_NO_UNALIGNED 1 --#endif --#endif --#if (LZO_CFG_NO_UNALIGNED) --# undef LZO_OPT_UNALIGNED16 --# undef LZO_OPT_UNALIGNED32 --# undef LZO_OPT_UNALIGNED64 --#endif --#if (LZO_CFG_NO_INLINE_ASM) --#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) --# define LZO_ASM_SYNTAX_MSC 1 --#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) --#elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul)) --#elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) --# define LZO_ASM_SYNTAX_GNUC 1 --#elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) --# define LZO_ASM_SYNTAX_GNUC 1 --#endif --#if (LZO_ASM_SYNTAX_GNUC) --#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) --# define __LZO_ASM_CLOBBER "ax" --#elif (LZO_CC_INTELC) --# define __LZO_ASM_CLOBBER "memory" --#else --# define __LZO_ASM_CLOBBER "cc", "memory" --#endif --#endif --#if defined(__LZO_INFOSTR_MM) --#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) --# define __LZO_INFOSTR_MM "" --#elif defined(LZO_INFO_MM) --# define __LZO_INFOSTR_MM "." LZO_INFO_MM --#else --# define __LZO_INFOSTR_MM "" --#endif --#if defined(__LZO_INFOSTR_PM) --#elif defined(LZO_INFO_ABI_PM) --# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM --#else --# define __LZO_INFOSTR_PM "" --#endif --#if defined(__LZO_INFOSTR_ENDIAN) --#elif defined(LZO_INFO_ABI_ENDIAN) --# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN --#else --# define __LZO_INFOSTR_ENDIAN "" --#endif --#if defined(__LZO_INFOSTR_OSNAME) --#elif defined(LZO_INFO_OS_CONSOLE) --# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE --#elif defined(LZO_INFO_OS_POSIX) --# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX --#else --# define __LZO_INFOSTR_OSNAME LZO_INFO_OS --#endif --#if defined(__LZO_INFOSTR_LIBC) --#elif defined(LZO_INFO_LIBC) --# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC --#else --# define __LZO_INFOSTR_LIBC "" --#endif --#if defined(__LZO_INFOSTR_CCVER) --#elif defined(LZO_INFO_CCVER) --# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER --#else --# define __LZO_INFOSTR_CCVER "" --#endif --#define LZO_INFO_STRING \ -- LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ -- " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER -- --#endif /* already included */ -- --/* vim:set ts=4 et: */ -diff --git a/remmina-plugins/vnc/libvncserver/common/minilzo.c b/remmina-plugins/vnc/libvncserver/common/minilzo.c -deleted file mode 100644 -index 6ae8d73..0000000 ---- a/remmina-plugins/vnc/libvncserver/common/minilzo.c -+++ /dev/null -@@ -1,4192 +0,0 @@ --/* minilzo.c -- mini subset of the LZO real-time data compression library -- -- This file is part of the LZO real-time data compression library. -- -- Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer -- All Rights Reserved. -- -- The LZO library is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 2 of -- the License, or (at your option) any later version. -- -- The LZO library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with the LZO library; see the file COPYING. -- If not, write to the Free Software Foundation, Inc., -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- -- Markus F.X.J. Oberhumer -- -- http://www.oberhumer.com/opensource/lzo/ -- */ -- --/* -- * NOTE: -- * the full LZO package can be found at -- * http://www.oberhumer.com/opensource/lzo/ -- */ -- --#define __LZO_IN_MINILZO 1 -- --#if defined(LZO_CFG_FREESTANDING) --# undef MINILZO_HAVE_CONFIG_H --# define LZO_LIBC_FREESTANDING 1 --# define LZO_OS_FREESTANDING 1 --#endif -- --#ifdef MINILZO_HAVE_CONFIG_H --# include --#endif --#include --#include --#if defined(MINILZO_CFG_USE_INTERNAL_LZODEFS) -- --#ifndef __LZODEFS_H_INCLUDED --#define __LZODEFS_H_INCLUDED 1 -- --#if defined(__CYGWIN32__) && !defined(__CYGWIN__) --# define __CYGWIN__ __CYGWIN32__ --#endif --#if defined(__IBMCPP__) && !defined(__IBMC__) --# define __IBMC__ __IBMCPP__ --#endif --#if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) --# define __INTEL_COMPILER __ICL --#endif --#if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) --# define _ALL_SOURCE 1 --#endif --#if defined(__mips__) && defined(__R5900__) --# if !defined(__LONG_MAX__) --# define __LONG_MAX__ 9223372036854775807L --# endif --#endif --#if defined(__INTEL_COMPILER) && defined(__linux__) --# pragma warning(disable: 193) --#endif --#if defined(__KEIL__) && defined(__C166__) --# pragma warning disable = 322 --#elif 0 && defined(__C251__) --# pragma warning disable = 322 --#endif --#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) --# if (_MSC_VER >= 1300) --# pragma warning(disable: 4668) --# endif --#endif --#if 0 && defined(__WATCOMC__) --# if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) --# pragma warning 203 9 --# endif --#endif --#if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) --# pragma option -h --#endif --#if 0 --#define LZO_0xffffL 0xfffful --#define LZO_0xffffffffL 0xfffffffful --#else --#define LZO_0xffffL 65535ul --#define LZO_0xffffffffL 4294967295ul --#endif --#if (LZO_0xffffL == LZO_0xffffffffL) --# error "your preprocessor is broken 1" --#endif --#if (16ul * 16384ul != 262144ul) --# error "your preprocessor is broken 2" --#endif --#if 0 --#if (32767 >= 4294967295ul) --# error "your preprocessor is broken 3" --#endif --#if (65535u >= 4294967295ul) --# error "your preprocessor is broken 4" --#endif --#endif --#if (UINT_MAX == LZO_0xffffL) --#if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) --# if !defined(MSDOS) --# define MSDOS 1 --# endif --# if !defined(_MSDOS) --# define _MSDOS 1 --# endif --#elif 0 && defined(__VERSION) && defined(MB_LEN_MAX) --# if (__VERSION == 520) && (MB_LEN_MAX == 1) --# if !defined(__AZTEC_C__) --# define __AZTEC_C__ __VERSION --# endif --# if !defined(__DOS__) --# define __DOS__ 1 --# endif --# endif --#endif --#endif --#if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == LZO_0xffffL) --# define ptrdiff_t long --# define _PTRDIFF_T_DEFINED 1 --#endif --#if (UINT_MAX == LZO_0xffffL) --# undef __LZO_RENAME_A --# undef __LZO_RENAME_B --# if defined(__AZTEC_C__) && defined(__DOS__) --# define __LZO_RENAME_A 1 --# elif defined(_MSC_VER) && defined(MSDOS) --# if (_MSC_VER < 600) --# define __LZO_RENAME_A 1 --# elif (_MSC_VER < 700) --# define __LZO_RENAME_B 1 --# endif --# elif defined(__TSC__) && defined(__OS2__) --# define __LZO_RENAME_A 1 --# elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410) --# define __LZO_RENAME_A 1 --# elif defined(__PACIFIC__) && defined(DOS) --# if !defined(__far) --# define __far far --# endif --# if !defined(__near) --# define __near near --# endif --# endif --# if defined(__LZO_RENAME_A) --# if !defined(__cdecl) --# define __cdecl cdecl --# endif --# if !defined(__far) --# define __far far --# endif --# if !defined(__huge) --# define __huge huge --# endif --# if !defined(__near) --# define __near near --# endif --# if !defined(__pascal) --# define __pascal pascal --# endif --# if !defined(__huge) --# define __huge huge --# endif --# elif defined(__LZO_RENAME_B) --# if !defined(__cdecl) --# define __cdecl _cdecl --# endif --# if !defined(__far) --# define __far _far --# endif --# if !defined(__huge) --# define __huge _huge --# endif --# if !defined(__near) --# define __near _near --# endif --# if !defined(__pascal) --# define __pascal _pascal --# endif --# elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) --# if !defined(__cdecl) --# define __cdecl cdecl --# endif --# if !defined(__pascal) --# define __pascal pascal --# endif --# endif --# undef __LZO_RENAME_A --# undef __LZO_RENAME_B --#endif --#if (UINT_MAX == LZO_0xffffL) --#if defined(__AZTEC_C__) && defined(__DOS__) --# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 --#elif defined(_MSC_VER) && defined(MSDOS) --# if (_MSC_VER < 600) --# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 --# endif --# if (_MSC_VER < 700) --# define LZO_BROKEN_INTEGRAL_PROMOTION 1 --# define LZO_BROKEN_SIZEOF 1 --# endif --#elif defined(__PACIFIC__) && defined(DOS) --# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 --#elif defined(__TURBOC__) && defined(__MSDOS__) --# if (__TURBOC__ < 0x0150) --# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 --# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 --# define LZO_BROKEN_INTEGRAL_PROMOTION 1 --# endif --# if (__TURBOC__ < 0x0200) --# define LZO_BROKEN_SIZEOF 1 --# endif --# if (__TURBOC__ < 0x0400) && defined(__cplusplus) --# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 --# endif --#elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) --# define LZO_BROKEN_CDECL_ALT_SYNTAX 1 --# define LZO_BROKEN_SIZEOF 1 --#endif --#endif --#if defined(__WATCOMC__) && (__WATCOMC__ < 900) --# define LZO_BROKEN_INTEGRAL_CONSTANTS 1 --#endif --#if defined(_CRAY) && defined(_CRAY1) --# define LZO_BROKEN_SIGNED_RIGHT_SHIFT 1 --#endif --#define LZO_PP_STRINGIZE(x) #x --#define LZO_PP_MACRO_EXPAND(x) LZO_PP_STRINGIZE(x) --#define LZO_PP_CONCAT2(a,b) a ## b --#define LZO_PP_CONCAT3(a,b,c) a ## b ## c --#define LZO_PP_CONCAT4(a,b,c,d) a ## b ## c ## d --#define LZO_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e --#define LZO_PP_ECONCAT2(a,b) LZO_PP_CONCAT2(a,b) --#define LZO_PP_ECONCAT3(a,b,c) LZO_PP_CONCAT3(a,b,c) --#define LZO_PP_ECONCAT4(a,b,c,d) LZO_PP_CONCAT4(a,b,c,d) --#define LZO_PP_ECONCAT5(a,b,c,d,e) LZO_PP_CONCAT5(a,b,c,d,e) --#if 1 --#define LZO_CPP_STRINGIZE(x) #x --#define LZO_CPP_MACRO_EXPAND(x) LZO_CPP_STRINGIZE(x) --#define LZO_CPP_CONCAT2(a,b) a ## b --#define LZO_CPP_CONCAT3(a,b,c) a ## b ## c --#define LZO_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d --#define LZO_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e --#define LZO_CPP_ECONCAT2(a,b) LZO_CPP_CONCAT2(a,b) --#define LZO_CPP_ECONCAT3(a,b,c) LZO_CPP_CONCAT3(a,b,c) --#define LZO_CPP_ECONCAT4(a,b,c,d) LZO_CPP_CONCAT4(a,b,c,d) --#define LZO_CPP_ECONCAT5(a,b,c,d,e) LZO_CPP_CONCAT5(a,b,c,d,e) --#endif --#define __LZO_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o)) --#if 1 && defined(__cplusplus) --# if !defined(__STDC_CONSTANT_MACROS) --# define __STDC_CONSTANT_MACROS 1 --# endif --# if !defined(__STDC_LIMIT_MACROS) --# define __STDC_LIMIT_MACROS 1 --# endif --#endif --#if defined(__cplusplus) --# define LZO_EXTERN_C extern "C" --#else --# define LZO_EXTERN_C extern --#endif --#if !defined(__LZO_OS_OVERRIDE) --#if (LZO_OS_FREESTANDING) --# define LZO_INFO_OS "freestanding" --#elif (LZO_OS_EMBEDDED) --# define LZO_INFO_OS "embedded" --#elif 1 && defined(__IAR_SYSTEMS_ICC__) --# define LZO_OS_EMBEDDED 1 --# define LZO_INFO_OS "embedded" --#elif defined(__CYGWIN__) && defined(__GNUC__) --# define LZO_OS_CYGWIN 1 --# define LZO_INFO_OS "cygwin" --#elif defined(__EMX__) && defined(__GNUC__) --# define LZO_OS_EMX 1 --# define LZO_INFO_OS "emx" --#elif defined(__BEOS__) --# define LZO_OS_BEOS 1 --# define LZO_INFO_OS "beos" --#elif defined(__Lynx__) --# define LZO_OS_LYNXOS 1 --# define LZO_INFO_OS "lynxos" --#elif defined(__OS400__) --# define LZO_OS_OS400 1 --# define LZO_INFO_OS "os400" --#elif defined(__QNX__) --# define LZO_OS_QNX 1 --# define LZO_INFO_OS "qnx" --#elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460) --# define LZO_OS_DOS32 1 --# define LZO_INFO_OS "dos32" --#elif defined(__BORLANDC__) && defined(__DPMI16__) --# define LZO_OS_DOS16 1 --# define LZO_INFO_OS "dos16" --#elif defined(__ZTC__) && defined(DOS386) --# define LZO_OS_DOS32 1 --# define LZO_INFO_OS "dos32" --#elif defined(__OS2__) || defined(__OS2V2__) --# if (UINT_MAX == LZO_0xffffL) --# define LZO_OS_OS216 1 --# define LZO_INFO_OS "os216" --# elif (UINT_MAX == LZO_0xffffffffL) --# define LZO_OS_OS2 1 --# define LZO_INFO_OS "os2" --# else --# error "check your limits.h header" --# endif --#elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64) --# define LZO_OS_WIN64 1 --# define LZO_INFO_OS "win64" --#elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__) --# define LZO_OS_WIN32 1 --# define LZO_INFO_OS "win32" --#elif defined(__MWERKS__) && defined(__INTEL__) --# define LZO_OS_WIN32 1 --# define LZO_INFO_OS "win32" --#elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows) --# if (UINT_MAX == LZO_0xffffL) --# define LZO_OS_WIN16 1 --# define LZO_INFO_OS "win16" --# elif (UINT_MAX == LZO_0xffffffffL) --# define LZO_OS_WIN32 1 --# define LZO_INFO_OS "win32" --# else --# error "check your limits.h header" --# endif --#elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS)) --# if (UINT_MAX == LZO_0xffffL) --# define LZO_OS_DOS16 1 --# define LZO_INFO_OS "dos16" --# elif (UINT_MAX == LZO_0xffffffffL) --# define LZO_OS_DOS32 1 --# define LZO_INFO_OS "dos32" --# else --# error "check your limits.h header" --# endif --#elif defined(__WATCOMC__) --# if defined(__NT__) && (UINT_MAX == LZO_0xffffL) --# define LZO_OS_DOS16 1 --# define LZO_INFO_OS "dos16" --# elif defined(__NT__) && (__WATCOMC__ < 1100) --# define LZO_OS_WIN32 1 --# define LZO_INFO_OS "win32" --# elif defined(__linux__) || defined(__LINUX__) --# define LZO_OS_POSIX 1 --# define LZO_INFO_OS "posix" --# else --# error "please specify a target using the -bt compiler option" --# endif --#elif defined(__palmos__) --# define LZO_OS_PALMOS 1 --# define LZO_INFO_OS "palmos" --#elif defined(__TOS__) || defined(__atarist__) --# define LZO_OS_TOS 1 --# define LZO_INFO_OS "tos" --#elif defined(macintosh) && !defined(__ppc__) --# define LZO_OS_MACCLASSIC 1 --# define LZO_INFO_OS "macclassic" --#elif defined(__VMS) --# define LZO_OS_VMS 1 --# define LZO_INFO_OS "vms" --#elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) --# define LZO_OS_CONSOLE 1 --# define LZO_OS_CONSOLE_PS2 1 --# define LZO_INFO_OS "console" --# define LZO_INFO_OS_CONSOLE "ps2" --#elif (defined(__mips__) && defined(__psp__)) --# define LZO_OS_CONSOLE 1 --# define LZO_OS_CONSOLE_PSP 1 --# define LZO_INFO_OS "console" --# define LZO_INFO_OS_CONSOLE "psp" --#else --# define LZO_OS_POSIX 1 --# define LZO_INFO_OS "posix" --#endif --#if (LZO_OS_POSIX) --# if defined(_AIX) || defined(__AIX__) || defined(__aix__) --# define LZO_OS_POSIX_AIX 1 --# define LZO_INFO_OS_POSIX "aix" --# elif defined(__FreeBSD__) --# define LZO_OS_POSIX_FREEBSD 1 --# define LZO_INFO_OS_POSIX "freebsd" --# elif defined(__hpux__) || defined(__hpux) --# define LZO_OS_POSIX_HPUX 1 --# define LZO_INFO_OS_POSIX "hpux" --# elif defined(__INTERIX) --# define LZO_OS_POSIX_INTERIX 1 --# define LZO_INFO_OS_POSIX "interix" --# elif defined(__IRIX__) || defined(__irix__) --# define LZO_OS_POSIX_IRIX 1 --# define LZO_INFO_OS_POSIX "irix" --# elif defined(__linux__) || defined(__linux) || defined(__LINUX__) --# define LZO_OS_POSIX_LINUX 1 --# define LZO_INFO_OS_POSIX "linux" --# elif defined(__APPLE__) || defined(__MACOS__) --# define LZO_OS_POSIX_MACOSX 1 --# define LZO_INFO_OS_POSIX "macosx" --# elif defined(__minix__) || defined(__minix) --# define LZO_OS_POSIX_MINIX 1 --# define LZO_INFO_OS_POSIX "minix" --# elif defined(__NetBSD__) --# define LZO_OS_POSIX_NETBSD 1 --# define LZO_INFO_OS_POSIX "netbsd" --# elif defined(__OpenBSD__) --# define LZO_OS_POSIX_OPENBSD 1 --# define LZO_INFO_OS_POSIX "openbsd" --# elif defined(__osf__) --# define LZO_OS_POSIX_OSF 1 --# define LZO_INFO_OS_POSIX "osf" --# elif defined(__solaris__) || defined(__sun) --# if defined(__SVR4) || defined(__svr4__) --# define LZO_OS_POSIX_SOLARIS 1 --# define LZO_INFO_OS_POSIX "solaris" --# else --# define LZO_OS_POSIX_SUNOS 1 --# define LZO_INFO_OS_POSIX "sunos" --# endif --# elif defined(__ultrix__) || defined(__ultrix) --# define LZO_OS_POSIX_ULTRIX 1 --# define LZO_INFO_OS_POSIX "ultrix" --# elif defined(_UNICOS) --# define LZO_OS_POSIX_UNICOS 1 --# define LZO_INFO_OS_POSIX "unicos" --# else --# define LZO_OS_POSIX_UNKNOWN 1 --# define LZO_INFO_OS_POSIX "unknown" --# endif --#endif --#endif --#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) --# if (UINT_MAX != LZO_0xffffL) --# error "this should not happen" --# endif --# if (ULONG_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --#endif --#if (LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_WIN32 || LZO_OS_WIN64) --# if (UINT_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --# if (ULONG_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --#endif --#if defined(CIL) && defined(_GNUCC) && defined(__GNUC__) --# define LZO_CC_CILLY 1 --# define LZO_INFO_CC "Cilly" --# if defined(__CILLY__) --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CILLY__) --# else --# define LZO_INFO_CCVER "unknown" --# endif --#elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__) --# define LZO_CC_SDCC 1 --# define LZO_INFO_CC "sdcc" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(SDCC) --#elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__) --# define LZO_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__) --# define LZO_INFO_CC "Pathscale C" --# define LZO_INFO_CCVER __PATHSCALE__ --#elif defined(__INTEL_COMPILER) --# define LZO_CC_INTELC 1 --# define LZO_INFO_CC "Intel C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__INTEL_COMPILER) --# if defined(_WIN32) || defined(_WIN64) --# define LZO_CC_SYNTAX_MSC 1 --# else --# define LZO_CC_SYNTAX_GNUC 1 --# endif --#elif defined(__POCC__) && defined(_WIN32) --# define LZO_CC_PELLESC 1 --# define LZO_INFO_CC "Pelles C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__POCC__) --#elif defined(__clang__) && defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) --# if defined(__GNUC_PATCHLEVEL__) --# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) --# else --# define LZO_CC_CLANG_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) --# endif --# if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__) --# define LZO_CC_CLANG_CLANG (__clang_major__ * 0x10000L + __clang_minor__ * 0x100 + __clang_patchlevel__) --# else --# define LZO_CC_CLANG_CLANG 0x020700L --# endif --# define LZO_CC_CLANG LZO_CC_CLANG_GNUC --# define LZO_INFO_CC "clang" --# define LZO_INFO_CCVER __VERSION__ --#elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__) --# if defined(__GNUC_PATCHLEVEL__) --# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) --# else --# define LZO_CC_LLVM_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) --# endif --# define LZO_CC_LLVM LZO_CC_LLVM_GNUC --# define LZO_INFO_CC "llvm-gcc" --# define LZO_INFO_CCVER __VERSION__ --#elif defined(__GNUC__) && defined(__VERSION__) --# if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__) --# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__) --# elif defined(__GNUC_MINOR__) --# define LZO_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) --# else --# define LZO_CC_GNUC (__GNUC__ * 0x10000L) --# endif --# define LZO_INFO_CC "gcc" --# define LZO_INFO_CCVER __VERSION__ --#elif defined(__ACK__) && defined(_ACK) --# define LZO_CC_ACK 1 --# define LZO_INFO_CC "Amsterdam Compiler Kit C" --# define LZO_INFO_CCVER "unknown" --#elif defined(__AZTEC_C__) --# define LZO_CC_AZTECC 1 --# define LZO_INFO_CC "Aztec C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__AZTEC_C__) --#elif defined(__CODEGEARC__) --# define LZO_CC_CODEGEARC 1 --# define LZO_INFO_CC "CodeGear C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__CODEGEARC__) --#elif defined(__BORLANDC__) --# define LZO_CC_BORLANDC 1 --# define LZO_INFO_CC "Borland C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__BORLANDC__) --#elif defined(_CRAYC) && defined(_RELEASE) --# define LZO_CC_CRAYC 1 --# define LZO_INFO_CC "Cray C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_RELEASE) --#elif defined(__DMC__) && defined(__SC__) --# define LZO_CC_DMC 1 --# define LZO_INFO_CC "Digital Mars C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DMC__) --#elif defined(__DECC) --# define LZO_CC_DECC 1 --# define LZO_INFO_CC "DEC C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__DECC) --#elif defined(__HIGHC__) --# define LZO_CC_HIGHC 1 --# define LZO_INFO_CC "MetaWare High C" --# define LZO_INFO_CCVER "unknown" --#elif defined(__IAR_SYSTEMS_ICC__) --# define LZO_CC_IARC 1 --# define LZO_INFO_CC "IAR C" --# if defined(__VER__) --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__VER__) --# else --# define LZO_INFO_CCVER "unknown" --# endif --#elif defined(__IBMC__) --# define LZO_CC_IBMC 1 --# define LZO_INFO_CC "IBM C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__IBMC__) --#elif defined(__KEIL__) && defined(__C166__) --# define LZO_CC_KEILC 1 --# define LZO_INFO_CC "Keil C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__C166__) --#elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL) --# define LZO_CC_LCCWIN32 1 --# define LZO_INFO_CC "lcc-win32" --# define LZO_INFO_CCVER "unknown" --#elif defined(__LCC__) --# define LZO_CC_LCC 1 --# define LZO_INFO_CC "lcc" --# if defined(__LCC_VERSION__) --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__LCC_VERSION__) --# else --# define LZO_INFO_CCVER "unknown" --# endif --#elif defined(_MSC_VER) --# define LZO_CC_MSC 1 --# define LZO_INFO_CC "Microsoft C" --# if defined(_MSC_FULL_VER) --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) "." LZO_PP_MACRO_EXPAND(_MSC_FULL_VER) --# else --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(_MSC_VER) --# endif --#elif defined(__MWERKS__) --# define LZO_CC_MWERKS 1 --# define LZO_INFO_CC "Metrowerks C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__MWERKS__) --#elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386) --# define LZO_CC_NDPC 1 --# define LZO_INFO_CC "Microway NDP C" --# define LZO_INFO_CCVER "unknown" --#elif defined(__PACIFIC__) --# define LZO_CC_PACIFICC 1 --# define LZO_INFO_CC "Pacific C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PACIFIC__) --#elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__)) --# define LZO_CC_PGI 1 --# define LZO_INFO_CC "Portland Group PGI C" --# define LZO_INFO_CCVER "unknown" --#elif defined(__PUREC__) && defined(__TOS__) --# define LZO_CC_PUREC 1 --# define LZO_INFO_CC "Pure C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__PUREC__) --#elif defined(__SC__) && defined(__ZTC__) --# define LZO_CC_SYMANTECC 1 --# define LZO_INFO_CC "Symantec C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SC__) --#elif defined(__SUNPRO_C) --# define LZO_INFO_CC "SunPro C" --# if ((__SUNPRO_C)+0 > 0) --# define LZO_CC_SUNPROC __SUNPRO_C --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_C) --# else --# define LZO_CC_SUNPROC 1 --# define LZO_INFO_CCVER "unknown" --# endif --#elif defined(__SUNPRO_CC) --# define LZO_INFO_CC "SunPro C" --# if ((__SUNPRO_CC)+0 > 0) --# define LZO_CC_SUNPROC __SUNPRO_CC --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__SUNPRO_CC) --# else --# define LZO_CC_SUNPROC 1 --# define LZO_INFO_CCVER "unknown" --# endif --#elif defined(__TINYC__) --# define LZO_CC_TINYC 1 --# define LZO_INFO_CC "Tiny C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TINYC__) --#elif defined(__TSC__) --# define LZO_CC_TOPSPEEDC 1 --# define LZO_INFO_CC "TopSpeed C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TSC__) --#elif defined(__WATCOMC__) --# define LZO_CC_WATCOMC 1 --# define LZO_INFO_CC "Watcom C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__WATCOMC__) --#elif defined(__TURBOC__) --# define LZO_CC_TURBOC 1 --# define LZO_INFO_CC "Turbo C" --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__TURBOC__) --#elif defined(__ZTC__) --# define LZO_CC_ZORTECHC 1 --# define LZO_INFO_CC "Zortech C" --# if (__ZTC__ == 0x310) --# define LZO_INFO_CCVER "0x310" --# else --# define LZO_INFO_CCVER LZO_PP_MACRO_EXPAND(__ZTC__) --# endif --#else --# define LZO_CC_UNKNOWN 1 --# define LZO_INFO_CC "unknown" --# define LZO_INFO_CCVER "unknown" --#endif --#if 0 && (LZO_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) --# error "LZO_CC_MSC: _MSC_FULL_VER is not defined" --#endif --#if !defined(__LZO_ARCH_OVERRIDE) && !(LZO_ARCH_GENERIC) && defined(_CRAY) --# if (UINT_MAX > LZO_0xffffffffL) && defined(_CRAY) --# if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E) --# define LZO_ARCH_CRAY_MPP 1 --# elif defined(_CRAY1) --# define LZO_ARCH_CRAY_PVP 1 --# endif --# endif --#endif --#if !defined(__LZO_ARCH_OVERRIDE) --#if (LZO_ARCH_GENERIC) --# define LZO_INFO_ARCH "generic" --#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) --# define LZO_ARCH_I086 1 --# define LZO_ARCH_IA16 1 --# define LZO_INFO_ARCH "i086" --#elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) --# define LZO_ARCH_ALPHA 1 --# define LZO_INFO_ARCH "alpha" --#elif (LZO_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E)) --# define LZO_ARCH_ALPHA 1 --# define LZO_INFO_ARCH "alpha" --#elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) --# define LZO_ARCH_AMD64 1 --# define LZO_INFO_ARCH "amd64" --#elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB)) --# define LZO_ARCH_ARM 1 --# define LZO_ARCH_ARM_THUMB 1 --# define LZO_INFO_ARCH "arm_thumb" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__) --# define LZO_ARCH_ARM 1 --# if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1) --# define LZO_ARCH_ARM_THUMB 1 --# define LZO_INFO_ARCH "arm_thumb" --# elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2) --# define LZO_INFO_ARCH "arm" --# else --# define LZO_INFO_ARCH "arm" --# endif --#elif defined(__arm__) || defined(_M_ARM) --# define LZO_ARCH_ARM 1 --# define LZO_INFO_ARCH "arm" --#elif (UINT_MAX <= LZO_0xffffL) && defined(__AVR__) --# define LZO_ARCH_AVR 1 --# define LZO_INFO_ARCH "avr" --#elif defined(__avr32__) || defined(__AVR32__) --# define LZO_ARCH_AVR32 1 --# define LZO_INFO_ARCH "avr32" --#elif defined(__bfin__) --# define LZO_ARCH_BLACKFIN 1 --# define LZO_INFO_ARCH "blackfin" --#elif (UINT_MAX == LZO_0xffffL) && defined(__C166__) --# define LZO_ARCH_C166 1 --# define LZO_INFO_ARCH "c166" --#elif defined(__cris__) --# define LZO_ARCH_CRIS 1 --# define LZO_INFO_ARCH "cris" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__) --# define LZO_ARCH_EZ80 1 --# define LZO_INFO_ARCH "ez80" --#elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) --# define LZO_ARCH_H8300 1 --# define LZO_INFO_ARCH "h8300" --#elif defined(__hppa__) || defined(__hppa) --# define LZO_ARCH_HPPA 1 --# define LZO_INFO_ARCH "hppa" --#elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386) --# define LZO_ARCH_I386 1 --# define LZO_ARCH_IA32 1 --# define LZO_INFO_ARCH "i386" --#elif (LZO_CC_ZORTECHC && defined(__I86__)) --# define LZO_ARCH_I386 1 --# define LZO_ARCH_IA32 1 --# define LZO_INFO_ARCH "i386" --#elif (LZO_OS_DOS32 && LZO_CC_HIGHC) && defined(_I386) --# define LZO_ARCH_I386 1 --# define LZO_ARCH_IA32 1 --# define LZO_INFO_ARCH "i386" --#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64) --# define LZO_ARCH_IA64 1 --# define LZO_INFO_ARCH "ia64" --#elif (UINT_MAX == LZO_0xffffL) && defined(__m32c__) --# define LZO_ARCH_M16C 1 --# define LZO_INFO_ARCH "m16c" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__) --# define LZO_ARCH_M16C 1 --# define LZO_INFO_ARCH "m16c" --#elif defined(__m32r__) --# define LZO_ARCH_M32R 1 --# define LZO_INFO_ARCH "m32r" --#elif (LZO_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K) --# define LZO_ARCH_M68K 1 --# define LZO_INFO_ARCH "m68k" --#elif (UINT_MAX == LZO_0xffffL) && defined(__C251__) --# define LZO_ARCH_MCS251 1 --# define LZO_INFO_ARCH "mcs251" --#elif (UINT_MAX == LZO_0xffffL) && defined(__C51__) --# define LZO_ARCH_MCS51 1 --# define LZO_INFO_ARCH "mcs51" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__) --# define LZO_ARCH_MCS51 1 --# define LZO_INFO_ARCH "mcs51" --#elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000) --# define LZO_ARCH_MIPS 1 --# define LZO_INFO_ARCH "mips" --#elif (UINT_MAX == LZO_0xffffL) && defined(__MSP430__) --# define LZO_ARCH_MSP430 1 --# define LZO_INFO_ARCH "msp430" --#elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__) --# define LZO_ARCH_MSP430 1 --# define LZO_INFO_ARCH "msp430" --#elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR) --# define LZO_ARCH_POWERPC 1 --# define LZO_INFO_ARCH "powerpc" --#elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x) --# define LZO_ARCH_S390 1 --# define LZO_INFO_ARCH "s390" --#elif defined(__sh__) || defined(_M_SH) --# define LZO_ARCH_SH 1 --# define LZO_INFO_ARCH "sh" --#elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8) --# define LZO_ARCH_SPARC 1 --# define LZO_INFO_ARCH "sparc" --#elif defined(__SPU__) --# define LZO_ARCH_SPU 1 --# define LZO_INFO_ARCH "spu" --#elif (UINT_MAX == LZO_0xffffL) && defined(__z80) --# define LZO_ARCH_Z80 1 --# define LZO_INFO_ARCH "z80" --#elif (LZO_ARCH_CRAY_PVP) --# if defined(_CRAYSV1) --# define LZO_ARCH_CRAY_SV1 1 --# define LZO_INFO_ARCH "cray_sv1" --# elif (_ADDR64) --# define LZO_ARCH_CRAY_T90 1 --# define LZO_INFO_ARCH "cray_t90" --# elif (_ADDR32) --# define LZO_ARCH_CRAY_YMP 1 --# define LZO_INFO_ARCH "cray_ymp" --# else --# define LZO_ARCH_CRAY_XMP 1 --# define LZO_INFO_ARCH "cray_xmp" --# endif --#else --# define LZO_ARCH_UNKNOWN 1 --# define LZO_INFO_ARCH "unknown" --#endif --#endif --#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_DOS32 || LZO_OS_OS2) --# error "FIXME - missing define for CPU architecture" --#endif --#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN32) --# error "FIXME - missing WIN32 define for CPU architecture" --#endif --#if 1 && (LZO_ARCH_UNKNOWN) && (LZO_OS_WIN64) --# error "FIXME - missing WIN64 define for CPU architecture" --#endif --#if (LZO_OS_OS216 || LZO_OS_WIN16) --# define LZO_ARCH_I086PM 1 --# define LZO_ARCH_IA16PM 1 --#elif 1 && (LZO_OS_DOS16 && defined(BLX286)) --# define LZO_ARCH_I086PM 1 --# define LZO_ARCH_IA16PM 1 --#elif 1 && (LZO_OS_DOS16 && defined(DOSX286)) --# define LZO_ARCH_I086PM 1 --# define LZO_ARCH_IA16PM 1 --#elif 1 && (LZO_OS_DOS16 && LZO_CC_BORLANDC && defined(__DPMI16__)) --# define LZO_ARCH_I086PM 1 --# define LZO_ARCH_IA16PM 1 --#endif --#if (LZO_ARCH_ARM_THUMB) && !(LZO_ARCH_ARM) --# error "this should not happen" --#endif --#if (LZO_ARCH_I086PM) && !(LZO_ARCH_I086) --# error "this should not happen" --#endif --#if (LZO_ARCH_I086) --# if (UINT_MAX != LZO_0xffffL) --# error "this should not happen" --# endif --# if (ULONG_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --#endif --#if (LZO_ARCH_I386) --# if (UINT_MAX != LZO_0xffffL) && defined(__i386_int16__) --# error "this should not happen" --# endif --# if (UINT_MAX != LZO_0xffffffffL) && !defined(__i386_int16__) --# error "this should not happen" --# endif --# if (ULONG_MAX != LZO_0xffffffffL) --# error "this should not happen" --# endif --#endif --#if !defined(__LZO_MM_OVERRIDE) --#if (LZO_ARCH_I086) --#if (UINT_MAX != LZO_0xffffL) --# error "this should not happen" --#endif --#if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM) --# define LZO_MM_TINY 1 --#elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM) --# define LZO_MM_HUGE 1 --#elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL) --# define LZO_MM_SMALL 1 --#elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM) --# define LZO_MM_MEDIUM 1 --#elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM) --# define LZO_MM_COMPACT 1 --#elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL) --# define LZO_MM_LARGE 1 --#elif (LZO_CC_AZTECC) --# if defined(_LARGE_CODE) && defined(_LARGE_DATA) --# define LZO_MM_LARGE 1 --# elif defined(_LARGE_CODE) --# define LZO_MM_MEDIUM 1 --# elif defined(_LARGE_DATA) --# define LZO_MM_COMPACT 1 --# else --# define LZO_MM_SMALL 1 --# endif --#elif (LZO_CC_ZORTECHC && defined(__VCM__)) --# define LZO_MM_LARGE 1 --#else --# error "unknown memory model" --#endif --#if (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) --#define LZO_HAVE_MM_HUGE_PTR 1 --#define LZO_HAVE_MM_HUGE_ARRAY 1 --#if (LZO_MM_TINY) --# undef LZO_HAVE_MM_HUGE_ARRAY --#endif --#if (LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_ZORTECHC) --# undef LZO_HAVE_MM_HUGE_PTR --# undef LZO_HAVE_MM_HUGE_ARRAY --#elif (LZO_CC_DMC || LZO_CC_SYMANTECC) --# undef LZO_HAVE_MM_HUGE_ARRAY --#elif (LZO_CC_MSC && defined(_QC)) --# undef LZO_HAVE_MM_HUGE_ARRAY --# if (_MSC_VER < 600) --# undef LZO_HAVE_MM_HUGE_PTR --# endif --#elif (LZO_CC_TURBOC && (__TURBOC__ < 0x0295)) --# undef LZO_HAVE_MM_HUGE_ARRAY --#endif --#if (LZO_ARCH_I086PM) && !(LZO_HAVE_MM_HUGE_PTR) --# if (LZO_OS_DOS16) --# error "this should not happen" --# elif (LZO_CC_ZORTECHC) --# else --# error "this should not happen" --# endif --#endif --#ifdef __cplusplus --extern "C" { --#endif --#if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0200)) -- extern void __near __cdecl _AHSHIFT(void); --# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) --#elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) -- extern void __near __cdecl _AHSHIFT(void); --# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) --#elif (LZO_CC_MSC || LZO_CC_TOPSPEEDC) -- extern void __near __cdecl _AHSHIFT(void); --# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) --#elif (LZO_CC_TURBOC && (__TURBOC__ >= 0x0295)) -- extern void __near __cdecl _AHSHIFT(void); --# define LZO_MM_AHSHIFT ((unsigned) _AHSHIFT) --#elif ((LZO_CC_AZTECC || LZO_CC_PACIFICC || LZO_CC_TURBOC) && LZO_OS_DOS16) --# define LZO_MM_AHSHIFT 12 --#elif (LZO_CC_WATCOMC) -- extern unsigned char _HShift; --# define LZO_MM_AHSHIFT ((unsigned) _HShift) --#else --# error "FIXME - implement LZO_MM_AHSHIFT" --#endif --#ifdef __cplusplus --} --#endif --#endif --#elif (LZO_ARCH_C166) --#if !defined(__MODEL__) --# error "FIXME - C166 __MODEL__" --#elif ((__MODEL__) == 0) --# define LZO_MM_SMALL 1 --#elif ((__MODEL__) == 1) --# define LZO_MM_SMALL 1 --#elif ((__MODEL__) == 2) --# define LZO_MM_LARGE 1 --#elif ((__MODEL__) == 3) --# define LZO_MM_TINY 1 --#elif ((__MODEL__) == 4) --# define LZO_MM_XTINY 1 --#elif ((__MODEL__) == 5) --# define LZO_MM_XSMALL 1 --#else --# error "FIXME - C166 __MODEL__" --#endif --#elif (LZO_ARCH_MCS251) --#if !defined(__MODEL__) --# error "FIXME - MCS251 __MODEL__" --#elif ((__MODEL__) == 0) --# define LZO_MM_SMALL 1 --#elif ((__MODEL__) == 2) --# define LZO_MM_LARGE 1 --#elif ((__MODEL__) == 3) --# define LZO_MM_TINY 1 --#elif ((__MODEL__) == 4) --# define LZO_MM_XTINY 1 --#elif ((__MODEL__) == 5) --# define LZO_MM_XSMALL 1 --#else --# error "FIXME - MCS251 __MODEL__" --#endif --#elif (LZO_ARCH_MCS51) --#if !defined(__MODEL__) --# error "FIXME - MCS51 __MODEL__" --#elif ((__MODEL__) == 1) --# define LZO_MM_SMALL 1 --#elif ((__MODEL__) == 2) --# define LZO_MM_LARGE 1 --#elif ((__MODEL__) == 3) --# define LZO_MM_TINY 1 --#elif ((__MODEL__) == 4) --# define LZO_MM_XTINY 1 --#elif ((__MODEL__) == 5) --# define LZO_MM_XSMALL 1 --#else --# error "FIXME - MCS51 __MODEL__" --#endif --#elif (LZO_ARCH_CRAY_PVP) --# define LZO_MM_PVP 1 --#else --# define LZO_MM_FLAT 1 --#endif --#if (LZO_MM_COMPACT) --# define LZO_INFO_MM "compact" --#elif (LZO_MM_FLAT) --# define LZO_INFO_MM "flat" --#elif (LZO_MM_HUGE) --# define LZO_INFO_MM "huge" --#elif (LZO_MM_LARGE) --# define LZO_INFO_MM "large" --#elif (LZO_MM_MEDIUM) --# define LZO_INFO_MM "medium" --#elif (LZO_MM_PVP) --# define LZO_INFO_MM "pvp" --#elif (LZO_MM_SMALL) --# define LZO_INFO_MM "small" --#elif (LZO_MM_TINY) --# define LZO_INFO_MM "tiny" --#else --# error "unknown memory model" --#endif --#endif --#if defined(SIZEOF_SHORT) --# define LZO_SIZEOF_SHORT (SIZEOF_SHORT) --#endif --#if defined(SIZEOF_INT) --# define LZO_SIZEOF_INT (SIZEOF_INT) --#endif --#if defined(SIZEOF_LONG) --# define LZO_SIZEOF_LONG (SIZEOF_LONG) --#endif --#if defined(SIZEOF_LONG_LONG) --# define LZO_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) --#endif --#if defined(SIZEOF___INT16) --# define LZO_SIZEOF___INT16 (SIZEOF___INT16) --#endif --#if defined(SIZEOF___INT32) --# define LZO_SIZEOF___INT32 (SIZEOF___INT32) --#endif --#if defined(SIZEOF___INT64) --# define LZO_SIZEOF___INT64 (SIZEOF___INT64) --#endif --#if defined(SIZEOF_VOID_P) --# define LZO_SIZEOF_VOID_P (SIZEOF_VOID_P) --#endif --#if defined(SIZEOF_SIZE_T) --# define LZO_SIZEOF_SIZE_T (SIZEOF_SIZE_T) --#endif --#if defined(SIZEOF_PTRDIFF_T) --# define LZO_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) --#endif --#define __LZO_LSR(x,b) (((x)+0ul) >> (b)) --#if !defined(LZO_SIZEOF_SHORT) --# if (LZO_ARCH_CRAY_PVP) --# define LZO_SIZEOF_SHORT 8 --# elif (USHRT_MAX == LZO_0xffffL) --# define LZO_SIZEOF_SHORT 2 --# elif (__LZO_LSR(USHRT_MAX,7) == 1) --# define LZO_SIZEOF_SHORT 1 --# elif (__LZO_LSR(USHRT_MAX,15) == 1) --# define LZO_SIZEOF_SHORT 2 --# elif (__LZO_LSR(USHRT_MAX,31) == 1) --# define LZO_SIZEOF_SHORT 4 --# elif (__LZO_LSR(USHRT_MAX,63) == 1) --# define LZO_SIZEOF_SHORT 8 --# elif (__LZO_LSR(USHRT_MAX,127) == 1) --# define LZO_SIZEOF_SHORT 16 --# else --# error "LZO_SIZEOF_SHORT" --# endif --#endif --#if !defined(LZO_SIZEOF_INT) --# if (LZO_ARCH_CRAY_PVP) --# define LZO_SIZEOF_INT 8 --# elif (UINT_MAX == LZO_0xffffL) --# define LZO_SIZEOF_INT 2 --# elif (UINT_MAX == LZO_0xffffffffL) --# define LZO_SIZEOF_INT 4 --# elif (__LZO_LSR(UINT_MAX,7) == 1) --# define LZO_SIZEOF_INT 1 --# elif (__LZO_LSR(UINT_MAX,15) == 1) --# define LZO_SIZEOF_INT 2 --# elif (__LZO_LSR(UINT_MAX,31) == 1) --# define LZO_SIZEOF_INT 4 --# elif (__LZO_LSR(UINT_MAX,63) == 1) --# define LZO_SIZEOF_INT 8 --# elif (__LZO_LSR(UINT_MAX,127) == 1) --# define LZO_SIZEOF_INT 16 --# else --# error "LZO_SIZEOF_INT" --# endif --#endif --#if !defined(LZO_SIZEOF_LONG) --# if (ULONG_MAX == LZO_0xffffffffL) --# define LZO_SIZEOF_LONG 4 --# elif (__LZO_LSR(ULONG_MAX,7) == 1) --# define LZO_SIZEOF_LONG 1 --# elif (__LZO_LSR(ULONG_MAX,15) == 1) --# define LZO_SIZEOF_LONG 2 --# elif (__LZO_LSR(ULONG_MAX,31) == 1) --# define LZO_SIZEOF_LONG 4 --# elif (__LZO_LSR(ULONG_MAX,63) == 1) --# define LZO_SIZEOF_LONG 8 --# elif (__LZO_LSR(ULONG_MAX,127) == 1) --# define LZO_SIZEOF_LONG 16 --# else --# error "LZO_SIZEOF_LONG" --# endif --#endif --#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) --#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) --# if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__) --# if (LZO_CC_GNUC >= 0x030300ul) --# if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0) --# define LZO_SIZEOF_LONG_LONG LZO_SIZEOF_LONG --# elif (__LZO_LSR(__LONG_LONG_MAX__,30) == 1) --# define LZO_SIZEOF_LONG_LONG 4 --# endif --# endif --# endif --#endif --#endif --#if !defined(LZO_SIZEOF_LONG_LONG) && !defined(LZO_SIZEOF___INT64) --#if (LZO_SIZEOF_LONG > 0 && LZO_SIZEOF_LONG < 8) --#if (LZO_ARCH_I086 && LZO_CC_DMC) --#elif (LZO_CC_CILLY) && defined(__GNUC__) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define LZO_SIZEOF_LONG_LONG 8 --#elif ((LZO_OS_WIN32 || LZO_OS_WIN64 || defined(_WIN32)) && LZO_CC_MSC && (_MSC_VER >= 1400)) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_OS_WIN64 || defined(_WIN64)) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_ARCH_I386 && (LZO_CC_DMC)) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_ARCH_I386 && (LZO_CC_SYMANTECC && (__SC__ >= 0x700))) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_ARCH_I386 && (LZO_CC_INTELC && defined(__linux__))) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_ARCH_I386 && (LZO_CC_MWERKS || LZO_CC_PELLESC || LZO_CC_PGI || LZO_CC_SUNPROC)) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_ARCH_I386 && (LZO_CC_INTELC || LZO_CC_MSC)) --# define LZO_SIZEOF___INT64 8 --#elif ((LZO_OS_WIN32 || defined(_WIN32)) && (LZO_CC_MSC)) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_ARCH_I386 && (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0520))) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_ARCH_I386 && (LZO_CC_WATCOMC && (__WATCOMC__ >= 1100))) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64)) --# define LZO_SIZEOF___INT64 8 --#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) --# define LZO_SIZEOF_LONG_LONG 8 --#elif (LZO_CC_SDCC) && (LZO_SIZEOF_INT == 2) --#elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) --# define LZO_SIZEOF_LONG_LONG 8 --#endif --#endif --#endif --#if defined(__cplusplus) && (LZO_CC_GNUC) --# if (LZO_CC_GNUC < 0x020800ul) --# undef LZO_SIZEOF_LONG_LONG --# endif --#endif --#if (LZO_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) --# undef LZO_SIZEOF_LONG_LONG --#endif --#if !defined(LZO_SIZEOF_VOID_P) --#if (LZO_ARCH_I086) --# define __LZO_WORDSIZE 2 --# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM) --# define LZO_SIZEOF_VOID_P 2 --# elif (LZO_MM_COMPACT || LZO_MM_LARGE || LZO_MM_HUGE) --# define LZO_SIZEOF_VOID_P 4 --# else --# error "LZO_MM" --# endif --#elif (LZO_ARCH_AVR || LZO_ARCH_Z80) --# define __LZO_WORDSIZE 1 --# define LZO_SIZEOF_VOID_P 2 --#elif (LZO_ARCH_C166 || LZO_ARCH_MCS51 || LZO_ARCH_MCS251 || LZO_ARCH_MSP430) --# define LZO_SIZEOF_VOID_P 2 --#elif (LZO_ARCH_H8300) --# if defined(__NORMAL_MODE__) --# define __LZO_WORDSIZE 4 --# define LZO_SIZEOF_VOID_P 2 --# elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__) --# define __LZO_WORDSIZE 4 --# define LZO_SIZEOF_VOID_P 4 --# else --# define __LZO_WORDSIZE 2 --# define LZO_SIZEOF_VOID_P 2 --# endif --# if (LZO_CC_GNUC && (LZO_CC_GNUC < 0x040000ul)) && (LZO_SIZEOF_INT == 4) --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_INT --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_INT --# endif --#elif (LZO_ARCH_M16C) --# define __LZO_WORDSIZE 2 --# if defined(__m32c_cpu__) || defined(__m32cm_cpu__) --# define LZO_SIZEOF_VOID_P 4 --# else --# define LZO_SIZEOF_VOID_P 2 --# endif --#elif (LZO_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)) --# define __LZO_WORDSIZE 8 --# define LZO_SIZEOF_VOID_P 4 --#elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64) --# define __LZO_WORDSIZE 8 --# define LZO_SIZEOF_VOID_P 8 --#elif (LZO_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__) --# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG --#elif (LZO_OS_OS400 || defined(__OS400__)) --# define __LZO_WORDSIZE LZO_SIZEOF_LONG --# define LZO_SIZEOF_VOID_P 16 --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG --#elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64) --# define LZO_SIZEOF_VOID_P 8 --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_LONG --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_LONG --#elif (LZO_ARCH_SPU) --# if 0 --# define __LZO_WORDSIZE 16 --# endif --# define LZO_SIZEOF_VOID_P 4 --#else --# define LZO_SIZEOF_VOID_P LZO_SIZEOF_LONG --#endif --#endif --#if !defined(LZO_WORDSIZE) --# if defined(__LZO_WORDSIZE) --# define LZO_WORDSIZE __LZO_WORDSIZE --# else --# define LZO_WORDSIZE LZO_SIZEOF_VOID_P --# endif --#endif --#if !defined(LZO_SIZEOF_SIZE_T) --#if (LZO_ARCH_I086 || LZO_ARCH_M16C) --# define LZO_SIZEOF_SIZE_T 2 --#else --# define LZO_SIZEOF_SIZE_T LZO_SIZEOF_VOID_P --#endif --#endif --#if !defined(LZO_SIZEOF_PTRDIFF_T) --#if (LZO_ARCH_I086) --# if (LZO_MM_TINY || LZO_MM_SMALL || LZO_MM_MEDIUM || LZO_MM_HUGE) --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_VOID_P --# elif (LZO_MM_COMPACT || LZO_MM_LARGE) --# if (LZO_CC_BORLANDC || LZO_CC_TURBOC) --# define LZO_SIZEOF_PTRDIFF_T 4 --# else --# define LZO_SIZEOF_PTRDIFF_T 2 --# endif --# else --# error "LZO_MM" --# endif --#else --# define LZO_SIZEOF_PTRDIFF_T LZO_SIZEOF_SIZE_T --#endif --#endif --#if (LZO_ABI_NEUTRAL_ENDIAN) --# undef LZO_ABI_BIG_ENDIAN --# undef LZO_ABI_LITTLE_ENDIAN --#elif !(LZO_ABI_BIG_ENDIAN) && !(LZO_ABI_LITTLE_ENDIAN) --#if (LZO_ARCH_ALPHA) && (LZO_ARCH_CRAY_MPP) --# define LZO_ABI_BIG_ENDIAN 1 --#elif (LZO_ARCH_IA64) && (LZO_OS_POSIX_LINUX || LZO_OS_WIN64) --# define LZO_ABI_LITTLE_ENDIAN 1 --#elif (LZO_ARCH_ALPHA || LZO_ARCH_AMD64 || LZO_ARCH_BLACKFIN || LZO_ARCH_CRIS || LZO_ARCH_I086 || LZO_ARCH_I386 || LZO_ARCH_MSP430) --# define LZO_ABI_LITTLE_ENDIAN 1 --#elif (LZO_ARCH_AVR32 || LZO_ARCH_M68K || LZO_ARCH_S390) --# define LZO_ABI_BIG_ENDIAN 1 --#elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__) --# if (__LITTLE_ENDIAN__ == 1) --# define LZO_ABI_LITTLE_ENDIAN 1 --# else --# define LZO_ABI_BIG_ENDIAN 1 --# endif --#elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__) --# define LZO_ABI_BIG_ENDIAN 1 --#elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__) --# define LZO_ABI_LITTLE_ENDIAN 1 --#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__) --# define LZO_ABI_BIG_ENDIAN 1 --#elif 1 && (LZO_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__) --# define LZO_ABI_LITTLE_ENDIAN 1 --#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__) --# define LZO_ABI_BIG_ENDIAN 1 --#elif 1 && (LZO_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__) --# define LZO_ABI_LITTLE_ENDIAN 1 --#endif --#endif --#if (LZO_ABI_BIG_ENDIAN) && (LZO_ABI_LITTLE_ENDIAN) --# error "this should not happen" --#endif --#if (LZO_ABI_BIG_ENDIAN) --# define LZO_INFO_ABI_ENDIAN "be" --#elif (LZO_ABI_LITTLE_ENDIAN) --# define LZO_INFO_ABI_ENDIAN "le" --#elif (LZO_ABI_NEUTRAL_ENDIAN) --# define LZO_INFO_ABI_ENDIAN "neutral" --#endif --#if (LZO_SIZEOF_INT == 1 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) --# define LZO_ABI_I8LP16 1 --# define LZO_INFO_ABI_PM "i8lp16" --#elif (LZO_SIZEOF_INT == 2 && LZO_SIZEOF_LONG == 2 && LZO_SIZEOF_VOID_P == 2) --# define LZO_ABI_ILP16 1 --# define LZO_INFO_ABI_PM "ilp16" --#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 4) --# define LZO_ABI_ILP32 1 --# define LZO_INFO_ABI_PM "ilp32" --#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 4 && LZO_SIZEOF_VOID_P == 8 && LZO_SIZEOF_SIZE_T == 8) --# define LZO_ABI_LLP64 1 --# define LZO_INFO_ABI_PM "llp64" --#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) --# define LZO_ABI_LP64 1 --# define LZO_INFO_ABI_PM "lp64" --#elif (LZO_SIZEOF_INT == 8 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 8) --# define LZO_ABI_ILP64 1 --# define LZO_INFO_ABI_PM "ilp64" --#elif (LZO_SIZEOF_INT == 4 && LZO_SIZEOF_LONG == 8 && LZO_SIZEOF_VOID_P == 4) --# define LZO_ABI_IP32L64 1 --# define LZO_INFO_ABI_PM "ip32l64" --#endif --#if !defined(__LZO_LIBC_OVERRIDE) --#if (LZO_LIBC_NAKED) --# define LZO_INFO_LIBC "naked" --#elif (LZO_LIBC_FREESTANDING) --# define LZO_INFO_LIBC "freestanding" --#elif (LZO_LIBC_MOSTLY_FREESTANDING) --# define LZO_INFO_LIBC "mfreestanding" --#elif (LZO_LIBC_ISOC90) --# define LZO_INFO_LIBC "isoc90" --#elif (LZO_LIBC_ISOC99) --# define LZO_INFO_LIBC "isoc99" --#elif defined(__dietlibc__) --# define LZO_LIBC_DIETLIBC 1 --# define LZO_INFO_LIBC "dietlibc" --#elif defined(_NEWLIB_VERSION) --# define LZO_LIBC_NEWLIB 1 --# define LZO_INFO_LIBC "newlib" --#elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__) --# if defined(__UCLIBC_SUBLEVEL__) --# define LZO_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__) --# else --# define LZO_LIBC_UCLIBC 0x00090bL --# endif --# define LZO_INFO_LIBC "uclibc" --#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__) --# define LZO_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100) --# define LZO_INFO_LIBC "glibc" --#elif (LZO_CC_MWERKS) && defined(__MSL__) --# define LZO_LIBC_MSL __MSL__ --# define LZO_INFO_LIBC "msl" --#elif 1 && defined(__IAR_SYSTEMS_ICC__) --# define LZO_LIBC_ISOC90 1 --# define LZO_INFO_LIBC "isoc90" --#else --# define LZO_LIBC_DEFAULT 1 --# define LZO_INFO_LIBC "default" --#endif --#endif --#if !defined(__lzo_gnuc_extension__) --#if (LZO_CC_GNUC >= 0x020800ul) --# define __lzo_gnuc_extension__ __extension__ --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_gnuc_extension__ __extension__ --#else --# define __lzo_gnuc_extension__ /*empty*/ --#endif --#endif --#if !defined(__lzo_ua_volatile) --# define __lzo_ua_volatile volatile --#endif --#if !defined(__lzo_alignof) --#if (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) --# define __lzo_alignof(e) __alignof__(e) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 700)) --# define __lzo_alignof(e) __alignof__(e) --#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) --# define __lzo_alignof(e) __alignof(e) --#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) --# define __lzo_alignof(e) __alignof__(e) --#endif --#endif --#if defined(__lzo_alignof) --# define __lzo_HAVE_alignof 1 --#endif --#if !defined(__lzo_constructor) --#if (LZO_CC_GNUC >= 0x030400ul) --# define __lzo_constructor __attribute__((__constructor__,__used__)) --#elif (LZO_CC_GNUC >= 0x020700ul) --# define __lzo_constructor __attribute__((__constructor__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_constructor __attribute__((__constructor__)) --#endif --#endif --#if defined(__lzo_constructor) --# define __lzo_HAVE_constructor 1 --#endif --#if !defined(__lzo_destructor) --#if (LZO_CC_GNUC >= 0x030400ul) --# define __lzo_destructor __attribute__((__destructor__,__used__)) --#elif (LZO_CC_GNUC >= 0x020700ul) --# define __lzo_destructor __attribute__((__destructor__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_destructor __attribute__((__destructor__)) --#endif --#endif --#if defined(__lzo_destructor) --# define __lzo_HAVE_destructor 1 --#endif --#if (__lzo_HAVE_destructor) && !(__lzo_HAVE_constructor) --# error "this should not happen" --#endif --#if !defined(__lzo_inline) --#if (LZO_CC_TURBOC && (__TURBOC__ <= 0x0295)) --#elif defined(__cplusplus) --# define __lzo_inline inline --#elif (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0550)) --# define __lzo_inline __inline --#elif (LZO_CC_CILLY || LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE || LZO_CC_PGI) --# define __lzo_inline __inline__ --#elif (LZO_CC_DMC) --# define __lzo_inline __inline --#elif (LZO_CC_INTELC) --# define __lzo_inline __inline --#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x2405)) --# define __lzo_inline __inline --#elif (LZO_CC_MSC && (_MSC_VER >= 900)) --# define __lzo_inline __inline --#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) --# define __lzo_inline __inline__ --#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) --# define __lzo_inline inline --#endif --#endif --#if defined(__lzo_inline) --# define __lzo_HAVE_inline 1 --#else --# define __lzo_inline /*empty*/ --#endif --#if !defined(__lzo_forceinline) --#if (LZO_CC_GNUC >= 0x030200ul) --# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) --# define __lzo_forceinline __forceinline --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) --# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) --#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) --# define __lzo_forceinline __forceinline --#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) --# define __lzo_forceinline __inline__ __attribute__((__always_inline__)) --#endif --#endif --#if defined(__lzo_forceinline) --# define __lzo_HAVE_forceinline 1 --#else --# define __lzo_forceinline /*empty*/ --#endif --#if !defined(__lzo_noinline) --#if 1 && (LZO_ARCH_I386) && (LZO_CC_GNUC >= 0x040000ul) && (LZO_CC_GNUC < 0x040003ul) --# define __lzo_noinline __attribute__((__noinline__,__used__)) --#elif (LZO_CC_GNUC >= 0x030200ul) --# define __lzo_noinline __attribute__((__noinline__)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_MSC) --# define __lzo_noinline __declspec(noinline) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800) && LZO_CC_SYNTAX_GNUC) --# define __lzo_noinline __attribute__((__noinline__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_noinline __attribute__((__noinline__)) --#elif (LZO_CC_MSC && (_MSC_VER >= 1300)) --# define __lzo_noinline __declspec(noinline) --#elif (LZO_CC_MWERKS && (__MWERKS__ >= 0x3200) && (LZO_OS_WIN32 || LZO_OS_WIN64)) --# if defined(__cplusplus) --# else --# define __lzo_noinline __declspec(noinline) --# endif --#elif (LZO_CC_SUNPROC && (LZO_CC_SUNPROC >= 0x5100)) --# define __lzo_noinline __attribute__((__noinline__)) --#endif --#endif --#if defined(__lzo_noinline) --# define __lzo_HAVE_noinline 1 --#else --# define __lzo_noinline /*empty*/ --#endif --#if (__lzo_HAVE_forceinline || __lzo_HAVE_noinline) && !(__lzo_HAVE_inline) --# error "this should not happen" --#endif --#if !defined(__lzo_noreturn) --#if (LZO_CC_GNUC >= 0x020700ul) --# define __lzo_noreturn __attribute__((__noreturn__)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) --# define __lzo_noreturn __declspec(noreturn) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) --# define __lzo_noreturn __attribute__((__noreturn__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_noreturn __attribute__((__noreturn__)) --#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) --# define __lzo_noreturn __declspec(noreturn) --#endif --#endif --#if defined(__lzo_noreturn) --# define __lzo_HAVE_noreturn 1 --#else --# define __lzo_noreturn /*empty*/ --#endif --#if !defined(__lzo_nothrow) --#if (LZO_CC_GNUC >= 0x030300ul) --# define __lzo_nothrow __attribute__((__nothrow__)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 450) && LZO_CC_SYNTAX_MSC) && defined(__cplusplus) --# define __lzo_nothrow __declspec(nothrow) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 900) && LZO_CC_SYNTAX_GNUC) --# define __lzo_nothrow __attribute__((__nothrow__)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_nothrow __attribute__((__nothrow__)) --#elif (LZO_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus) --# define __lzo_nothrow __declspec(nothrow) --#endif --#endif --#if defined(__lzo_nothrow) --# define __lzo_HAVE_nothrow 1 --#else --# define __lzo_nothrow /*empty*/ --#endif --#if !defined(__lzo_restrict) --#if (LZO_CC_GNUC >= 0x030400ul) --# define __lzo_restrict __restrict__ --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 600) && LZO_CC_SYNTAX_GNUC) --# define __lzo_restrict __restrict__ --#elif (LZO_CC_CLANG || LZO_CC_LLVM) --# define __lzo_restrict __restrict__ --#elif (LZO_CC_MSC && (_MSC_VER >= 1400)) --# define __lzo_restrict __restrict --#endif --#endif --#if defined(__lzo_restrict) --# define __lzo_HAVE_restrict 1 --#else --# define __lzo_restrict /*empty*/ --#endif --#if !defined(__lzo_likely) && !defined(__lzo_unlikely) --#if (LZO_CC_GNUC >= 0x030200ul) --# define __lzo_likely(e) (__builtin_expect(!!(e),1)) --# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) --#elif (LZO_CC_INTELC && (__INTEL_COMPILER >= 800)) --# define __lzo_likely(e) (__builtin_expect(!!(e),1)) --# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) --#elif (LZO_CC_CLANG || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define __lzo_likely(e) (__builtin_expect(!!(e),1)) --# define __lzo_unlikely(e) (__builtin_expect(!!(e),0)) --#endif --#endif --#if defined(__lzo_likely) --# define __lzo_HAVE_likely 1 --#else --# define __lzo_likely(e) (e) --#endif --#if defined(__lzo_unlikely) --# define __lzo_HAVE_unlikely 1 --#else --# define __lzo_unlikely(e) (e) --#endif --#if !defined(LZO_UNUSED) --# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) --# define LZO_UNUSED(var) ((void) &var) --# elif (LZO_CC_BORLANDC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PELLESC || LZO_CC_TURBOC) --# define LZO_UNUSED(var) if (&var) ; else --# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define LZO_UNUSED(var) ((void) var) --# elif (LZO_CC_MSC && (_MSC_VER < 900)) --# define LZO_UNUSED(var) if (&var) ; else --# elif (LZO_CC_KEILC) --# define LZO_UNUSED(var) {extern int __lzo_unused[1-2*!(sizeof(var)>0)];} --# elif (LZO_CC_PACIFICC) --# define LZO_UNUSED(var) ((void) sizeof(var)) --# elif (LZO_CC_WATCOMC) && defined(__cplusplus) --# define LZO_UNUSED(var) ((void) var) --# else --# define LZO_UNUSED(var) ((void) &var) --# endif --#endif --#if !defined(LZO_UNUSED_FUNC) --# if (LZO_CC_BORLANDC && (__BORLANDC__ >= 0x0600)) --# define LZO_UNUSED_FUNC(func) ((void) func) --# elif (LZO_CC_BORLANDC || LZO_CC_NDPC || LZO_CC_TURBOC) --# define LZO_UNUSED_FUNC(func) if (func) ; else --# elif (LZO_CC_CLANG || LZO_CC_LLVM) --# define LZO_UNUSED_FUNC(func) ((void) &func) --# elif (LZO_CC_MSC && (_MSC_VER < 900)) --# define LZO_UNUSED_FUNC(func) if (func) ; else --# elif (LZO_CC_MSC) --# define LZO_UNUSED_FUNC(func) ((void) &func) --# elif (LZO_CC_KEILC || LZO_CC_PELLESC) --# define LZO_UNUSED_FUNC(func) {extern int __lzo_unused[1-2*!(sizeof((int)func)>0)];} --# else --# define LZO_UNUSED_FUNC(func) ((void) func) --# endif --#endif --#if !defined(LZO_UNUSED_LABEL) --# if (LZO_CC_WATCOMC) && defined(__cplusplus) --# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l --# elif (LZO_CC_CLANG || LZO_CC_INTELC || LZO_CC_WATCOMC) --# define LZO_UNUSED_LABEL(l) if (0) goto l --# else --# define LZO_UNUSED_LABEL(l) switch(0) case 1:goto l --# endif --#endif --#if !defined(LZO_DEFINE_UNINITIALIZED_VAR) --# if 0 --# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var --# elif 0 && (LZO_CC_GNUC) --# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var --# else --# define LZO_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init --# endif --#endif --#if !defined(LZO_UNCONST_CAST) --# if 0 && defined(__cplusplus) --# define LZO_UNCONST_CAST(t,e) (const_cast (e)) --# elif (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_LLVM || LZO_CC_PATHSCALE) --# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((lzo_uintptr_t) ((const void *) (e)))))) --# else --# define LZO_UNCONST_CAST(t,e) ((t) ((void *) ((char *) ((const void *) (e))))) --# endif --#endif --#if !defined(LZO_COMPILE_TIME_ASSERT_HEADER) --# if (LZO_CC_AZTECC || LZO_CC_ZORTECHC) --# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; --# elif (LZO_CC_DMC || LZO_CC_SYMANTECC) --# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1u-2*!(e)]; --# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) --# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-!(e)]; --# else --# define LZO_COMPILE_TIME_ASSERT_HEADER(e) extern int __lzo_cta[1-2*!(e)]; --# endif --#endif --#if !defined(LZO_COMPILE_TIME_ASSERT) --# if (LZO_CC_AZTECC) --# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-!(e)];} --# elif (LZO_CC_DMC || LZO_CC_PACIFICC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) --# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; --# elif (LZO_CC_MSC && (_MSC_VER < 900)) --# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; --# elif (LZO_CC_TURBOC && (__TURBOC__ == 0x0295)) --# define LZO_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break; --# else --# define LZO_COMPILE_TIME_ASSERT(e) {typedef int __lzo_cta_t[1-2*!(e)];} --# endif --#endif --#if (LZO_ARCH_I086 || LZO_ARCH_I386) && (LZO_OS_DOS16 || LZO_OS_DOS32 || LZO_OS_OS2 || LZO_OS_OS216 || LZO_OS_WIN16 || LZO_OS_WIN32 || LZO_OS_WIN64) --# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC) --# elif (LZO_CC_DMC || LZO_CC_SYMANTECC || LZO_CC_ZORTECHC) --# define __lzo_cdecl __cdecl --# define __lzo_cdecl_atexit /*empty*/ --# define __lzo_cdecl_main __cdecl --# if (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) --# define __lzo_cdecl_qsort __pascal --# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) --# define __lzo_cdecl_qsort _stdcall --# else --# define __lzo_cdecl_qsort __cdecl --# endif --# elif (LZO_CC_WATCOMC) --# define __lzo_cdecl __cdecl --# else --# define __lzo_cdecl __cdecl --# define __lzo_cdecl_atexit __cdecl --# define __lzo_cdecl_main __cdecl --# define __lzo_cdecl_qsort __cdecl --# endif --# if (LZO_CC_GNUC || LZO_CC_HIGHC || LZO_CC_NDPC || LZO_CC_PACIFICC || LZO_CC_WATCOMC) --# elif (LZO_OS_OS2 && (LZO_CC_DMC || LZO_CC_SYMANTECC)) --# define __lzo_cdecl_sighandler __pascal --# elif (LZO_OS_OS2 && (LZO_CC_ZORTECHC)) --# define __lzo_cdecl_sighandler _stdcall --# elif (LZO_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE) --# define __lzo_cdecl_sighandler __clrcall --# elif (LZO_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700)) --# if defined(_DLL) --# define __lzo_cdecl_sighandler _far _cdecl _loadds --# elif defined(_MT) --# define __lzo_cdecl_sighandler _far _cdecl --# else --# define __lzo_cdecl_sighandler _cdecl --# endif --# else --# define __lzo_cdecl_sighandler __cdecl --# endif --#elif (LZO_ARCH_I386) && (LZO_CC_WATCOMC) --# define __lzo_cdecl __cdecl --#elif (LZO_ARCH_M68K && LZO_OS_TOS && (LZO_CC_PUREC || LZO_CC_TURBOC)) --# define __lzo_cdecl cdecl --#endif --#if !defined(__lzo_cdecl) --# define __lzo_cdecl /*empty*/ --#endif --#if !defined(__lzo_cdecl_atexit) --# define __lzo_cdecl_atexit /*empty*/ --#endif --#if !defined(__lzo_cdecl_main) --# define __lzo_cdecl_main /*empty*/ --#endif --#if !defined(__lzo_cdecl_qsort) --# define __lzo_cdecl_qsort /*empty*/ --#endif --#if !defined(__lzo_cdecl_sighandler) --# define __lzo_cdecl_sighandler /*empty*/ --#endif --#if !defined(__lzo_cdecl_va) --# define __lzo_cdecl_va __lzo_cdecl --#endif --#if !(LZO_CFG_NO_WINDOWS_H) --#if (LZO_OS_CYGWIN || (LZO_OS_EMX && defined(__RSXNT__)) || LZO_OS_WIN32 || LZO_OS_WIN64) --# if (LZO_CC_WATCOMC && (__WATCOMC__ < 1000)) --# elif (LZO_OS_WIN32 && LZO_CC_GNUC) && defined(__PW32__) --# elif ((LZO_OS_CYGWIN || defined(__MINGW32__)) && (LZO_CC_GNUC && (LZO_CC_GNUC < 0x025f00ul))) --# else --# define LZO_HAVE_WINDOWS_H 1 --# endif --#endif --#endif --#if (LZO_ARCH_ALPHA) --# define LZO_OPT_AVOID_UINT_INDEX 1 --# define LZO_OPT_AVOID_SHORT 1 --# define LZO_OPT_AVOID_USHORT 1 --#elif (LZO_ARCH_AMD64) --# define LZO_OPT_AVOID_INT_INDEX 1 --# define LZO_OPT_AVOID_UINT_INDEX 1 --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --# define LZO_OPT_UNALIGNED64 1 --#elif (LZO_ARCH_ARM && LZO_ARCH_ARM_THUMB) --#elif (LZO_ARCH_ARM) --# define LZO_OPT_AVOID_SHORT 1 --# define LZO_OPT_AVOID_USHORT 1 --#elif (LZO_ARCH_CRIS) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --#elif (LZO_ARCH_I386) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --#elif (LZO_ARCH_IA64) --# define LZO_OPT_AVOID_INT_INDEX 1 --# define LZO_OPT_AVOID_UINT_INDEX 1 --# define LZO_OPT_PREFER_POSTINC 1 --#elif (LZO_ARCH_M68K) --# define LZO_OPT_PREFER_POSTINC 1 --# define LZO_OPT_PREFER_PREDEC 1 --# if defined(__mc68020__) && !defined(__mcoldfire__) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --# endif --#elif (LZO_ARCH_MIPS) --# define LZO_OPT_AVOID_UINT_INDEX 1 --#elif (LZO_ARCH_POWERPC) --# define LZO_OPT_PREFER_PREINC 1 --# define LZO_OPT_PREFER_PREDEC 1 --# if (LZO_ABI_BIG_ENDIAN) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --# endif --#elif (LZO_ARCH_S390) --# define LZO_OPT_UNALIGNED16 1 --# define LZO_OPT_UNALIGNED32 1 --# if (LZO_SIZEOF_SIZE_T == 8) --# define LZO_OPT_UNALIGNED64 1 --# endif --#elif (LZO_ARCH_SH) --# define LZO_OPT_PREFER_POSTINC 1 --# define LZO_OPT_PREFER_PREDEC 1 --#endif --#ifndef LZO_CFG_NO_INLINE_ASM --#if (LZO_CC_LLVM) --# define LZO_CFG_NO_INLINE_ASM 1 --#endif --#endif --#ifndef LZO_CFG_NO_UNALIGNED --#if (LZO_ABI_NEUTRAL_ENDIAN) || (LZO_ARCH_GENERIC) --# define LZO_CFG_NO_UNALIGNED 1 --#endif --#endif --#if (LZO_CFG_NO_UNALIGNED) --# undef LZO_OPT_UNALIGNED16 --# undef LZO_OPT_UNALIGNED32 --# undef LZO_OPT_UNALIGNED64 --#endif --#if (LZO_CFG_NO_INLINE_ASM) --#elif (LZO_ARCH_I386 && (LZO_OS_DOS32 || LZO_OS_WIN32) && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) --# define LZO_ASM_SYNTAX_MSC 1 --#elif (LZO_OS_WIN64 && (LZO_CC_DMC || LZO_CC_INTELC || LZO_CC_MSC || LZO_CC_PELLESC)) --#elif (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC == 0x011f00ul)) --#elif (LZO_ARCH_I386 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) --# define LZO_ASM_SYNTAX_GNUC 1 --#elif (LZO_ARCH_AMD64 && (LZO_CC_CLANG || LZO_CC_GNUC || LZO_CC_INTELC || LZO_CC_PATHSCALE)) --# define LZO_ASM_SYNTAX_GNUC 1 --#endif --#if (LZO_ASM_SYNTAX_GNUC) --#if (LZO_ARCH_I386 && LZO_CC_GNUC && (LZO_CC_GNUC < 0x020000ul)) --# define __LZO_ASM_CLOBBER "ax" --#elif (LZO_CC_INTELC) --# define __LZO_ASM_CLOBBER "memory" --#else --# define __LZO_ASM_CLOBBER "cc", "memory" --#endif --#endif --#if defined(__LZO_INFOSTR_MM) --#elif (LZO_MM_FLAT) && (defined(__LZO_INFOSTR_PM) || defined(LZO_INFO_ABI_PM)) --# define __LZO_INFOSTR_MM "" --#elif defined(LZO_INFO_MM) --# define __LZO_INFOSTR_MM "." LZO_INFO_MM --#else --# define __LZO_INFOSTR_MM "" --#endif --#if defined(__LZO_INFOSTR_PM) --#elif defined(LZO_INFO_ABI_PM) --# define __LZO_INFOSTR_PM "." LZO_INFO_ABI_PM --#else --# define __LZO_INFOSTR_PM "" --#endif --#if defined(__LZO_INFOSTR_ENDIAN) --#elif defined(LZO_INFO_ABI_ENDIAN) --# define __LZO_INFOSTR_ENDIAN "." LZO_INFO_ABI_ENDIAN --#else --# define __LZO_INFOSTR_ENDIAN "" --#endif --#if defined(__LZO_INFOSTR_OSNAME) --#elif defined(LZO_INFO_OS_CONSOLE) --# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_CONSOLE --#elif defined(LZO_INFO_OS_POSIX) --# define __LZO_INFOSTR_OSNAME LZO_INFO_OS "." LZO_INFO_OS_POSIX --#else --# define __LZO_INFOSTR_OSNAME LZO_INFO_OS --#endif --#if defined(__LZO_INFOSTR_LIBC) --#elif defined(LZO_INFO_LIBC) --# define __LZO_INFOSTR_LIBC "." LZO_INFO_LIBC --#else --# define __LZO_INFOSTR_LIBC "" --#endif --#if defined(__LZO_INFOSTR_CCVER) --#elif defined(LZO_INFO_CCVER) --# define __LZO_INFOSTR_CCVER " " LZO_INFO_CCVER --#else --# define __LZO_INFOSTR_CCVER "" --#endif --#define LZO_INFO_STRING \ -- LZO_INFO_ARCH __LZO_INFOSTR_MM __LZO_INFOSTR_PM __LZO_INFOSTR_ENDIAN \ -- " " __LZO_INFOSTR_OSNAME __LZO_INFOSTR_LIBC " " LZO_INFO_CC __LZO_INFOSTR_CCVER -- --#endif -- --#endif -- --#undef LZO_HAVE_CONFIG_H --#include "minilzo.h" -- --#if !defined(MINILZO_VERSION) || (MINILZO_VERSION != 0x2040) --# error "version mismatch in miniLZO source files" --#endif -- --#ifdef MINILZO_HAVE_CONFIG_H --# define LZO_HAVE_CONFIG_H 1 --#endif -- --#ifndef __LZO_CONF_H --#define __LZO_CONF_H 1 -- --#if !defined(__LZO_IN_MINILZO) --#if (LZO_CFG_FREESTANDING) --# define LZO_LIBC_FREESTANDING 1 --# define LZO_OS_FREESTANDING 1 --# define ACC_LIBC_FREESTANDING 1 --# define ACC_OS_FREESTANDING 1 --#endif --#if (LZO_CFG_NO_UNALIGNED) --# define ACC_CFG_NO_UNALIGNED 1 --#endif --#if (LZO_ARCH_GENERIC) --# define ACC_ARCH_GENERIC 1 --#endif --#if (LZO_ABI_NEUTRAL_ENDIAN) --# define ACC_ABI_NEUTRAL_ENDIAN 1 --#endif --#if (LZO_HAVE_CONFIG_H) --# define ACC_CONFIG_NO_HEADER 1 --#endif --#if defined(LZO_CFG_EXTRA_CONFIG_HEADER) --# include LZO_CFG_EXTRA_CONFIG_HEADER --#endif --#if defined(__LZOCONF_H) || defined(__LZOCONF_H_INCLUDED) --# error "include this file first" --#endif --#include "lzo/lzoconf.h" --#endif -- --#if (LZO_VERSION < 0x02000) || !defined(__LZOCONF_H_INCLUDED) --# error "version mismatch" --#endif -- --#if (LZO_CC_BORLANDC && LZO_ARCH_I086) --# pragma option -h --#endif -- --#if (LZO_CC_MSC && (_MSC_VER >= 1000)) --# pragma warning(disable: 4127 4701) --#endif --#if (LZO_CC_MSC && (_MSC_VER >= 1300)) --# pragma warning(disable: 4820) --# pragma warning(disable: 4514 4710 4711) --#endif -- --#if (LZO_CC_SUNPROC) --#if !defined(__cplusplus) --# pragma error_messages(off,E_END_OF_LOOP_CODE_NOT_REACHED) --# pragma error_messages(off,E_LOOP_NOT_ENTERED_AT_TOP) --# pragma error_messages(off,E_STATEMENT_NOT_REACHED) --#endif --#endif -- --#if (__LZO_MMODEL_HUGE) && !(LZO_HAVE_MM_HUGE_PTR) --# error "this should not happen - check defines for __huge" --#endif -- --#if defined(__LZO_IN_MINILZO) || defined(LZO_CFG_FREESTANDING) --#elif (LZO_OS_DOS16 || LZO_OS_OS216 || LZO_OS_WIN16) --# define ACC_WANT_ACC_INCD_H 1 --# define ACC_WANT_ACC_INCE_H 1 --# define ACC_WANT_ACC_INCI_H 1 --#elif 1 --# include --#else --# define ACC_WANT_ACC_INCD_H 1 --#endif -- --#if (LZO_ARCH_I086) --# define ACC_MM_AHSHIFT LZO_MM_AHSHIFT --# define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0]) --# define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1]) --# define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o))) --#endif -- --#if !defined(lzo_uintptr_t) --# if defined(__LZO_MMODEL_HUGE) --# define lzo_uintptr_t unsigned long --# elif 1 && defined(LZO_OS_OS400) && (LZO_SIZEOF_VOID_P == 16) --# define __LZO_UINTPTR_T_IS_POINTER 1 -- typedef char* lzo_uintptr_t; --# define lzo_uintptr_t lzo_uintptr_t --# elif (LZO_SIZEOF_SIZE_T == LZO_SIZEOF_VOID_P) --# define lzo_uintptr_t size_t --# elif (LZO_SIZEOF_LONG == LZO_SIZEOF_VOID_P) --# define lzo_uintptr_t unsigned long --# elif (LZO_SIZEOF_INT == LZO_SIZEOF_VOID_P) --# define lzo_uintptr_t unsigned int --# elif (LZO_SIZEOF_LONG_LONG == LZO_SIZEOF_VOID_P) --# define lzo_uintptr_t unsigned long long --# else --# define lzo_uintptr_t size_t --# endif --#endif --LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) -- --#if 1 && !defined(LZO_CFG_FREESTANDING) --#if 1 && !defined(HAVE_STRING_H) --#define HAVE_STRING_H 1 --#endif --#if 1 && !defined(HAVE_MEMCMP) --#define HAVE_MEMCMP 1 --#endif --#if 1 && !defined(HAVE_MEMCPY) --#define HAVE_MEMCPY 1 --#endif --#if 1 && !defined(HAVE_MEMMOVE) --#define HAVE_MEMMOVE 1 --#endif --#if 1 && !defined(HAVE_MEMSET) --#define HAVE_MEMSET 1 --#endif --#endif -- --#if 1 && defined(HAVE_STRING_H) --#include --#endif -- --#if (LZO_CFG_FREESTANDING) --# undef HAVE_MEMCMP --# undef HAVE_MEMCPY --# undef HAVE_MEMMOVE --# undef HAVE_MEMSET --#endif -- --#if !(HAVE_MEMCMP) --# undef memcmp --# define memcmp(a,b,c) lzo_memcmp(a,b,c) --#elif !(__LZO_MMODEL_HUGE) --# undef lzo_memcmp --# define lzo_memcmp(a,b,c) memcmp(a,b,c) --#endif --#if !(HAVE_MEMCPY) --# undef memcpy --# define memcpy(a,b,c) lzo_memcpy(a,b,c) --#elif !(__LZO_MMODEL_HUGE) --# undef lzo_memcpy --# define lzo_memcpy(a,b,c) memcpy(a,b,c) --#endif --#if !(HAVE_MEMMOVE) --# undef memmove --# define memmove(a,b,c) lzo_memmove(a,b,c) --#elif !(__LZO_MMODEL_HUGE) --# undef lzo_memmove --# define lzo_memmove(a,b,c) memmove(a,b,c) --#endif --#if !(HAVE_MEMSET) --# undef memset --# define memset(a,b,c) lzo_memset(a,b,c) --#elif !(__LZO_MMODEL_HUGE) --# undef lzo_memset --# define lzo_memset(a,b,c) memset(a,b,c) --#endif -- --#undef NDEBUG --#if (LZO_CFG_FREESTANDING) --# undef LZO_DEBUG --# define NDEBUG 1 --# undef assert --# define assert(e) ((void)0) --#else --# if !defined(LZO_DEBUG) --# define NDEBUG 1 --# endif --# include --#endif -- --#if 0 && defined(__BOUNDS_CHECKING_ON) --# include --#else --# define BOUNDS_CHECKING_OFF_DURING(stmt) stmt --# define BOUNDS_CHECKING_OFF_IN_EXPR(expr) (expr) --#endif -- --#if !defined(__lzo_inline) --# define __lzo_inline /*empty*/ --#endif --#if !defined(__lzo_forceinline) --# define __lzo_forceinline /*empty*/ --#endif --#if !defined(__lzo_noinline) --# define __lzo_noinline /*empty*/ --#endif -- --#if (LZO_CFG_PGO) --# undef __acc_likely --# undef __acc_unlikely --# undef __lzo_likely --# undef __lzo_unlikely --# define __acc_likely(e) (e) --# define __acc_unlikely(e) (e) --# define __lzo_likely(e) (e) --# define __lzo_unlikely(e) (e) --#endif -- --#if 1 --# define LZO_BYTE(x) ((unsigned char) (x)) --#else --# define LZO_BYTE(x) ((unsigned char) ((x) & 0xff)) --#endif -- --#define LZO_MAX(a,b) ((a) >= (b) ? (a) : (b)) --#define LZO_MIN(a,b) ((a) <= (b) ? (a) : (b)) --#define LZO_MAX3(a,b,c) ((a) >= (b) ? LZO_MAX(a,c) : LZO_MAX(b,c)) --#define LZO_MIN3(a,b,c) ((a) <= (b) ? LZO_MIN(a,c) : LZO_MIN(b,c)) -- --#define lzo_sizeof(type) ((lzo_uint) (sizeof(type))) -- --#define LZO_HIGH(array) ((lzo_uint) (sizeof(array)/sizeof(*(array)))) -- --#define LZO_SIZE(bits) (1u << (bits)) --#define LZO_MASK(bits) (LZO_SIZE(bits) - 1) -- --#define LZO_LSIZE(bits) (1ul << (bits)) --#define LZO_LMASK(bits) (LZO_LSIZE(bits) - 1) -- --#define LZO_USIZE(bits) ((lzo_uint) 1 << (bits)) --#define LZO_UMASK(bits) (LZO_USIZE(bits) - 1) -- --#if !defined(DMUL) --#if 0 -- --# define DMUL(a,b) ((lzo_xint) ((lzo_uint32)(a) * (lzo_uint32)(b))) --#else --# define DMUL(a,b) ((lzo_xint) ((a) * (b))) --#endif --#endif -- --#if 1 && !(LZO_CFG_NO_UNALIGNED) --#if 1 && (LZO_ARCH_AMD64 || LZO_ARCH_I386 || LZO_ARCH_POWERPC) --# if (LZO_SIZEOF_SHORT == 2) --# define LZO_UNALIGNED_OK_2 1 --# endif --# if (LZO_SIZEOF_INT == 4) --# define LZO_UNALIGNED_OK_4 1 --# endif --#endif --#endif -- --#if defined(LZO_UNALIGNED_OK_2) -- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(short) == 2) --#endif --#if defined(LZO_UNALIGNED_OK_4) -- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) --#elif defined(LZO_ALIGNED_OK_4) -- LZO_COMPILE_TIME_ASSERT_HEADER(sizeof(lzo_uint32) == 4) --#endif -- --#undef COPY4 --#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) --# if 1 && defined(ACC_UA_COPY32) --# define COPY4(d,s) ACC_UA_COPY32(d,s) --# else --# define COPY4(d,s) (* (__lzo_ua_volatile lzo_uint32p)(__lzo_ua_volatile lzo_voidp)(d) = * (__lzo_ua_volatile const lzo_uint32p)(__lzo_ua_volatile const lzo_voidp)(s)) --# endif --#endif -- --#define MEMCPY8_DS(dest,src,len) \ -- lzo_memcpy(dest,src,len); dest += len; src += len -- --#define BZERO8_PTR(s,l,n) \ -- lzo_memset((lzo_voidp)(s),0,(lzo_uint)(l)*(n)) -- --#define MEMCPY_DS(dest,src,len) \ -- do *dest++ = *src++; while (--len > 0) -- --LZO_EXTERN(const lzo_bytep) lzo_copyright(void); -- --#ifndef __LZO_PTR_H --#define __LZO_PTR_H 1 -- --#ifdef __cplusplus --extern "C" { --#endif -- --#if !defined(lzo_uintptr_t) --# if (__LZO_MMODEL_HUGE) --# define lzo_uintptr_t unsigned long --# else --# define lzo_uintptr_t acc_uintptr_t --# ifdef __ACC_INTPTR_T_IS_POINTER --# define __LZO_UINTPTR_T_IS_POINTER 1 --# endif --# endif --#endif -- --#if (LZO_ARCH_I086) --#define PTR(a) ((lzo_bytep) (a)) --#define PTR_ALIGNED_4(a) ((ACC_PTR_FP_OFF(a) & 3) == 0) --#define PTR_ALIGNED2_4(a,b) (((ACC_PTR_FP_OFF(a) | ACC_PTR_FP_OFF(b)) & 3) == 0) --#elif (LZO_MM_PVP) --#define PTR(a) ((lzo_bytep) (a)) --#define PTR_ALIGNED_8(a) ((((lzo_uintptr_t)(a)) >> 61) == 0) --#define PTR_ALIGNED2_8(a,b) ((((lzo_uintptr_t)(a)|(lzo_uintptr_t)(b)) >> 61) == 0) --#else --#define PTR(a) ((lzo_uintptr_t) (a)) --#define PTR_LINEAR(a) PTR(a) --#define PTR_ALIGNED_4(a) ((PTR_LINEAR(a) & 3) == 0) --#define PTR_ALIGNED_8(a) ((PTR_LINEAR(a) & 7) == 0) --#define PTR_ALIGNED2_4(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 3) == 0) --#define PTR_ALIGNED2_8(a,b) (((PTR_LINEAR(a) | PTR_LINEAR(b)) & 7) == 0) --#endif -- --#define PTR_LT(a,b) (PTR(a) < PTR(b)) --#define PTR_GE(a,b) (PTR(a) >= PTR(b)) --#define PTR_DIFF(a,b) (PTR(a) - PTR(b)) --#define pd(a,b) ((lzo_uint) ((a)-(b))) -- --LZO_EXTERN(lzo_uintptr_t) --__lzo_ptr_linear(const lzo_voidp ptr); -- --typedef union --{ -- char a_char; -- unsigned char a_uchar; -- short a_short; -- unsigned short a_ushort; -- int a_int; -- unsigned int a_uint; -- long a_long; -- unsigned long a_ulong; -- lzo_int a_lzo_int; -- lzo_uint a_lzo_uint; -- lzo_int32 a_lzo_int32; -- lzo_uint32 a_lzo_uint32; -- ptrdiff_t a_ptrdiff_t; -- lzo_uintptr_t a_lzo_uintptr_t; -- lzo_voidp a_lzo_voidp; -- void * a_void_p; -- lzo_bytep a_lzo_bytep; -- lzo_bytepp a_lzo_bytepp; -- lzo_uintp a_lzo_uintp; -- lzo_uint * a_lzo_uint_p; -- lzo_uint32p a_lzo_uint32p; -- lzo_uint32 * a_lzo_uint32_p; -- unsigned char * a_uchar_p; -- char * a_char_p; --} --lzo_full_align_t; -- --#ifdef __cplusplus --} --#endif -- --#endif -- --#define LZO_DETERMINISTIC 1 -- --#define LZO_DICT_USE_PTR 1 --#if 0 && (LZO_ARCH_I086) --# undef LZO_DICT_USE_PTR --#endif -- --#if (LZO_DICT_USE_PTR) --# define lzo_dict_t const lzo_bytep --# define lzo_dict_p lzo_dict_t __LZO_MMODEL * --#else --# define lzo_dict_t lzo_uint --# define lzo_dict_p lzo_dict_t __LZO_MMODEL * --#endif -- --#endif -- --#if !defined(MINILZO_CFG_SKIP_LZO_PTR) -- --LZO_PUBLIC(lzo_uintptr_t) --__lzo_ptr_linear(const lzo_voidp ptr) --{ -- lzo_uintptr_t p; -- --#if (LZO_ARCH_I086) -- p = (((lzo_uintptr_t)(ACC_PTR_FP_SEG(ptr))) << (16 - ACC_MM_AHSHIFT)) + (ACC_PTR_FP_OFF(ptr)); --#elif (LZO_MM_PVP) -- p = (lzo_uintptr_t) (ptr); -- p = (p << 3) | (p >> 61); --#else -- p = (lzo_uintptr_t) PTR_LINEAR(ptr); --#endif -- -- return p; --} -- --LZO_PUBLIC(unsigned) --__lzo_align_gap(const lzo_voidp ptr, lzo_uint size) --{ --#if defined(__LZO_UINTPTR_T_IS_POINTER) -- size_t n = (size_t) ptr; -- n = (((n + size - 1) / size) * size) - n; --#else -- lzo_uintptr_t p, n; -- p = __lzo_ptr_linear(ptr); -- n = (((p + size - 1) / size) * size) - p; --#endif -- -- assert(size > 0); -- assert((long)n >= 0); -- assert(n <= size); -- return (unsigned)n; --} -- --#endif --#if !defined(MINILZO_CFG_SKIP_LZO_UTIL) -- --/* If you use the LZO library in a product, I would appreciate that you -- * keep this copyright string in the executable of your product. -- */ -- --static const char __lzo_copyright[] = --#if !defined(__LZO_IN_MINLZO) -- LZO_VERSION_STRING; --#else -- "\r\n\n" -- "LZO data compression library.\n" -- "$Copyright: LZO Copyright (C) 1996-2010 Markus Franz Xaver Johannes Oberhumer\n" -- "\n" -- "http://www.oberhumer.com $\n\n" -- "$Id: LZO version: v" LZO_VERSION_STRING ", " LZO_VERSION_DATE " $\n" -- "$Info: " LZO_INFO_STRING " $\n"; --#endif -- --LZO_PUBLIC(const lzo_bytep) --lzo_copyright(void) --{ --#if (LZO_OS_DOS16 && LZO_CC_TURBOC) -- return (lzo_voidp) __lzo_copyright; --#else -- return (const lzo_bytep) __lzo_copyright; --#endif --} -- --LZO_PUBLIC(unsigned) --lzo_version(void) --{ -- return LZO_VERSION; --} -- --LZO_PUBLIC(const char *) --lzo_version_string(void) --{ -- return LZO_VERSION_STRING; --} -- --LZO_PUBLIC(const char *) --lzo_version_date(void) --{ -- return LZO_VERSION_DATE; --} -- --LZO_PUBLIC(const lzo_charp) --_lzo_version_string(void) --{ -- return LZO_VERSION_STRING; --} -- --LZO_PUBLIC(const lzo_charp) --_lzo_version_date(void) --{ -- return LZO_VERSION_DATE; --} -- --#define LZO_BASE 65521u --#define LZO_NMAX 5552 -- --#define LZO_DO1(buf,i) s1 += buf[i]; s2 += s1 --#define LZO_DO2(buf,i) LZO_DO1(buf,i); LZO_DO1(buf,i+1); --#define LZO_DO4(buf,i) LZO_DO2(buf,i); LZO_DO2(buf,i+2); --#define LZO_DO8(buf,i) LZO_DO4(buf,i); LZO_DO4(buf,i+4); --#define LZO_DO16(buf,i) LZO_DO8(buf,i); LZO_DO8(buf,i+8); -- --LZO_PUBLIC(lzo_uint32) --lzo_adler32(lzo_uint32 adler, const lzo_bytep buf, lzo_uint len) --{ -- lzo_uint32 s1 = adler & 0xffff; -- lzo_uint32 s2 = (adler >> 16) & 0xffff; -- unsigned k; -- -- if (buf == NULL) -- return 1; -- -- while (len > 0) -- { -- k = len < LZO_NMAX ? (unsigned) len : LZO_NMAX; -- len -= k; -- if (k >= 16) do -- { -- LZO_DO16(buf,0); -- buf += 16; -- k -= 16; -- } while (k >= 16); -- if (k != 0) do -- { -- s1 += *buf++; -- s2 += s1; -- } while (--k > 0); -- s1 %= LZO_BASE; -- s2 %= LZO_BASE; -- } -- return (s2 << 16) | s1; --} -- --#undef LZO_DO1 --#undef LZO_DO2 --#undef LZO_DO4 --#undef LZO_DO8 --#undef LZO_DO16 -- --#endif --#if !defined(MINILZO_CFG_SKIP_LZO_STRING) --#undef lzo_memcmp --#undef lzo_memcpy --#undef lzo_memmove --#undef lzo_memset --#if !defined(__LZO_MMODEL_HUGE) --# undef LZO_HAVE_MM_HUGE_PTR --#endif --#define lzo_hsize_t lzo_uint --#define lzo_hvoid_p lzo_voidp --#define lzo_hbyte_p lzo_bytep --#define LZOLIB_PUBLIC(r,f) LZO_PUBLIC(r) f --#define lzo_hmemcmp lzo_memcmp --#define lzo_hmemcpy lzo_memcpy --#define lzo_hmemmove lzo_memmove --#define lzo_hmemset lzo_memset --#define __LZOLIB_HMEMCPY_CH_INCLUDED 1 --#if !defined(LZOLIB_PUBLIC) --# define LZOLIB_PUBLIC(r,f) r __LZOLIB_FUNCNAME(f) --#endif --LZOLIB_PUBLIC(int, lzo_hmemcmp) (const lzo_hvoid_p s1, const lzo_hvoid_p s2, lzo_hsize_t len) --{ --#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCMP) -- const lzo_hbyte_p p1 = (const lzo_hbyte_p) s1; -- const lzo_hbyte_p p2 = (const lzo_hbyte_p) s2; -- if __lzo_likely(len > 0) do -- { -- int d = *p1 - *p2; -- if (d != 0) -- return d; -- p1++; p2++; -- } while __lzo_likely(--len > 0); -- return 0; --#else -- return memcmp(s1, s2, len); --#endif --} --LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemcpy) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) --{ --#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCPY) -- lzo_hbyte_p p1 = (lzo_hbyte_p) dest; -- const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; -- if (!(len > 0) || p1 == p2) -- return dest; -- do -- *p1++ = *p2++; -- while __lzo_likely(--len > 0); -- return dest; --#else -- return memcpy(dest, src, len); --#endif --} --LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemmove) (lzo_hvoid_p dest, const lzo_hvoid_p src, lzo_hsize_t len) --{ --#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMMOVE) -- lzo_hbyte_p p1 = (lzo_hbyte_p) dest; -- const lzo_hbyte_p p2 = (const lzo_hbyte_p) src; -- if (!(len > 0) || p1 == p2) -- return dest; -- if (p1 < p2) -- { -- do -- *p1++ = *p2++; -- while __lzo_likely(--len > 0); -- } -- else -- { -- p1 += len; -- p2 += len; -- do -- *--p1 = *--p2; -- while __lzo_likely(--len > 0); -- } -- return dest; --#else -- return memmove(dest, src, len); --#endif --} --LZOLIB_PUBLIC(lzo_hvoid_p, lzo_hmemset) (lzo_hvoid_p s, int c, lzo_hsize_t len) --{ --#if (LZO_HAVE_MM_HUGE_PTR) || !(HAVE_MEMSET) -- lzo_hbyte_p p = (lzo_hbyte_p) s; -- if __lzo_likely(len > 0) do -- *p++ = (unsigned char) c; -- while __lzo_likely(--len > 0); -- return s; --#else -- return memset(s, c, len); --#endif --} --#undef LZOLIB_PUBLIC --#endif --#if !defined(MINILZO_CFG_SKIP_LZO_INIT) -- --#if !defined(__LZO_IN_MINILZO) -- --#define ACC_WANT_ACC_CHK_CH 1 --#undef ACCCHK_ASSERT -- -- ACCCHK_ASSERT_IS_SIGNED_T(lzo_int) -- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint) -- -- ACCCHK_ASSERT_IS_SIGNED_T(lzo_int32) -- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uint32) -- ACCCHK_ASSERT((LZO_UINT32_C(1) << (int)(8*sizeof(LZO_UINT32_C(1))-1)) > 0) -- ACCCHK_ASSERT(sizeof(lzo_uint32) >= 4) -- --#if !defined(__LZO_UINTPTR_T_IS_POINTER) -- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_uintptr_t) --#endif -- ACCCHK_ASSERT(sizeof(lzo_uintptr_t) >= sizeof(lzo_voidp)) -- -- ACCCHK_ASSERT_IS_UNSIGNED_T(lzo_xint) -- ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint32)) -- ACCCHK_ASSERT(sizeof(lzo_xint) >= sizeof(lzo_uint)) -- ACCCHK_ASSERT(sizeof(lzo_xint) == sizeof(lzo_uint32) || sizeof(lzo_xint) == sizeof(lzo_uint)) -- --#endif --#undef ACCCHK_ASSERT -- --#if 0 --#define u2p(ptr,off) ((lzo_voidp) (((lzo_bytep)(lzo_voidp)(ptr)) + (off))) --#else --static __lzo_noinline lzo_voidp u2p(lzo_voidp ptr, lzo_uint off) --{ -- return (lzo_voidp) ((lzo_bytep) ptr + off); --} --#endif -- --LZO_PUBLIC(int) --_lzo_config_check(void) --{ -- lzo_bool r = 1; -- union { -- lzo_xint a[2]; unsigned char b[2*sizeof(lzo_xint)]; -- unsigned short x[2]; lzo_uint32 y[2]; lzo_uint z[2]; -- } u; -- lzo_voidp p; -- -- u.a[0] = u.a[1] = 0; -- p = u2p(&u, 0); -- r &= ((* (lzo_bytep) p) == 0); --#if !defined(LZO_CFG_NO_CONFIG_CHECK) --#if defined(LZO_ABI_BIG_ENDIAN) -- u.a[0] = u.a[1] = 0; u.b[sizeof(lzo_uint) - 1] = 128; -- p = u2p(&u, 0); -- r &= ((* (lzo_uintp) p) == 128); --#endif --#if defined(LZO_ABI_LITTLE_ENDIAN) -- u.a[0] = u.a[1] = 0; u.b[0] = 128; -- p = u2p(&u, 0); -- r &= ((* (lzo_uintp) p) == 128); --#endif --#if defined(LZO_UNALIGNED_OK_2) -- u.a[0] = u.a[1] = 0; -- u.b[0] = 1; u.b[sizeof(unsigned short) + 1] = 2; -- p = u2p(&u, 1); -- r &= ((* (lzo_ushortp) p) == 0); --#endif --#if defined(LZO_UNALIGNED_OK_4) -- u.a[0] = u.a[1] = 0; -- u.b[0] = 3; u.b[sizeof(lzo_uint32) + 1] = 4; -- p = u2p(&u, 1); -- r &= ((* (lzo_uint32p) p) == 0); --#endif --#endif -- -- return r == 1 ? LZO_E_OK : LZO_E_ERROR; --} -- --LZO_PUBLIC(int) --__lzo_init_v2(unsigned v, int s1, int s2, int s3, int s4, int s5, -- int s6, int s7, int s8, int s9) --{ -- int r; -- --#if defined(__LZO_IN_MINILZO) --#elif (LZO_CC_MSC && ((_MSC_VER) < 700)) --#else --#define ACC_WANT_ACC_CHK_CH 1 --#undef ACCCHK_ASSERT --#define ACCCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr) --#endif --#undef ACCCHK_ASSERT -- -- if (v == 0) -- return LZO_E_ERROR; -- -- r = (s1 == -1 || s1 == (int) sizeof(short)) && -- (s2 == -1 || s2 == (int) sizeof(int)) && -- (s3 == -1 || s3 == (int) sizeof(long)) && -- (s4 == -1 || s4 == (int) sizeof(lzo_uint32)) && -- (s5 == -1 || s5 == (int) sizeof(lzo_uint)) && -- (s6 == -1 || s6 == (int) lzo_sizeof_dict_t) && -- (s7 == -1 || s7 == (int) sizeof(char *)) && -- (s8 == -1 || s8 == (int) sizeof(lzo_voidp)) && -- (s9 == -1 || s9 == (int) sizeof(lzo_callback_t)); -- if (!r) -- return LZO_E_ERROR; -- -- r = _lzo_config_check(); -- if (r != LZO_E_OK) -- return r; -- -- return r; --} -- --#if !defined(__LZO_IN_MINILZO) -- --#if (LZO_OS_WIN16 && LZO_CC_WATCOMC) && defined(__SW_BD) -- --#if 0 --BOOL FAR PASCAL LibMain ( HANDLE hInstance, WORD wDataSegment, -- WORD wHeapSize, LPSTR lpszCmdLine ) --#else --int __far __pascal LibMain ( int a, short b, short c, long d ) --#endif --{ -- LZO_UNUSED(a); LZO_UNUSED(b); LZO_UNUSED(c); LZO_UNUSED(d); -- return 1; --} -- --#endif -- --#endif -- --#endif -- --#define LZO1X 1 --#define LZO_EOF_CODE 1 --#define M2_MAX_OFFSET 0x0800 -- --#if !defined(MINILZO_CFG_SKIP_LZO1X_1_COMPRESS) -- --#define LZO_NEED_DICT_H 1 --#define D_BITS 14 --#define D_INDEX1(d,p) d = DM(DMUL(0x21,DX3(p,5,5,6)) >> 5) --#define D_INDEX2(d,p) d = (d & (D_MASK & 0x7ff)) ^ (D_HIGH | 0x1f) -- --#ifndef __LZO_CONFIG1X_H --#define __LZO_CONFIG1X_H 1 -- --#if !defined(LZO1X) && !defined(LZO1Y) && !defined(LZO1Z) --# define LZO1X 1 --#endif -- --#if !defined(__LZO_IN_MINILZO) --#include "lzo/lzo1x.h" --#endif -- --#ifndef LZO_EOF_CODE --#define LZO_EOF_CODE 1 --#endif --#undef LZO_DETERMINISTIC -- --#define M1_MAX_OFFSET 0x0400 --#ifndef M2_MAX_OFFSET --#define M2_MAX_OFFSET 0x0800 --#endif --#define M3_MAX_OFFSET 0x4000 --#define M4_MAX_OFFSET 0xbfff -- --#define MX_MAX_OFFSET (M1_MAX_OFFSET + M2_MAX_OFFSET) -- --#define M1_MIN_LEN 2 --#define M1_MAX_LEN 2 --#define M2_MIN_LEN 3 --#ifndef M2_MAX_LEN --#define M2_MAX_LEN 8 --#endif --#define M3_MIN_LEN 3 --#define M3_MAX_LEN 33 --#define M4_MIN_LEN 3 --#define M4_MAX_LEN 9 -- --#define M1_MARKER 0 --#define M2_MARKER 64 --#define M3_MARKER 32 --#define M4_MARKER 16 -- --#ifndef MIN_LOOKAHEAD --#define MIN_LOOKAHEAD (M2_MAX_LEN + 1) --#endif -- --#if defined(LZO_NEED_DICT_H) -- --#ifndef LZO_HASH --#define LZO_HASH LZO_HASH_LZO_INCREMENTAL_B --#endif --#define DL_MIN_LEN M2_MIN_LEN -- --#ifndef __LZO_DICT_H --#define __LZO_DICT_H 1 -- --#ifdef __cplusplus --extern "C" { --#endif -- --#if !defined(D_BITS) && defined(DBITS) --# define D_BITS DBITS --#endif --#if !defined(D_BITS) --# error "D_BITS is not defined" --#endif --#if (D_BITS < 16) --# define D_SIZE LZO_SIZE(D_BITS) --# define D_MASK LZO_MASK(D_BITS) --#else --# define D_SIZE LZO_USIZE(D_BITS) --# define D_MASK LZO_UMASK(D_BITS) --#endif --#define D_HIGH ((D_MASK >> 1) + 1) -- --#if !defined(DD_BITS) --# define DD_BITS 0 --#endif --#define DD_SIZE LZO_SIZE(DD_BITS) --#define DD_MASK LZO_MASK(DD_BITS) -- --#if !defined(DL_BITS) --# define DL_BITS (D_BITS - DD_BITS) --#endif --#if (DL_BITS < 16) --# define DL_SIZE LZO_SIZE(DL_BITS) --# define DL_MASK LZO_MASK(DL_BITS) --#else --# define DL_SIZE LZO_USIZE(DL_BITS) --# define DL_MASK LZO_UMASK(DL_BITS) --#endif -- --#if (D_BITS != DL_BITS + DD_BITS) --# error "D_BITS does not match" --#endif --#if (D_BITS < 6 || D_BITS > 18) --# error "invalid D_BITS" --#endif --#if (DL_BITS < 6 || DL_BITS > 20) --# error "invalid DL_BITS" --#endif --#if (DD_BITS < 0 || DD_BITS > 6) --# error "invalid DD_BITS" --#endif -- --#if !defined(DL_MIN_LEN) --# define DL_MIN_LEN 3 --#endif --#if !defined(DL_SHIFT) --# define DL_SHIFT ((DL_BITS + (DL_MIN_LEN - 1)) / DL_MIN_LEN) --#endif -- --#define LZO_HASH_GZIP 1 --#define LZO_HASH_GZIP_INCREMENTAL 2 --#define LZO_HASH_LZO_INCREMENTAL_A 3 --#define LZO_HASH_LZO_INCREMENTAL_B 4 -- --#if !defined(LZO_HASH) --# error "choose a hashing strategy" --#endif -- --#undef DM --#undef DX -- --#if (DL_MIN_LEN == 3) --# define _DV2_A(p,shift1,shift2) \ -- (((( (lzo_xint)((p)[0]) << shift1) ^ (p)[1]) << shift2) ^ (p)[2]) --# define _DV2_B(p,shift1,shift2) \ -- (((( (lzo_xint)((p)[2]) << shift1) ^ (p)[1]) << shift2) ^ (p)[0]) --# define _DV3_B(p,shift1,shift2,shift3) \ -- ((_DV2_B((p)+1,shift1,shift2) << (shift3)) ^ (p)[0]) --#elif (DL_MIN_LEN == 2) --# define _DV2_A(p,shift1,shift2) \ -- (( (lzo_xint)(p[0]) << shift1) ^ p[1]) --# define _DV2_B(p,shift1,shift2) \ -- (( (lzo_xint)(p[1]) << shift1) ^ p[2]) --#else --# error "invalid DL_MIN_LEN" --#endif --#define _DV_A(p,shift) _DV2_A(p,shift,shift) --#define _DV_B(p,shift) _DV2_B(p,shift,shift) --#define DA2(p,s1,s2) \ -- (((((lzo_xint)((p)[2]) << (s2)) + (p)[1]) << (s1)) + (p)[0]) --#define DS2(p,s1,s2) \ -- (((((lzo_xint)((p)[2]) << (s2)) - (p)[1]) << (s1)) - (p)[0]) --#define DX2(p,s1,s2) \ -- (((((lzo_xint)((p)[2]) << (s2)) ^ (p)[1]) << (s1)) ^ (p)[0]) --#define DA3(p,s1,s2,s3) ((DA2((p)+1,s2,s3) << (s1)) + (p)[0]) --#define DS3(p,s1,s2,s3) ((DS2((p)+1,s2,s3) << (s1)) - (p)[0]) --#define DX3(p,s1,s2,s3) ((DX2((p)+1,s2,s3) << (s1)) ^ (p)[0]) --#define DMS(v,s) ((lzo_uint) (((v) & (D_MASK >> (s))) << (s))) --#define DM(v) DMS(v,0) -- --#if (LZO_HASH == LZO_HASH_GZIP) --# define _DINDEX(dv,p) (_DV_A((p),DL_SHIFT)) -- --#elif (LZO_HASH == LZO_HASH_GZIP_INCREMENTAL) --# define __LZO_HASH_INCREMENTAL 1 --# define DVAL_FIRST(dv,p) dv = _DV_A((p),DL_SHIFT) --# define DVAL_NEXT(dv,p) dv = (((dv) << DL_SHIFT) ^ p[2]) --# define _DINDEX(dv,p) (dv) --# define DVAL_LOOKAHEAD DL_MIN_LEN -- --#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_A) --# define __LZO_HASH_INCREMENTAL 1 --# define DVAL_FIRST(dv,p) dv = _DV_A((p),5) --# define DVAL_NEXT(dv,p) \ -- dv ^= (lzo_xint)(p[-1]) << (2*5); dv = (((dv) << 5) ^ p[2]) --# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) --# define DVAL_LOOKAHEAD DL_MIN_LEN -- --#elif (LZO_HASH == LZO_HASH_LZO_INCREMENTAL_B) --# define __LZO_HASH_INCREMENTAL 1 --# define DVAL_FIRST(dv,p) dv = _DV_B((p),5) --# define DVAL_NEXT(dv,p) \ -- dv ^= p[-1]; dv = (((dv) >> 5) ^ ((lzo_xint)(p[2]) << (2*5))) --# define _DINDEX(dv,p) ((DMUL(0x9f5f,dv)) >> 5) --# define DVAL_LOOKAHEAD DL_MIN_LEN -- --#else --# error "choose a hashing strategy" --#endif -- --#ifndef DINDEX --#define DINDEX(dv,p) ((lzo_uint)((_DINDEX(dv,p)) & DL_MASK) << DD_BITS) --#endif --#if !defined(DINDEX1) && defined(D_INDEX1) --#define DINDEX1 D_INDEX1 --#endif --#if !defined(DINDEX2) && defined(D_INDEX2) --#define DINDEX2 D_INDEX2 --#endif -- --#if !defined(__LZO_HASH_INCREMENTAL) --# define DVAL_FIRST(dv,p) ((void) 0) --# define DVAL_NEXT(dv,p) ((void) 0) --# define DVAL_LOOKAHEAD 0 --#endif -- --#if !defined(DVAL_ASSERT) --#if defined(__LZO_HASH_INCREMENTAL) && !defined(NDEBUG) --#if (LZO_CC_CLANG || (LZO_CC_GNUC >= 0x020700ul) || LZO_CC_LLVM) --static void __attribute__((__unused__)) --#else --static void --#endif --DVAL_ASSERT(lzo_xint dv, const lzo_bytep p) --{ -- lzo_xint df; -- DVAL_FIRST(df,(p)); -- assert(DINDEX(dv,p) == DINDEX(df,p)); --} --#else --# define DVAL_ASSERT(dv,p) ((void) 0) --#endif --#endif -- --#if defined(LZO_DICT_USE_PTR) --# define DENTRY(p,in) (p) --# define GINDEX(m_pos,m_off,dict,dindex,in) m_pos = dict[dindex] --#else --# define DENTRY(p,in) ((lzo_uint) ((p)-(in))) --# define GINDEX(m_pos,m_off,dict,dindex,in) m_off = dict[dindex] --#endif -- --#if (DD_BITS == 0) -- --# define UPDATE_D(dict,drun,dv,p,in) dict[ DINDEX(dv,p) ] = DENTRY(p,in) --# define UPDATE_I(dict,drun,index,p,in) dict[index] = DENTRY(p,in) --# define UPDATE_P(ptr,drun,p,in) (ptr)[0] = DENTRY(p,in) -- --#else -- --# define UPDATE_D(dict,drun,dv,p,in) \ -- dict[ DINDEX(dv,p) + drun++ ] = DENTRY(p,in); drun &= DD_MASK --# define UPDATE_I(dict,drun,index,p,in) \ -- dict[ (index) + drun++ ] = DENTRY(p,in); drun &= DD_MASK --# define UPDATE_P(ptr,drun,p,in) \ -- (ptr) [ drun++ ] = DENTRY(p,in); drun &= DD_MASK -- --#endif -- --#if defined(LZO_DICT_USE_PTR) -- --#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ -- (m_pos == NULL || (m_off = pd(ip, m_pos)) > max_offset) -- --#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ -- (BOUNDS_CHECKING_OFF_IN_EXPR(( \ -- m_pos = ip - (lzo_uint) PTR_DIFF(ip,m_pos), \ -- PTR_LT(m_pos,in) || \ -- (m_off = (lzo_uint) PTR_DIFF(ip,m_pos)) == 0 || \ -- m_off > max_offset ))) -- --#else -- --#define LZO_CHECK_MPOS_DET(m_pos,m_off,in,ip,max_offset) \ -- (m_off == 0 || \ -- ((m_off = pd(ip, in) - m_off) > max_offset) || \ -- (m_pos = (ip) - (m_off), 0) ) -- --#define LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,max_offset) \ -- (pd(ip, in) <= m_off || \ -- ((m_off = pd(ip, in) - m_off) > max_offset) || \ -- (m_pos = (ip) - (m_off), 0) ) -- --#endif -- --#if defined(LZO_DETERMINISTIC) --# define LZO_CHECK_MPOS LZO_CHECK_MPOS_DET --#else --# define LZO_CHECK_MPOS LZO_CHECK_MPOS_NON_DET --#endif -- --#ifdef __cplusplus --} --#endif -- --#endif -- --#endif -- --#endif -- --#define do_compress _lzo1x_1_do_compress --#define DO_COMPRESS lzo1x_1_compress -- --#if 1 && defined(DO_COMPRESS) && !defined(do_compress) --# define do_compress LZO_CPP_ECONCAT2(DO_COMPRESS,_core) --#endif -- --static __lzo_noinline lzo_uint --do_compress ( const lzo_bytep in , lzo_uint in_len, -- lzo_bytep out, lzo_uintp out_len, -- lzo_voidp wrkmem ) --{ -- register const lzo_bytep ip; -- lzo_bytep op; -- const lzo_bytep const in_end = in + in_len; -- const lzo_bytep const ip_end = in + in_len - M2_MAX_LEN - 5; -- const lzo_bytep ii; -- lzo_dict_p const dict = (lzo_dict_p) wrkmem; -- -- op = out; -- ip = in; -- ii = ip; -- -- ip += 4; -- for (;;) -- { -- register const lzo_bytep m_pos; -- LZO_DEFINE_UNINITIALIZED_VAR(lzo_uint, m_off, 0); -- lzo_uint m_len; -- lzo_uint dindex; -- -- DINDEX1(dindex,ip); -- GINDEX(m_pos,m_off,dict,dindex,in); -- if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) -- goto literal; --#if 1 -- if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) -- goto try_match; -- DINDEX2(dindex,ip); --#endif -- GINDEX(m_pos,m_off,dict,dindex,in); -- if (LZO_CHECK_MPOS_NON_DET(m_pos,m_off,in,ip,M4_MAX_OFFSET)) -- goto literal; -- if (m_off <= M2_MAX_OFFSET || m_pos[3] == ip[3]) -- goto try_match; -- goto literal; -- --try_match: --#if 1 && defined(LZO_UNALIGNED_OK_2) -- if (* (const lzo_ushortp) (const lzo_voidp) m_pos != * (const lzo_ushortp) (const lzo_voidp) ip) --#else -- if (m_pos[0] != ip[0] || m_pos[1] != ip[1]) --#endif -- { -- } -- else -- { -- if __lzo_likely(m_pos[2] == ip[2]) -- { --#if 0 -- if (m_off <= M2_MAX_OFFSET) -- goto match; -- if (lit <= 3) -- goto match; -- if (lit == 3) -- { -- assert(op - 2 > out); op[-2] |= LZO_BYTE(3); -- *op++ = *ii++; *op++ = *ii++; *op++ = *ii++; -- goto code_match; -- } -- if (m_pos[3] == ip[3]) --#endif -- goto match; -- } -- else -- { --#if 0 --#if 0 -- if (m_off <= M1_MAX_OFFSET && lit > 0 && lit <= 3) --#else -- if (m_off <= M1_MAX_OFFSET && lit == 3) --#endif -- { -- register lzo_uint t; -- -- t = lit; -- assert(op - 2 > out); op[-2] |= LZO_BYTE(t); -- do *op++ = *ii++; while (--t > 0); -- assert(ii == ip); -- m_off -= 1; -- *op++ = LZO_BYTE(M1_MARKER | ((m_off & 3) << 2)); -- *op++ = LZO_BYTE(m_off >> 2); -- ip += 2; -- goto match_done; -- } --#endif -- } -- } -- --literal: -- UPDATE_I(dict,0,dindex,ip,in); -- ++ip; -- if __lzo_unlikely(ip >= ip_end) -- break; -- continue; -- --match: -- UPDATE_I(dict,0,dindex,ip,in); -- if (pd(ip,ii) > 0) -- { -- register lzo_uint t = pd(ip,ii); -- -- if (t <= 3) -- { -- assert(op - 2 > out); -- op[-2] |= LZO_BYTE(t); -- } -- else if (t <= 18) -- *op++ = LZO_BYTE(t - 3); -- else -- { -- register lzo_uint tt = t - 18; -- -- *op++ = 0; -- while (tt > 255) -- { -- tt -= 255; -- *op++ = 0; -- } -- assert(tt > 0); -- *op++ = LZO_BYTE(tt); -- } -- do *op++ = *ii++; while (--t > 0); -- } -- -- assert(ii == ip); -- ip += 3; -- if (m_pos[3] != *ip++ || m_pos[4] != *ip++ || m_pos[5] != *ip++ || -- m_pos[6] != *ip++ || m_pos[7] != *ip++ || m_pos[8] != *ip++ --#ifdef LZO1Y -- || m_pos[ 9] != *ip++ || m_pos[10] != *ip++ || m_pos[11] != *ip++ -- || m_pos[12] != *ip++ || m_pos[13] != *ip++ || m_pos[14] != *ip++ --#endif -- ) -- { -- --ip; -- m_len = pd(ip, ii); -- assert(m_len >= 3); assert(m_len <= M2_MAX_LEN); -- -- if (m_off <= M2_MAX_OFFSET) -- { -- m_off -= 1; --#if defined(LZO1X) -- *op++ = LZO_BYTE(((m_len - 1) << 5) | ((m_off & 7) << 2)); -- *op++ = LZO_BYTE(m_off >> 3); --#elif defined(LZO1Y) -- *op++ = LZO_BYTE(((m_len + 1) << 4) | ((m_off & 3) << 2)); -- *op++ = LZO_BYTE(m_off >> 2); --#endif -- } -- else if (m_off <= M3_MAX_OFFSET) -- { -- m_off -= 1; -- *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); -- goto m3_m4_offset; -- } -- else --#if defined(LZO1X) -- { -- m_off -= 0x4000; -- assert(m_off > 0); assert(m_off <= 0x7fff); -- *op++ = LZO_BYTE(M4_MARKER | -- ((m_off & 0x4000) >> 11) | (m_len - 2)); -- goto m3_m4_offset; -- } --#elif defined(LZO1Y) -- goto m4_match; --#endif -- } -- else -- { -- { -- const lzo_bytep end = in_end; -- const lzo_bytep m = m_pos + M2_MAX_LEN + 1; -- while (ip < end && *m == *ip) -- m++, ip++; -- m_len = pd(ip, ii); -- } -- assert(m_len > M2_MAX_LEN); -- -- if (m_off <= M3_MAX_OFFSET) -- { -- m_off -= 1; -- if (m_len <= 33) -- *op++ = LZO_BYTE(M3_MARKER | (m_len - 2)); -- else -- { -- m_len -= 33; -- *op++ = M3_MARKER | 0; -- goto m3_m4_len; -- } -- } -- else -- { --#if defined(LZO1Y) --m4_match: --#endif -- m_off -= 0x4000; -- assert(m_off > 0); assert(m_off <= 0x7fff); -- if (m_len <= M4_MAX_LEN) -- *op++ = LZO_BYTE(M4_MARKER | -- ((m_off & 0x4000) >> 11) | (m_len - 2)); -- else -- { -- m_len -= M4_MAX_LEN; -- *op++ = LZO_BYTE(M4_MARKER | ((m_off & 0x4000) >> 11)); --m3_m4_len: -- while (m_len > 255) -- { -- m_len -= 255; -- *op++ = 0; -- } -- assert(m_len > 0); -- *op++ = LZO_BYTE(m_len); -- } -- } -- --m3_m4_offset: -- *op++ = LZO_BYTE((m_off & 63) << 2); -- *op++ = LZO_BYTE(m_off >> 6); -- } -- --#if 0 --match_done: --#endif -- ii = ip; -- if __lzo_unlikely(ip >= ip_end) -- break; -- } -- -- *out_len = pd(op, out); -- return pd(in_end,ii); --} -- --LZO_PUBLIC(int) --DO_COMPRESS ( const lzo_bytep in , lzo_uint in_len, -- lzo_bytep out, lzo_uintp out_len, -- lzo_voidp wrkmem ) --{ -- lzo_bytep op = out; -- lzo_uint t; -- -- if __lzo_unlikely(in_len <= M2_MAX_LEN + 5) -- t = in_len; -- else -- { -- t = do_compress(in,in_len,op,out_len,wrkmem); -- op += *out_len; -- } -- -- if (t > 0) -- { -- const lzo_bytep ii = in + in_len - t; -- -- if (op == out && t <= 238) -- *op++ = LZO_BYTE(17 + t); -- else if (t <= 3) -- op[-2] |= LZO_BYTE(t); -- else if (t <= 18) -- *op++ = LZO_BYTE(t - 3); -- else -- { -- lzo_uint tt = t - 18; -- -- *op++ = 0; -- while (tt > 255) -- { -- tt -= 255; -- *op++ = 0; -- } -- assert(tt > 0); -- *op++ = LZO_BYTE(tt); -- } -- do *op++ = *ii++; while (--t > 0); -- } -- -- *op++ = M4_MARKER | 1; -- *op++ = 0; -- *op++ = 0; -- -- *out_len = pd(op, out); -- return LZO_E_OK; --} -- --#endif -- --#undef do_compress --#undef DO_COMPRESS --#undef LZO_HASH -- --#undef LZO_TEST_OVERRUN --#undef DO_DECOMPRESS --#define DO_DECOMPRESS lzo1x_decompress -- --#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS) -- --#if defined(LZO_TEST_OVERRUN) --# if !defined(LZO_TEST_OVERRUN_INPUT) --# define LZO_TEST_OVERRUN_INPUT 2 --# endif --# if !defined(LZO_TEST_OVERRUN_OUTPUT) --# define LZO_TEST_OVERRUN_OUTPUT 2 --# endif --# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) --# define LZO_TEST_OVERRUN_LOOKBEHIND 1 --# endif --#endif -- --#undef TEST_IP --#undef TEST_OP --#undef TEST_LB --#undef TEST_LBO --#undef NEED_IP --#undef NEED_OP --#undef HAVE_TEST_IP --#undef HAVE_TEST_OP --#undef HAVE_NEED_IP --#undef HAVE_NEED_OP --#undef HAVE_ANY_IP --#undef HAVE_ANY_OP -- --#if defined(LZO_TEST_OVERRUN_INPUT) --# if (LZO_TEST_OVERRUN_INPUT >= 1) --# define TEST_IP (ip < ip_end) --# endif --# if (LZO_TEST_OVERRUN_INPUT >= 2) --# define NEED_IP(x) \ -- if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun --# endif --#endif -- --#if defined(LZO_TEST_OVERRUN_OUTPUT) --# if (LZO_TEST_OVERRUN_OUTPUT >= 1) --# define TEST_OP (op <= op_end) --# endif --# if (LZO_TEST_OVERRUN_OUTPUT >= 2) --# undef TEST_OP --# define NEED_OP(x) \ -- if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun --# endif --#endif -- --#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) --# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun --# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun --#else --# define TEST_LB(m_pos) ((void) 0) --# define TEST_LBO(m_pos,o) ((void) 0) --#endif -- --#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) --# define TEST_IP (ip < ip_end) --#endif -- --#if defined(TEST_IP) --# define HAVE_TEST_IP 1 --#else --# define TEST_IP 1 --#endif --#if defined(TEST_OP) --# define HAVE_TEST_OP 1 --#else --# define TEST_OP 1 --#endif -- --#if defined(NEED_IP) --# define HAVE_NEED_IP 1 --#else --# define NEED_IP(x) ((void) 0) --#endif --#if defined(NEED_OP) --# define HAVE_NEED_OP 1 --#else --# define NEED_OP(x) ((void) 0) --#endif -- --#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) --# define HAVE_ANY_IP 1 --#endif --#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) --# define HAVE_ANY_OP 1 --#endif -- --#if defined(DO_DECOMPRESS) --LZO_PUBLIC(int) --DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, -- lzo_bytep out, lzo_uintp out_len, -- lzo_voidp wrkmem ) --#endif --{ -- register lzo_bytep op; -- register const lzo_bytep ip; -- register lzo_uint t; --#if defined(COPY_DICT) -- lzo_uint m_off; -- const lzo_bytep dict_end; --#else -- register const lzo_bytep m_pos; --#endif -- -- const lzo_bytep const ip_end = in + in_len; --#if defined(HAVE_ANY_OP) -- lzo_bytep const op_end = out + *out_len; --#endif --#if defined(LZO1Z) -- lzo_uint last_m_off = 0; --#endif -- -- LZO_UNUSED(wrkmem); -- --#if defined(COPY_DICT) -- if (dict) -- { -- if (dict_len > M4_MAX_OFFSET) -- { -- dict += dict_len - M4_MAX_OFFSET; -- dict_len = M4_MAX_OFFSET; -- } -- dict_end = dict + dict_len; -- } -- else -- { -- dict_len = 0; -- dict_end = NULL; -- } --#endif -- -- *out_len = 0; -- -- op = out; -- ip = in; -- -- if (*ip > 17) -- { -- t = *ip++ - 17; -- if (t < 4) -- goto match_next; -- assert(t > 0); NEED_OP(t); NEED_IP(t+1); -- do *op++ = *ip++; while (--t > 0); -- goto first_literal_run; -- } -- -- while (TEST_IP && TEST_OP) -- { -- t = *ip++; -- if (t >= 16) -- goto match; -- if (t == 0) -- { -- NEED_IP(1); -- while (*ip == 0) -- { -- t += 255; -- ip++; -- NEED_IP(1); -- } -- t += 15 + *ip++; -- } -- assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); --#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) --#if !defined(LZO_UNALIGNED_OK_4) -- if (PTR_ALIGNED2_4(op,ip)) -- { --#endif -- COPY4(op,ip); -- op += 4; ip += 4; -- if (--t > 0) -- { -- if (t >= 4) -- { -- do { -- COPY4(op,ip); -- op += 4; ip += 4; t -= 4; -- } while (t >= 4); -- if (t > 0) do *op++ = *ip++; while (--t > 0); -- } -- else -- do *op++ = *ip++; while (--t > 0); -- } --#if !defined(LZO_UNALIGNED_OK_4) -- } -- else --#endif --#endif --#if !defined(LZO_UNALIGNED_OK_4) -- { -- *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; -- do *op++ = *ip++; while (--t > 0); -- } --#endif -- --first_literal_run: -- -- t = *ip++; -- if (t >= 16) -- goto match; --#if defined(COPY_DICT) --#if defined(LZO1Z) -- m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); -- last_m_off = m_off; --#else -- m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); --#endif -- NEED_OP(3); -- t = 3; COPY_DICT(t,m_off) --#else --#if defined(LZO1Z) -- t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); -- m_pos = op - t; -- last_m_off = t; --#else -- m_pos = op - (1 + M2_MAX_OFFSET); -- m_pos -= t >> 2; -- m_pos -= *ip++ << 2; --#endif -- TEST_LB(m_pos); NEED_OP(3); -- *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; --#endif -- goto match_done; -- -- do { --match: -- if (t >= 64) -- { --#if defined(COPY_DICT) --#if defined(LZO1X) -- m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); -- t = (t >> 5) - 1; --#elif defined(LZO1Y) -- m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); -- t = (t >> 4) - 3; --#elif defined(LZO1Z) -- m_off = t & 0x1f; -- if (m_off >= 0x1c) -- m_off = last_m_off; -- else -- { -- m_off = 1 + (m_off << 6) + (*ip++ >> 2); -- last_m_off = m_off; -- } -- t = (t >> 5) - 1; --#endif --#else --#if defined(LZO1X) -- m_pos = op - 1; -- m_pos -= (t >> 2) & 7; -- m_pos -= *ip++ << 3; -- t = (t >> 5) - 1; --#elif defined(LZO1Y) -- m_pos = op - 1; -- m_pos -= (t >> 2) & 3; -- m_pos -= *ip++ << 2; -- t = (t >> 4) - 3; --#elif defined(LZO1Z) -- { -- lzo_uint off = t & 0x1f; -- m_pos = op; -- if (off >= 0x1c) -- { -- assert(last_m_off > 0); -- m_pos -= last_m_off; -- } -- else -- { -- off = 1 + (off << 6) + (*ip++ >> 2); -- m_pos -= off; -- last_m_off = off; -- } -- } -- t = (t >> 5) - 1; --#endif -- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); -- goto copy_match; --#endif -- } -- else if (t >= 32) -- { -- t &= 31; -- if (t == 0) -- { -- NEED_IP(1); -- while (*ip == 0) -- { -- t += 255; -- ip++; -- NEED_IP(1); -- } -- t += 31 + *ip++; -- } --#if defined(COPY_DICT) --#if defined(LZO1Z) -- m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); -- last_m_off = m_off; --#else -- m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); --#endif --#else --#if defined(LZO1Z) -- { -- lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); -- m_pos = op - off; -- last_m_off = off; -- } --#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) -- m_pos = op - 1; -- m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; --#else -- m_pos = op - 1; -- m_pos -= (ip[0] >> 2) + (ip[1] << 6); --#endif --#endif -- ip += 2; -- } -- else if (t >= 16) -- { --#if defined(COPY_DICT) -- m_off = (t & 8) << 11; --#else -- m_pos = op; -- m_pos -= (t & 8) << 11; --#endif -- t &= 7; -- if (t == 0) -- { -- NEED_IP(1); -- while (*ip == 0) -- { -- t += 255; -- ip++; -- NEED_IP(1); -- } -- t += 7 + *ip++; -- } --#if defined(COPY_DICT) --#if defined(LZO1Z) -- m_off += (ip[0] << 6) + (ip[1] >> 2); --#else -- m_off += (ip[0] >> 2) + (ip[1] << 6); --#endif -- ip += 2; -- if (m_off == 0) -- goto eof_found; -- m_off += 0x4000; --#if defined(LZO1Z) -- last_m_off = m_off; --#endif --#else --#if defined(LZO1Z) -- m_pos -= (ip[0] << 6) + (ip[1] >> 2); --#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) -- m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; --#else -- m_pos -= (ip[0] >> 2) + (ip[1] << 6); --#endif -- ip += 2; -- if (m_pos == op) -- goto eof_found; -- m_pos -= 0x4000; --#if defined(LZO1Z) -- last_m_off = pd((const lzo_bytep)op, m_pos); --#endif --#endif -- } -- else -- { --#if defined(COPY_DICT) --#if defined(LZO1Z) -- m_off = 1 + (t << 6) + (*ip++ >> 2); -- last_m_off = m_off; --#else -- m_off = 1 + (t >> 2) + (*ip++ << 2); --#endif -- NEED_OP(2); -- t = 2; COPY_DICT(t,m_off) --#else --#if defined(LZO1Z) -- t = 1 + (t << 6) + (*ip++ >> 2); -- m_pos = op - t; -- last_m_off = t; --#else -- m_pos = op - 1; -- m_pos -= t >> 2; -- m_pos -= *ip++ << 2; --#endif -- TEST_LB(m_pos); NEED_OP(2); -- *op++ = *m_pos++; *op++ = *m_pos; --#endif -- goto match_done; -- } -- --#if defined(COPY_DICT) -- -- NEED_OP(t+3-1); -- t += 3-1; COPY_DICT(t,m_off) -- --#else -- -- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); --#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) --#if !defined(LZO_UNALIGNED_OK_4) -- if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) -- { -- assert((op - m_pos) >= 4); --#else -- if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) -- { --#endif -- COPY4(op,m_pos); -- op += 4; m_pos += 4; t -= 4 - (3 - 1); -- do { -- COPY4(op,m_pos); -- op += 4; m_pos += 4; t -= 4; -- } while (t >= 4); -- if (t > 0) do *op++ = *m_pos++; while (--t > 0); -- } -- else --#endif -- { --copy_match: -- *op++ = *m_pos++; *op++ = *m_pos++; -- do *op++ = *m_pos++; while (--t > 0); -- } -- --#endif -- --match_done: --#if defined(LZO1Z) -- t = ip[-1] & 3; --#else -- t = ip[-2] & 3; --#endif -- if (t == 0) -- break; -- --match_next: -- assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); --#if 0 -- do *op++ = *ip++; while (--t > 0); --#else -- *op++ = *ip++; -- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } --#endif -- t = *ip++; -- } while (TEST_IP && TEST_OP); -- } -- --#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) -- *out_len = pd(op, out); -- return LZO_E_EOF_NOT_FOUND; --#endif -- --eof_found: -- assert(t == 1); -- *out_len = pd(op, out); -- return (ip == ip_end ? LZO_E_OK : -- (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); -- --#if defined(HAVE_NEED_IP) --input_overrun: -- *out_len = pd(op, out); -- return LZO_E_INPUT_OVERRUN; --#endif -- --#if defined(HAVE_NEED_OP) --output_overrun: -- *out_len = pd(op, out); -- return LZO_E_OUTPUT_OVERRUN; --#endif -- --#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) --lookbehind_overrun: -- *out_len = pd(op, out); -- return LZO_E_LOOKBEHIND_OVERRUN; --#endif --} -- --#endif -- --#define LZO_TEST_OVERRUN 1 --#undef DO_DECOMPRESS --#define DO_DECOMPRESS lzo1x_decompress_safe -- --#if !defined(MINILZO_CFG_SKIP_LZO1X_DECOMPRESS_SAFE) -- --#if defined(LZO_TEST_OVERRUN) --# if !defined(LZO_TEST_OVERRUN_INPUT) --# define LZO_TEST_OVERRUN_INPUT 2 --# endif --# if !defined(LZO_TEST_OVERRUN_OUTPUT) --# define LZO_TEST_OVERRUN_OUTPUT 2 --# endif --# if !defined(LZO_TEST_OVERRUN_LOOKBEHIND) --# define LZO_TEST_OVERRUN_LOOKBEHIND 1 --# endif --#endif -- --#undef TEST_IP --#undef TEST_OP --#undef TEST_LB --#undef TEST_LBO --#undef NEED_IP --#undef NEED_OP --#undef HAVE_TEST_IP --#undef HAVE_TEST_OP --#undef HAVE_NEED_IP --#undef HAVE_NEED_OP --#undef HAVE_ANY_IP --#undef HAVE_ANY_OP -- --#if defined(LZO_TEST_OVERRUN_INPUT) --# if (LZO_TEST_OVERRUN_INPUT >= 1) --# define TEST_IP (ip < ip_end) --# endif --# if (LZO_TEST_OVERRUN_INPUT >= 2) --# define NEED_IP(x) \ -- if ((lzo_uint)(ip_end - ip) < (lzo_uint)(x)) goto input_overrun --# endif --#endif -- --#if defined(LZO_TEST_OVERRUN_OUTPUT) --# if (LZO_TEST_OVERRUN_OUTPUT >= 1) --# define TEST_OP (op <= op_end) --# endif --# if (LZO_TEST_OVERRUN_OUTPUT >= 2) --# undef TEST_OP --# define NEED_OP(x) \ -- if ((lzo_uint)(op_end - op) < (lzo_uint)(x)) goto output_overrun --# endif --#endif -- --#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) --# define TEST_LB(m_pos) if (m_pos < out || m_pos >= op) goto lookbehind_overrun --# define TEST_LBO(m_pos,o) if (m_pos < out || m_pos >= op - (o)) goto lookbehind_overrun --#else --# define TEST_LB(m_pos) ((void) 0) --# define TEST_LBO(m_pos,o) ((void) 0) --#endif -- --#if !defined(LZO_EOF_CODE) && !defined(TEST_IP) --# define TEST_IP (ip < ip_end) --#endif -- --#if defined(TEST_IP) --# define HAVE_TEST_IP 1 --#else --# define TEST_IP 1 --#endif --#if defined(TEST_OP) --# define HAVE_TEST_OP 1 --#else --# define TEST_OP 1 --#endif -- --#if defined(NEED_IP) --# define HAVE_NEED_IP 1 --#else --# define NEED_IP(x) ((void) 0) --#endif --#if defined(NEED_OP) --# define HAVE_NEED_OP 1 --#else --# define NEED_OP(x) ((void) 0) --#endif -- --#if defined(HAVE_TEST_IP) || defined(HAVE_NEED_IP) --# define HAVE_ANY_IP 1 --#endif --#if defined(HAVE_TEST_OP) || defined(HAVE_NEED_OP) --# define HAVE_ANY_OP 1 --#endif -- --#if defined(DO_DECOMPRESS) --LZO_PUBLIC(int) --DO_DECOMPRESS ( const lzo_bytep in , lzo_uint in_len, -- lzo_bytep out, lzo_uintp out_len, -- lzo_voidp wrkmem ) --#endif --{ -- register lzo_bytep op; -- register const lzo_bytep ip; -- register lzo_uint t; --#if defined(COPY_DICT) -- lzo_uint m_off; -- const lzo_bytep dict_end; --#else -- register const lzo_bytep m_pos; --#endif -- -- const lzo_bytep const ip_end = in + in_len; --#if defined(HAVE_ANY_OP) -- lzo_bytep const op_end = out + *out_len; --#endif --#if defined(LZO1Z) -- lzo_uint last_m_off = 0; --#endif -- -- LZO_UNUSED(wrkmem); -- --#if defined(COPY_DICT) -- if (dict) -- { -- if (dict_len > M4_MAX_OFFSET) -- { -- dict += dict_len - M4_MAX_OFFSET; -- dict_len = M4_MAX_OFFSET; -- } -- dict_end = dict + dict_len; -- } -- else -- { -- dict_len = 0; -- dict_end = NULL; -- } --#endif -- -- *out_len = 0; -- -- op = out; -- ip = in; -- -- if (*ip > 17) -- { -- t = *ip++ - 17; -- if (t < 4) -- goto match_next; -- assert(t > 0); NEED_OP(t); NEED_IP(t+1); -- do *op++ = *ip++; while (--t > 0); -- goto first_literal_run; -- } -- -- while (TEST_IP && TEST_OP) -- { -- t = *ip++; -- if (t >= 16) -- goto match; -- if (t == 0) -- { -- NEED_IP(1); -- while (*ip == 0) -- { -- t += 255; -- ip++; -- NEED_IP(1); -- } -- t += 15 + *ip++; -- } -- assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); --#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) --#if !defined(LZO_UNALIGNED_OK_4) -- if (PTR_ALIGNED2_4(op,ip)) -- { --#endif -- COPY4(op,ip); -- op += 4; ip += 4; -- if (--t > 0) -- { -- if (t >= 4) -- { -- do { -- COPY4(op,ip); -- op += 4; ip += 4; t -= 4; -- } while (t >= 4); -- if (t > 0) do *op++ = *ip++; while (--t > 0); -- } -- else -- do *op++ = *ip++; while (--t > 0); -- } --#if !defined(LZO_UNALIGNED_OK_4) -- } -- else --#endif --#endif --#if !defined(LZO_UNALIGNED_OK_4) -- { -- *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; -- do *op++ = *ip++; while (--t > 0); -- } --#endif -- --first_literal_run: -- -- t = *ip++; -- if (t >= 16) -- goto match; --#if defined(COPY_DICT) --#if defined(LZO1Z) -- m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); -- last_m_off = m_off; --#else -- m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); --#endif -- NEED_OP(3); -- t = 3; COPY_DICT(t,m_off) --#else --#if defined(LZO1Z) -- t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); -- m_pos = op - t; -- last_m_off = t; --#else -- m_pos = op - (1 + M2_MAX_OFFSET); -- m_pos -= t >> 2; -- m_pos -= *ip++ << 2; --#endif -- TEST_LB(m_pos); NEED_OP(3); -- *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; --#endif -- goto match_done; -- -- do { --match: -- if (t >= 64) -- { --#if defined(COPY_DICT) --#if defined(LZO1X) -- m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); -- t = (t >> 5) - 1; --#elif defined(LZO1Y) -- m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); -- t = (t >> 4) - 3; --#elif defined(LZO1Z) -- m_off = t & 0x1f; -- if (m_off >= 0x1c) -- m_off = last_m_off; -- else -- { -- m_off = 1 + (m_off << 6) + (*ip++ >> 2); -- last_m_off = m_off; -- } -- t = (t >> 5) - 1; --#endif --#else --#if defined(LZO1X) -- m_pos = op - 1; -- m_pos -= (t >> 2) & 7; -- m_pos -= *ip++ << 3; -- t = (t >> 5) - 1; --#elif defined(LZO1Y) -- m_pos = op - 1; -- m_pos -= (t >> 2) & 3; -- m_pos -= *ip++ << 2; -- t = (t >> 4) - 3; --#elif defined(LZO1Z) -- { -- lzo_uint off = t & 0x1f; -- m_pos = op; -- if (off >= 0x1c) -- { -- assert(last_m_off > 0); -- m_pos -= last_m_off; -- } -- else -- { -- off = 1 + (off << 6) + (*ip++ >> 2); -- m_pos -= off; -- last_m_off = off; -- } -- } -- t = (t >> 5) - 1; --#endif -- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); -- goto copy_match; --#endif -- } -- else if (t >= 32) -- { -- t &= 31; -- if (t == 0) -- { -- NEED_IP(1); -- while (*ip == 0) -- { -- t += 255; -- ip++; -- NEED_IP(1); -- } -- t += 31 + *ip++; -- } --#if defined(COPY_DICT) --#if defined(LZO1Z) -- m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); -- last_m_off = m_off; --#else -- m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); --#endif --#else --#if defined(LZO1Z) -- { -- lzo_uint off = 1 + (ip[0] << 6) + (ip[1] >> 2); -- m_pos = op - off; -- last_m_off = off; -- } --#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) -- m_pos = op - 1; -- m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; --#else -- m_pos = op - 1; -- m_pos -= (ip[0] >> 2) + (ip[1] << 6); --#endif --#endif -- ip += 2; -- } -- else if (t >= 16) -- { --#if defined(COPY_DICT) -- m_off = (t & 8) << 11; --#else -- m_pos = op; -- m_pos -= (t & 8) << 11; --#endif -- t &= 7; -- if (t == 0) -- { -- NEED_IP(1); -- while (*ip == 0) -- { -- t += 255; -- ip++; -- NEED_IP(1); -- } -- t += 7 + *ip++; -- } --#if defined(COPY_DICT) --#if defined(LZO1Z) -- m_off += (ip[0] << 6) + (ip[1] >> 2); --#else -- m_off += (ip[0] >> 2) + (ip[1] << 6); --#endif -- ip += 2; -- if (m_off == 0) -- goto eof_found; -- m_off += 0x4000; --#if defined(LZO1Z) -- last_m_off = m_off; --#endif --#else --#if defined(LZO1Z) -- m_pos -= (ip[0] << 6) + (ip[1] >> 2); --#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) -- m_pos -= (* (const lzo_ushortp) (const lzo_voidp) ip) >> 2; --#else -- m_pos -= (ip[0] >> 2) + (ip[1] << 6); --#endif -- ip += 2; -- if (m_pos == op) -- goto eof_found; -- m_pos -= 0x4000; --#if defined(LZO1Z) -- last_m_off = pd((const lzo_bytep)op, m_pos); --#endif --#endif -- } -- else -- { --#if defined(COPY_DICT) --#if defined(LZO1Z) -- m_off = 1 + (t << 6) + (*ip++ >> 2); -- last_m_off = m_off; --#else -- m_off = 1 + (t >> 2) + (*ip++ << 2); --#endif -- NEED_OP(2); -- t = 2; COPY_DICT(t,m_off) --#else --#if defined(LZO1Z) -- t = 1 + (t << 6) + (*ip++ >> 2); -- m_pos = op - t; -- last_m_off = t; --#else -- m_pos = op - 1; -- m_pos -= t >> 2; -- m_pos -= *ip++ << 2; --#endif -- TEST_LB(m_pos); NEED_OP(2); -- *op++ = *m_pos++; *op++ = *m_pos; --#endif -- goto match_done; -- } -- --#if defined(COPY_DICT) -- -- NEED_OP(t+3-1); -- t += 3-1; COPY_DICT(t,m_off) -- --#else -- -- TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); --#if defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) --#if !defined(LZO_UNALIGNED_OK_4) -- if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op,m_pos)) -- { -- assert((op - m_pos) >= 4); --#else -- if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) -- { --#endif -- COPY4(op,m_pos); -- op += 4; m_pos += 4; t -= 4 - (3 - 1); -- do { -- COPY4(op,m_pos); -- op += 4; m_pos += 4; t -= 4; -- } while (t >= 4); -- if (t > 0) do *op++ = *m_pos++; while (--t > 0); -- } -- else --#endif -- { --copy_match: -- *op++ = *m_pos++; *op++ = *m_pos++; -- do *op++ = *m_pos++; while (--t > 0); -- } -- --#endif -- --match_done: --#if defined(LZO1Z) -- t = ip[-1] & 3; --#else -- t = ip[-2] & 3; --#endif -- if (t == 0) -- break; -- --match_next: -- assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); --#if 0 -- do *op++ = *ip++; while (--t > 0); --#else -- *op++ = *ip++; -- if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } --#endif -- t = *ip++; -- } while (TEST_IP && TEST_OP); -- } -- --#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) -- *out_len = pd(op, out); -- return LZO_E_EOF_NOT_FOUND; --#endif -- --eof_found: -- assert(t == 1); -- *out_len = pd(op, out); -- return (ip == ip_end ? LZO_E_OK : -- (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); -- --#if defined(HAVE_NEED_IP) --input_overrun: -- *out_len = pd(op, out); -- return LZO_E_INPUT_OVERRUN; --#endif -- --#if defined(HAVE_NEED_OP) --output_overrun: -- *out_len = pd(op, out); -- return LZO_E_OUTPUT_OVERRUN; --#endif -- --#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) --lookbehind_overrun: -- *out_len = pd(op, out); -- return LZO_E_LOOKBEHIND_OVERRUN; --#endif --} -- --#endif -- --/***** End of minilzo.c *****/ -- -diff --git a/remmina-plugins/vnc/libvncserver/common/minilzo.h b/remmina-plugins/vnc/libvncserver/common/minilzo.h -deleted file mode 100644 -index bd8ad65..0000000 ---- a/remmina-plugins/vnc/libvncserver/common/minilzo.h -+++ /dev/null -@@ -1,108 +0,0 @@ --/* minilzo.h -- mini subset of the LZO real-time data compression library -- -- This file is part of the LZO real-time data compression library. -- -- Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer -- Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer -- All Rights Reserved. -- -- The LZO library is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License as -- published by the Free Software Foundation; either version 2 of -- the License, or (at your option) any later version. -- -- The LZO library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with the LZO library; see the file COPYING. -- If not, write to the Free Software Foundation, Inc., -- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- -- Markus F.X.J. Oberhumer -- -- http://www.oberhumer.com/opensource/lzo/ -- */ -- --/* -- * NOTE: -- * the full LZO package can be found at -- * http://www.oberhumer.com/opensource/lzo/ -- */ -- -- --#ifndef __MINILZO_H --#define __MINILZO_H 1 -- --#define MINILZO_VERSION 0x2040 -- --#ifdef __LZOCONF_H --# error "you cannot use both LZO and miniLZO" --#endif -- --#undef LZO_HAVE_CONFIG_H --#include "lzoconf.h" -- --#if !defined(LZO_VERSION) || (LZO_VERSION != MINILZO_VERSION) --# error "version mismatch in header files" --#endif -- -- --#ifdef __cplusplus --extern "C" { --#endif -- -- --/*********************************************************************** --// --************************************************************************/ -- --/* Memory required for the wrkmem parameter. -- * When the required size is 0, you can also pass a NULL pointer. -- */ -- --#define LZO1X_MEM_COMPRESS LZO1X_1_MEM_COMPRESS --#define LZO1X_1_MEM_COMPRESS ((lzo_uint32) (16384L * lzo_sizeof_dict_t)) --#define LZO1X_MEM_DECOMPRESS (0) -- -- --/* compression */ --LZO_EXTERN(int) --lzo1x_1_compress ( const lzo_bytep src, lzo_uint src_len, -- lzo_bytep dst, lzo_uintp dst_len, -- lzo_voidp wrkmem ); -- --/* decompression */ --LZO_EXTERN(int) --lzo1x_decompress ( const lzo_bytep src, lzo_uint src_len, -- lzo_bytep dst, lzo_uintp dst_len, -- lzo_voidp wrkmem /* NOT USED */ ); -- --/* safe decompression with overrun testing */ --LZO_EXTERN(int) --lzo1x_decompress_safe ( const lzo_bytep src, lzo_uint src_len, -- lzo_bytep dst, lzo_uintp dst_len, -- lzo_voidp wrkmem /* NOT USED */ ); -- -- --#ifdef __cplusplus --} /* extern "C" */ --#endif -- --#endif /* already included */ -- -diff --git a/remmina-plugins/vnc/libvncserver/common/vncauth.c b/remmina-plugins/vnc/libvncserver/common/vncauth.c -deleted file mode 100644 -index 82c1b68..0000000 ---- a/remmina-plugins/vnc/libvncserver/common/vncauth.c -+++ /dev/null -@@ -1,211 +0,0 @@ --/* -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this program; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* -- * vncauth.c - Functions for VNC password management and authentication. -- */ -- --#ifdef __STRICT_ANSI__ --#define _BSD_SOURCE --#define _POSIX_SOURCE --#endif --#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H --#include --#endif --#include --#include --#include --#include --#include "d3des.h" -- --#include --#include -- --#ifdef LIBVNCSERVER_HAVE_SYS_STAT_H --#include --#endif -- --#include -- --#ifdef WIN32 --#define srandom srand --#define random rand --#else --#include --#endif -- -- --/* libvncclient does not need this */ --#ifndef rfbEncryptBytes -- --/* -- * We use a fixed key to store passwords, since we assume that our local -- * file system is secure but nonetheless don't want to store passwords -- * as plaintext. -- */ -- --static unsigned char fixedkey[8] = {23,82,107,6,35,78,88,7}; -- -- --/* -- * Encrypt a password and store it in a file. Returns 0 if successful, -- * 1 if the file could not be written. -- */ -- --int --rfbEncryptAndStorePasswd(char *passwd, char *fname) --{ -- FILE *fp; -- unsigned int i; -- unsigned char encryptedPasswd[8]; -- -- if ((fp = fopen(fname,"w")) == NULL) return 1; -- -- /* windows security sux */ --#ifndef WIN32 -- fchmod(fileno(fp), S_IRUSR|S_IWUSR); --#endif -- -- /* pad password with nulls */ -- -- for (i = 0; i < 8; i++) { -- if (i < strlen(passwd)) { -- encryptedPasswd[i] = passwd[i]; -- } else { -- encryptedPasswd[i] = 0; -- } -- } -- -- /* Do encryption in-place - this way we overwrite our copy of the plaintext -- password */ -- -- rfbDesKey(fixedkey, EN0); -- rfbDes(encryptedPasswd, encryptedPasswd); -- -- for (i = 0; i < 8; i++) { -- putc(encryptedPasswd[i], fp); -- } -- -- fclose(fp); -- return 0; --} -- -- --/* -- * Decrypt a password from a file. Returns a pointer to a newly allocated -- * string containing the password or a null pointer if the password could -- * not be retrieved for some reason. -- */ -- --char * --rfbDecryptPasswdFromFile(char *fname) --{ -- FILE *fp; -- int i, ch; -- unsigned char *passwd = (unsigned char *)malloc(9); -- -- if ((fp = fopen(fname,"r")) == NULL) { -- free(passwd); -- return NULL; -- } -- -- for (i = 0; i < 8; i++) { -- ch = getc(fp); -- if (ch == EOF) { -- fclose(fp); -- free(passwd); -- return NULL; -- } -- passwd[i] = ch; -- } -- -- fclose(fp); -- -- rfbDesKey(fixedkey, DE1); -- rfbDes(passwd, passwd); -- -- passwd[8] = 0; -- -- return (char *)passwd; --} -- -- --/* -- * Generate CHALLENGESIZE random bytes for use in challenge-response -- * authentication. -- */ -- --void --rfbRandomBytes(unsigned char *bytes) --{ -- int i; -- static rfbBool s_srandom_called = FALSE; -- -- if (!s_srandom_called) { -- srandom((unsigned int)time(NULL) ^ (unsigned int)getpid()); -- s_srandom_called = TRUE; -- } -- -- for (i = 0; i < CHALLENGESIZE; i++) { -- bytes[i] = (unsigned char)(random() & 255); -- } --} -- --#endif -- --/* -- * Encrypt CHALLENGESIZE bytes in memory using a password. -- */ -- --void --rfbEncryptBytes(unsigned char *bytes, char *passwd) --{ -- unsigned char key[8]; -- unsigned int i; -- -- /* key is simply password padded with nulls */ -- -- for (i = 0; i < 8; i++) { -- if (i < strlen(passwd)) { -- key[i] = passwd[i]; -- } else { -- key[i] = 0; -- } -- } -- -- rfbDesKey(key, EN0); -- -- for (i = 0; i < CHALLENGESIZE; i += 8) { -- rfbDes(bytes+i, bytes+i); -- } --} -- --void --rfbEncryptBytes2(unsigned char *where, const int length, unsigned char *key) { -- int i, j; -- rfbDesKey(key, EN0); -- for (i = 0; i< 8; i++) -- where[i] ^= key[i]; -- rfbDes(where, where); -- for (i = 8; i < length; i += 8) { -- for (j = 0; j < 8; j++) -- where[i + j] ^= where[i + j - 8]; -- rfbDes(where + i, where + i); -- } --} -diff --git a/remmina-plugins/vnc/libvncserver/common/zywrletemplate.c b/remmina-plugins/vnc/libvncserver/common/zywrletemplate.c -deleted file mode 100644 -index 52b2b0b..0000000 ---- a/remmina-plugins/vnc/libvncserver/common/zywrletemplate.c -+++ /dev/null -@@ -1,824 +0,0 @@ -- --/******************************************************************** -- * * -- * THIS FILE IS PART OF THE 'ZYWRLE' VNC CODEC SOURCE CODE. * -- * * -- * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * -- * GOVERNED BY A FOLLOWING BSD-STYLE SOURCE LICENSE. * -- * PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * -- * * -- * THE 'ZYWRLE' VNC CODEC SOURCE CODE IS (C) COPYRIGHT 2006 * -- * BY Hitachi Systems & Services, Ltd. * -- * (Noriaki Yamazaki, Research & Developement Center) * * -- * * -- ******************************************************************** --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions --are met: -- --- Redistributions of source code must retain the above copyright --notice, this list of conditions and the following disclaimer. -- --- Redistributions in binary form must reproduce the above copyright --notice, this list of conditions and the following disclaimer in the --documentation and/or other materials provided with the distribution. -- --- Neither the name of the Hitachi Systems & Services, Ltd. nor --the names of its contributors may be used to endorse or promote --products derived from this software without specific prior written --permission. -- --THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION --OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- ********************************************************************/ -- --/* Change Log: -- V0.02 : 2008/02/04 : Fix mis encode/decode when width != scanline -- (Thanks Johannes Schindelin, author of LibVNC -- Server/Client) -- V0.01 : 2007/02/06 : Initial release --*/ -- --/* #define ZYWRLE_ENCODE */ --/* #define ZYWRLE_DECODE */ --#define ZYWRLE_QUANTIZE -- --/* --[References] -- PLHarr: -- Senecal, J. G., P. Lindstrom, M. A. Duchaineau, and K. I. Joy, "An Improved N-Bit to N-Bit Reversible Haar-Like Transform," Pacific Graphics 2004, October 2004, pp. 371-380. -- EZW: -- Shapiro, JM: Embedded Image Coding Using Zerotrees of Wavelet Coefficients, IEEE Trans. Signal. Process., Vol.41, pp.3445-3462 (1993). --*/ -- -- --/* Template Macro stuffs. */ --#undef ZYWRLE_ANALYZE --#undef ZYWRLE_SYNTHESIZE --#define ZYWRLE_ANALYZE __RFB_CONCAT3E(zywrleAnalyze,BPP,END_FIX) --#define ZYWRLE_SYNTHESIZE __RFB_CONCAT3E(zywrleSynthesize,BPP,END_FIX) -- --#define ZYWRLE_RGBYUV __RFB_CONCAT3E(zywrleRGBYUV,BPP,END_FIX) --#define ZYWRLE_YUVRGB __RFB_CONCAT3E(zywrleYUVRGB,BPP,END_FIX) --#define ZYWRLE_YMASK __RFB_CONCAT2E(ZYWRLE_YMASK,BPP) --#define ZYWRLE_UVMASK __RFB_CONCAT2E(ZYWRLE_UVMASK,BPP) --#define ZYWRLE_LOAD_PIXEL __RFB_CONCAT2E(ZYWRLE_LOAD_PIXEL,BPP) --#define ZYWRLE_SAVE_PIXEL __RFB_CONCAT2E(ZYWRLE_SAVE_PIXEL,BPP) -- --/* Packing/Unpacking pixel stuffs. -- Endian conversion stuffs. */ --#undef S_0 --#undef S_1 --#undef L_0 --#undef L_1 --#undef L_2 --#if ZYWRLE_ENDIAN == ENDIAN_BIG --# define S_0 1 --# define S_1 0 --# define L_0 3 --# define L_1 2 --# define L_2 1 --#else --# define S_0 0 --# define S_1 1 --# define L_0 0 --# define L_1 1 --# define L_2 2 --#endif -- --/* Load/Save pixel stuffs. */ --#define ZYWRLE_YMASK15 0xFFFFFFF8 --#define ZYWRLE_UVMASK15 0xFFFFFFF8 --#define ZYWRLE_LOAD_PIXEL15(pSrc,R,G,B) { \ -- R = (((unsigned char*)pSrc)[S_1]<< 1)& 0xF8; \ -- G = ((((unsigned char*)pSrc)[S_1]<< 6)|(((unsigned char*)pSrc)[S_0]>> 2))& 0xF8; \ -- B = (((unsigned char*)pSrc)[S_0]<< 3)& 0xF8; \ --} --#define ZYWRLE_SAVE_PIXEL15(pDst,R,G,B) { \ -- R &= 0xF8; \ -- G &= 0xF8; \ -- B &= 0xF8; \ -- ((unsigned char*)pDst)[S_1] = (unsigned char)( (R>>1)|(G>>6) ); \ -- ((unsigned char*)pDst)[S_0] = (unsigned char)(((B>>3)|(G<<2))& 0xFF); \ --} --#define ZYWRLE_YMASK16 0xFFFFFFFC --#define ZYWRLE_UVMASK16 0xFFFFFFF8 --#define ZYWRLE_LOAD_PIXEL16(pSrc,R,G,B) { \ -- R = ((unsigned char*)pSrc)[S_1] & 0xF8; \ -- G = ((((unsigned char*)pSrc)[S_1]<< 5)|(((unsigned char*)pSrc)[S_0]>> 3))& 0xFC; \ -- B = (((unsigned char*)pSrc)[S_0]<< 3)& 0xF8; \ --} --#define ZYWRLE_SAVE_PIXEL16(pDst,R,G,B) { \ -- R &= 0xF8; \ -- G &= 0xFC; \ -- B &= 0xF8; \ -- ((unsigned char*)pDst)[S_1] = (unsigned char)( R |(G>>5) ); \ -- ((unsigned char*)pDst)[S_0] = (unsigned char)(((B>>3)|(G<<3))& 0xFF); \ --} --#define ZYWRLE_YMASK32 0xFFFFFFFF --#define ZYWRLE_UVMASK32 0xFFFFFFFF --#define ZYWRLE_LOAD_PIXEL32(pSrc,R,G,B) { \ -- R = ((unsigned char*)pSrc)[L_2]; \ -- G = ((unsigned char*)pSrc)[L_1]; \ -- B = ((unsigned char*)pSrc)[L_0]; \ --} --#define ZYWRLE_SAVE_PIXEL32(pDst,R,G,B) { \ -- ((unsigned char*)pDst)[L_2] = (unsigned char)R; \ -- ((unsigned char*)pDst)[L_1] = (unsigned char)G; \ -- ((unsigned char*)pDst)[L_0] = (unsigned char)B; \ --} -- --#ifndef ZYWRLE_ONCE --#define ZYWRLE_ONCE -- --#ifdef WIN32 --#define InlineX __inline --#else --#define InlineX inline --#endif -- --#ifdef ZYWRLE_ENCODE --/* Tables for Coefficients filtering. */ --# ifndef ZYWRLE_QUANTIZE --/* Type A:lower bit omitting of EZW style. */ --const static unsigned int zywrleParam[3][3]={ -- {0x0000F000,0x00000000,0x00000000}, -- {0x0000C000,0x00F0F0F0,0x00000000}, -- {0x0000C000,0x00C0C0C0,0x00F0F0F0}, --/* {0x0000FF00,0x00000000,0x00000000}, -- {0x0000FF00,0x00FFFFFF,0x00000000}, -- {0x0000FF00,0x00FFFFFF,0x00FFFFFF}, */ --}; --# else --/* Type B:Non liner quantization filter. */ --static const signed char zywrleConv[4][256]={ --{ /* bi=5, bo=5 r=0.0:PSNR=24.849 */ -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, --}, --{ /* bi=5, bo=5 r=2.0:PSNR=74.031 */ -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 32, -- 32, 32, 32, 32, 32, 32, 32, 32, -- 32, 32, 32, 32, 32, 32, 32, 32, -- 48, 48, 48, 48, 48, 48, 48, 48, -- 48, 48, 48, 56, 56, 56, 56, 56, -- 56, 56, 56, 56, 64, 64, 64, 64, -- 64, 64, 64, 64, 72, 72, 72, 72, -- 72, 72, 72, 72, 80, 80, 80, 80, -- 80, 80, 88, 88, 88, 88, 88, 88, -- 88, 88, 88, 88, 88, 88, 96, 96, -- 96, 96, 96, 104, 104, 104, 104, 104, -- 104, 104, 104, 104, 104, 112, 112, 112, -- 112, 112, 112, 112, 112, 112, 120, 120, -- 120, 120, 120, 120, 120, 120, 120, 120, -- 0, -120, -120, -120, -120, -120, -120, -120, -- -120, -120, -120, -112, -112, -112, -112, -112, -- -112, -112, -112, -112, -104, -104, -104, -104, -- -104, -104, -104, -104, -104, -104, -96, -96, -- -96, -96, -96, -88, -88, -88, -88, -88, -- -88, -88, -88, -88, -88, -88, -88, -80, -- -80, -80, -80, -80, -80, -72, -72, -72, -- -72, -72, -72, -72, -72, -64, -64, -64, -- -64, -64, -64, -64, -64, -56, -56, -56, -- -56, -56, -56, -56, -56, -56, -48, -48, -- -48, -48, -48, -48, -48, -48, -48, -48, -- -48, -32, -32, -32, -32, -32, -32, -32, -- -32, -32, -32, -32, -32, -32, -32, -32, -- -32, -32, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, --}, --{ /* bi=5, bo=4 r=2.0:PSNR=64.441 */ -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 48, 48, 48, 48, 48, 48, 48, 48, -- 48, 48, 48, 48, 48, 48, 48, 48, -- 48, 48, 48, 48, 48, 48, 48, 48, -- 64, 64, 64, 64, 64, 64, 64, 64, -- 64, 64, 64, 64, 64, 64, 64, 64, -- 80, 80, 80, 80, 80, 80, 80, 80, -- 80, 80, 80, 80, 80, 88, 88, 88, -- 88, 88, 88, 88, 88, 88, 88, 88, -- 104, 104, 104, 104, 104, 104, 104, 104, -- 104, 104, 104, 112, 112, 112, 112, 112, -- 112, 112, 112, 112, 120, 120, 120, 120, -- 120, 120, 120, 120, 120, 120, 120, 120, -- 0, -120, -120, -120, -120, -120, -120, -120, -- -120, -120, -120, -120, -120, -112, -112, -112, -- -112, -112, -112, -112, -112, -112, -104, -104, -- -104, -104, -104, -104, -104, -104, -104, -104, -- -104, -88, -88, -88, -88, -88, -88, -88, -- -88, -88, -88, -88, -80, -80, -80, -80, -- -80, -80, -80, -80, -80, -80, -80, -80, -- -80, -64, -64, -64, -64, -64, -64, -64, -- -64, -64, -64, -64, -64, -64, -64, -64, -- -64, -48, -48, -48, -48, -48, -48, -48, -- -48, -48, -48, -48, -48, -48, -48, -48, -- -48, -48, -48, -48, -48, -48, -48, -48, -- -48, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, --}, --{ /* bi=5, bo=2 r=2.0:PSNR=43.175 */ -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 88, 88, 88, 88, 88, 88, 88, 88, -- 88, 88, 88, 88, 88, 88, 88, 88, -- 88, 88, 88, 88, 88, 88, 88, 88, -- 88, 88, 88, 88, 88, 88, 88, 88, -- 88, 88, 88, 88, 88, 88, 88, 88, -- 88, 88, 88, 88, 88, 88, 88, 88, -- 88, 88, 88, 88, 88, 88, 88, 88, -- 88, 88, 88, 88, 88, 88, 88, 88, -- 0, -88, -88, -88, -88, -88, -88, -88, -- -88, -88, -88, -88, -88, -88, -88, -88, -- -88, -88, -88, -88, -88, -88, -88, -88, -- -88, -88, -88, -88, -88, -88, -88, -88, -- -88, -88, -88, -88, -88, -88, -88, -88, -- -88, -88, -88, -88, -88, -88, -88, -88, -- -88, -88, -88, -88, -88, -88, -88, -88, -- -88, -88, -88, -88, -88, -88, -88, -88, -- -88, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, -- 0, 0, 0, 0, 0, 0, 0, 0, --} --}; --const static signed char* zywrleParam[3][3][3]={ -- {{zywrleConv[0],zywrleConv[2],zywrleConv[0]},{zywrleConv[0],zywrleConv[0],zywrleConv[0]},{zywrleConv[0],zywrleConv[0],zywrleConv[0]}}, -- {{zywrleConv[0],zywrleConv[3],zywrleConv[0]},{zywrleConv[1],zywrleConv[1],zywrleConv[1]},{zywrleConv[0],zywrleConv[0],zywrleConv[0]}}, -- {{zywrleConv[0],zywrleConv[3],zywrleConv[0]},{zywrleConv[2],zywrleConv[2],zywrleConv[2]},{zywrleConv[1],zywrleConv[1],zywrleConv[1]}}, --}; --# endif --#endif -- --static InlineX void Harr(signed char* pX0, signed char* pX1) --{ -- /* Piecewise-Linear Harr(PLHarr) */ -- int X0 = (int)*pX0, X1 = (int)*pX1; -- int orgX0 = X0, orgX1 = X1; -- if ((X0 ^ X1) & 0x80) { -- /* differ sign */ -- X1 += X0; -- if (((X1^orgX1)&0x80)==0) { -- /* |X1| > |X0| */ -- X0 -= X1; /* H = -B */ -- } -- } else { -- /* same sign */ -- X0 -= X1; -- if (((X0 ^ orgX0) & 0x80) == 0) { -- /* |X0| > |X1| */ -- X1 += X0; /* L = A */ -- } -- } -- *pX0 = (signed char)X1; -- *pX1 = (signed char)X0; --} --/* -- 1D-Wavelet transform. -- -- In coefficients array, the famous 'pyramid' decomposition is well used. -- -- 1D Model: -- |L0L0L0L0|L0L0L0L0|H0H0H0H0|H0H0H0H0| : level 0 -- |L1L1L1L1|H1H1H1H1|H0H0H0H0|H0H0H0H0| : level 1 -- -- But this method needs line buffer because H/L is different position from X0/X1. -- So, I used 'interleave' decomposition instead of it. -- -- 1D Model: -- |L0H0L0H0|L0H0L0H0|L0H0L0H0|L0H0L0H0| : level 0 -- |L1H0H1H0|L1H0H1H0|L1H0H1H0|L1H0H1H0| : level 1 -- -- In this method, H/L and X0/X1 is always same position. -- This lead us to more speed and less memory. -- Of cause, the result of both method is quite same -- because it's only difference that coefficient position. --*/ --static InlineX void WaveletLevel(int* data, int size, int l, int SkipPixel) --{ -- int s, ofs; -- signed char* pX0; -- signed char* end; -- -- pX0 = (signed char*)data; -- s = (8<>(l+1))*s; -- s -= 2; -- ofs = (4<>1; -- if (r & 0x02) -- pH += (s>>1)*width; -- for (y = 0; y < height / s; y++) { -- for (x = 0; x < width / s; x++) { -- /* -- these are same following code. -- pH[x] = pH[x] / (~pM[x]+1) * (~pM[x]+1); -- ( round pH[x] with pM[x] bit ) -- '&' operator isn't 'round' but is 'floor'. -- So, we must offset when pH[x] is negative. -- */ -- if (((signed char*)pH)[0] & 0x80) -- ((signed char*)pH)[0] += ~((signed char*)pM)[0]; -- if (((signed char*)pH)[1] & 0x80) -- ((signed char*)pH)[1] += ~((signed char*)pM)[1]; -- if (((signed char*)pH)[2] & 0x80) -- ((signed char*)pH)[2] += ~((signed char*)pM)[2]; -- *pH &= *pM; -- pH += s; -- } -- pH += (s-1)*width; -- } -- } --} --# else --/* -- Type B:Non liner quantization filter. -- -- Coefficients have Gaussian curve and smaller value which is -- large part of coefficients isn't more important than larger value. -- So, I use filter of Non liner quantize/dequantize table. -- In general, Non liner quantize formula is explained as following. -- -- y=f(x) = sign(x)*round( ((abs(x)/(2^7))^ r )* 2^(bo-1) )*2^(8-bo) -- x=f-1(y) = sign(y)*round( ((abs(y)/(2^7))^(1/r))* 2^(bi-1) )*2^(8-bi) -- ( r:power coefficient bi:effective MSB in input bo:effective MSB in output ) -- -- r < 1.0 : Smaller value is more important than larger value. -- r > 1.0 : Larger value is more important than smaller value. -- r = 1.0 : Liner quantization which is same with EZW style. -- -- r = 0.75 is famous non liner quantization used in MP3 audio codec. -- In contrast to audio data, larger value is important in wavelet coefficients. -- So, I select r = 2.0 table( quantize is x^2, dequantize sqrt(x) ). -- -- As compared with EZW style liner quantization, this filter tended to be -- more sharp edge and be more compression rate but be more blocking noise and be less quality. -- Especially, the surface of graphic objects has distinguishable noise in middle quality mode. -- -- We need only quantized-dequantized(filtered) value rather than quantized value itself -- because all values are packed or palette-lized in later ZRLE section. -- This lead us not to need to modify client decoder when we change -- the filtering procedure in future. -- Client only decodes coefficients given by encoder. --*/ --static InlineX void FilterWaveletSquare(int* pBuf, int width, int height, int level, int l) --{ -- int r, s; -- int x, y; -- int* pH; -- const signed char** pM; -- -- pM = zywrleParam[level-1][l]; -- s = 2<>1; -- if (r & 0x02) -- pH += (s>>1)*width; -- for (y = 0; y < height / s; y++) { -- for (x = 0; x < width / s; x++) { -- ((signed char*)pH)[0] = pM[0][((unsigned char*)pH)[0]]; -- ((signed char*)pH)[1] = pM[1][((unsigned char*)pH)[1]]; -- ((signed char*)pH)[2] = pM[2][((unsigned char*)pH)[2]]; -- pH += s; -- } -- pH += (s-1)*width; -- } -- } --} --# endif -- --static InlineX void Wavelet(int* pBuf, int width, int height, int level) --{ -- int l, s; -- int* pTop; -- int* pEnd; -- -- for (l = 0; l < level; l++) { -- pTop = pBuf; -- pEnd = pBuf+height*width; -- s = width<= 0; l--) { -- pTop = pBuf; -- pEnd = pBuf+width; -- s = 1< YUV conversion stuffs. -- YUV coversion is explained as following formula in strict meaning: -- Y = 0.299R + 0.587G + 0.114B ( 0<=Y<=255) -- U = -0.169R - 0.331G + 0.500B (-128<=U<=127) -- V = 0.500R - 0.419G - 0.081B (-128<=V<=127) -- -- I use simple conversion RCT(reversible color transform) which is described -- in JPEG-2000 specification. -- Y = (R + 2G + B)/4 ( 0<=Y<=255) -- U = B-G (-256<=U<=255) -- V = R-G (-256<=V<=255) --*/ --#define ROUND(x) (((x)<0)?0:(((x)>255)?255:(x))) -- /* RCT is N-bit RGB to N-bit Y and N+1-bit UV. -- For make Same N-bit, UV is lossy. -- More exact PLHarr, we reduce to odd range(-127<=x<=127). */ --#define ZYWRLE_RGBYUV1(R,G,B,Y,U,V,ymask,uvmask) { \ -- Y = (R+(G<<1)+B)>>2; \ -- U = B-G; \ -- V = R-G; \ -- Y -= 128; \ -- U >>= 1; \ -- V >>= 1; \ -- Y &= ymask; \ -- U &= uvmask; \ -- V &= uvmask; \ -- if (Y == -128) \ -- Y += (0xFFFFFFFF-ymask+1); \ -- if (U == -128) \ -- U += (0xFFFFFFFF-uvmask+1); \ -- if (V == -128) \ -- V += (0xFFFFFFFF-uvmask+1); \ --} --#define ZYWRLE_YUVRGB1(R,G,B,Y,U,V) { \ -- Y += 128; \ -- U <<= 1; \ -- V <<= 1; \ -- G = Y-((U+V)>>2); \ -- B = U+G; \ -- R = V+G; \ -- G = ROUND(G); \ -- B = ROUND(B); \ -- R = ROUND(R); \ --} -- --/* -- coefficient packing/unpacking stuffs. -- Wavelet transform makes 4 sub coefficient image from 1 original image. -- -- model with pyramid decomposition: -- +------+------+ -- | | | -- | L | Hx | -- | | | -- +------+------+ -- | | | -- | H | Hxy | -- | | | -- +------+------+ -- -- So, we must transfer each sub images individually in strict meaning. -- But at least ZRLE meaning, following one decompositon image is same as -- avobe individual sub image. I use this format. -- (Strictly saying, transfer order is reverse(Hxy->Hy->Hx->L) -- for simplified procedure for any wavelet level.) -- -- +------+------+ -- | L | -- +------+------+ -- | Hx | -- +------+------+ -- | Hy | -- +------+------+ -- | Hxy | -- +------+------+ --*/ --#define INC_PTR(data) \ -- data++; \ -- if( data-pData >= (w+uw) ){ \ -- data += scanline-(w+uw); \ -- pData = data; \ -- } -- --#define ZYWRLE_TRANSFER_COEFF(pBuf,data,r,w,h,scanline,level,TRANS) \ -- pH = pBuf; \ -- s = 2<>1; \ -- if (r & 0x02) \ -- pH += (s>>1)*w; \ -- pEnd = pH+h*w; \ -- while (pH < pEnd) { \ -- pLine = pH+w; \ -- while (pH < pLine) { \ -- TRANS \ -- INC_PTR(data) \ -- pH += s; \ -- } \ -- pH += (s-1)*w; \ -- } -- --#define ZYWRLE_PACK_COEFF(pBuf,data,r,width,height,scanline,level) \ -- ZYWRLE_TRANSFER_COEFF(pBuf,data,r,width,height,scanline,level,ZYWRLE_LOAD_COEFF(pH,R,G,B);ZYWRLE_SAVE_PIXEL(data,R,G,B);) -- --#define ZYWRLE_UNPACK_COEFF(pBuf,data,r,width,height,scanline,level) \ -- ZYWRLE_TRANSFER_COEFF(pBuf,data,r,width,height,scanline,level,ZYWRLE_LOAD_PIXEL(data,R,G,B);ZYWRLE_SAVE_COEFF(pH,R,G,B);) -- --#define ZYWRLE_SAVE_UNALIGN(data,TRANS) \ -- pTop = pBuf+w*h; \ -- pEnd = pBuf + (w+uw)*(h+uh); \ -- while (pTop < pEnd) { \ -- TRANS \ -- INC_PTR(data) \ -- pTop++; \ -- } -- --#define ZYWRLE_LOAD_UNALIGN(data,TRANS) \ -- pTop = pBuf+w*h; \ -- if (uw) { \ -- pData= data + w; \ -- pEnd = (int*)(pData+ h*scanline); \ -- while (pData < (PIXEL_T*)pEnd) { \ -- pLine = (int*)(pData + uw); \ -- while (pData < (PIXEL_T*)pLine) { \ -- TRANS \ -- pData++; \ -- pTop++; \ -- } \ -- pData += scanline-uw; \ -- } \ -- } \ -- if (uh) { \ -- pData= data + h*scanline; \ -- pEnd = (int*)(pData+ uh*scanline); \ -- while (pData < (PIXEL_T*)pEnd) { \ -- pLine = (int*)(pData + w); \ -- while (pData < (PIXEL_T*)pLine) { \ -- TRANS \ -- pData++; \ -- pTop++; \ -- } \ -- pData += scanline-w; \ -- } \ -- } \ -- if (uw && uh) { \ -- pData= data + w+ h*scanline; \ -- pEnd = (int*)(pData+ uh*scanline); \ -- while (pData < (PIXEL_T*)pEnd) { \ -- pLine = (int*)(pData + uw); \ -- while (pData < (PIXEL_T*)pLine) { \ -- TRANS \ -- pData++; \ -- pTop++; \ -- } \ -- pData += scanline-uw; \ -- } \ -- } -- --static InlineX void zywrleCalcSize(int* pW, int* pH, int level) --{ -- *pW &= ~((1<buffer, hdr.nSubrects * (4 + (BPP / 8)))) -- return FALSE; -- -- ptr = (uint8_t *)client->buffer; -- -- for (i = 0; i < hdr.nSubrects; i++) { -- pix = *(CARDBPP *)ptr; -- ptr += BPP/8; -- x = *ptr++; -- y = *ptr++; -- w = *ptr++; -- h = *ptr++; -- -- FillRectangle(client, rx+x, ry+y, w, h, pix); -- } -- -- return TRUE; --} -- --#undef CARDBPP -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/cursor.c b/remmina-plugins/vnc/libvncserver/libvncclient/cursor.c -deleted file mode 100644 -index a48d7c5..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/cursor.c -+++ /dev/null -@@ -1,179 +0,0 @@ --/* -- * Copyright (C) 2001,2002 Constantin Kaplinsky. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* -- * cursor.c - code to support cursor shape updates (XCursor and -- * RichCursor preudo-encodings). -- */ -- --#include -- -- --#define OPER_SAVE 0 --#define OPER_RESTORE 1 -- --#define RGB24_TO_PIXEL(bpp,r,g,b) \ -- ((((uint##bpp##_t)(r) & 0xFF) * client->format.redMax + 127) / 255 \ -- << client->format.redShift | \ -- (((uint##bpp##_t)(g) & 0xFF) * client->format.greenMax + 127) / 255 \ -- << client->format.greenShift | \ -- (((uint##bpp##_t)(b) & 0xFF) * client->format.blueMax + 127) / 255 \ -- << client->format.blueShift) -- -- --/********************************************************************* -- * HandleCursorShape(). Support for XCursor and RichCursor shape -- * updates. We emulate cursor operating on the frame buffer (that is -- * why we call it "software cursor"). -- ********************************************************************/ -- --rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc) --{ -- int bytesPerPixel; -- size_t bytesPerRow, bytesMaskData; -- rfbXCursorColors rgb; -- uint32_t colors[2]; -- char *buf; -- uint8_t *ptr; -- int x, y, b; -- -- bytesPerPixel = client->format.bitsPerPixel / 8; -- bytesPerRow = (width + 7) / 8; -- bytesMaskData = bytesPerRow * height; -- -- if (width * height == 0) -- return TRUE; -- -- /* Allocate memory for pixel data and temporary mask data. */ -- if(client->rcSource) -- free(client->rcSource); -- -- client->rcSource = malloc(width * height * bytesPerPixel); -- if (client->rcSource == NULL) -- return FALSE; -- -- buf = malloc(bytesMaskData); -- if (buf == NULL) { -- free(client->rcSource); -- client->rcSource = NULL; -- return FALSE; -- } -- -- /* Read and decode cursor pixel data, depending on the encoding type. */ -- -- if (enc == rfbEncodingXCursor) { -- /* Read and convert background and foreground colors. */ -- if (!ReadFromRFBServer(client, (char *)&rgb, sz_rfbXCursorColors)) { -- free(client->rcSource); -- client->rcSource = NULL; -- free(buf); -- return FALSE; -- } -- colors[0] = RGB24_TO_PIXEL(32, rgb.backRed, rgb.backGreen, rgb.backBlue); -- colors[1] = RGB24_TO_PIXEL(32, rgb.foreRed, rgb.foreGreen, rgb.foreBlue); -- -- /* Read 1bpp pixel data into a temporary buffer. */ -- if (!ReadFromRFBServer(client, buf, bytesMaskData)) { -- free(client->rcSource); -- client->rcSource = NULL; -- free(buf); -- return FALSE; -- } -- -- /* Convert 1bpp data to byte-wide color indices. */ -- ptr = client->rcSource; -- for (y = 0; y < height; y++) { -- for (x = 0; x < width / 8; x++) { -- for (b = 7; b >= 0; b--) { -- *ptr = buf[y * bytesPerRow + x] >> b & 1; -- ptr += bytesPerPixel; -- } -- } -- for (b = 7; b > 7 - width % 8; b--) { -- *ptr = buf[y * bytesPerRow + x] >> b & 1; -- ptr += bytesPerPixel; -- } -- } -- -- /* Convert indices into the actual pixel values. */ -- switch (bytesPerPixel) { -- case 1: -- for (x = 0; x < width * height; x++) -- client->rcSource[x] = (uint8_t)colors[client->rcSource[x]]; -- break; -- case 2: -- for (x = 0; x < width * height; x++) -- ((uint16_t *)client->rcSource)[x] = (uint16_t)colors[client->rcSource[x * 2]]; -- break; -- case 4: -- for (x = 0; x < width * height; x++) -- ((uint32_t *)client->rcSource)[x] = colors[client->rcSource[x * 4]]; -- break; -- } -- -- } else { /* enc == rfbEncodingRichCursor */ -- -- if (!ReadFromRFBServer(client, (char *)client->rcSource, width * height * bytesPerPixel)) { -- free(client->rcSource); -- client->rcSource = NULL; -- free(buf); -- return FALSE; -- } -- -- } -- -- /* Read and decode mask data. */ -- -- if (!ReadFromRFBServer(client, buf, bytesMaskData)) { -- free(client->rcSource); -- client->rcSource = NULL; -- free(buf); -- return FALSE; -- } -- -- client->rcMask = malloc(width * height); -- if (client->rcMask == NULL) { -- free(client->rcSource); -- client->rcSource = NULL; -- free(buf); -- return FALSE; -- } -- -- ptr = client->rcMask; -- for (y = 0; y < height; y++) { -- for (x = 0; x < width / 8; x++) { -- for (b = 7; b >= 0; b--) { -- *ptr++ = buf[y * bytesPerRow + x] >> b & 1; -- } -- } -- for (b = 7; b > 7 - width % 8; b--) { -- *ptr++ = buf[y * bytesPerRow + x] >> b & 1; -- } -- } -- -- if (client->GotCursorShape != NULL) { -- client->GotCursorShape(client, xhot, yhot, width, height, bytesPerPixel); -- } -- -- free(buf); -- -- return TRUE; --} -- -- -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/hextile.c b/remmina-plugins/vnc/libvncserver/libvncclient/hextile.c -deleted file mode 100644 -index 8698445..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/hextile.c -+++ /dev/null -@@ -1,127 +0,0 @@ --/* -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* -- * hextile.c - handle hextile encoding. -- * -- * This file shouldn't be compiled directly. It is included multiple times by -- * rfbproto.c, each time with a different definition of the macro BPP. For -- * each value of BPP, this file defines a function which handles a hextile -- * encoded rectangle with BPP bits per pixel. -- */ -- --#define HandleHextileBPP CONCAT2E(HandleHextile,BPP) --#define CARDBPP CONCAT3E(uint,BPP,_t) -- --static rfbBool --HandleHextileBPP (rfbClient* client, int rx, int ry, int rw, int rh) --{ -- CARDBPP bg, fg; -- int i; -- uint8_t *ptr; -- int x, y, w, h; -- int sx, sy, sw, sh; -- uint8_t subencoding; -- uint8_t nSubrects; -- -- for (y = ry; y < ry+rh; y += 16) { -- for (x = rx; x < rx+rw; x += 16) { -- w = h = 16; -- if (rx+rw - x < 16) -- w = rx+rw - x; -- if (ry+rh - y < 16) -- h = ry+rh - y; -- -- if (!ReadFromRFBServer(client, (char *)&subencoding, 1)) -- return FALSE; -- -- if (subencoding & rfbHextileRaw) { -- if (!ReadFromRFBServer(client, client->buffer, w * h * (BPP / 8))) -- return FALSE; -- -- CopyRectangle(client, (uint8_t *)client->buffer, x, y, w, h); -- -- continue; -- } -- -- if (subencoding & rfbHextileBackgroundSpecified) -- if (!ReadFromRFBServer(client, (char *)&bg, sizeof(bg))) -- return FALSE; -- -- FillRectangle(client, x, y, w, h, bg); -- -- if (subencoding & rfbHextileForegroundSpecified) -- if (!ReadFromRFBServer(client, (char *)&fg, sizeof(fg))) -- return FALSE; -- -- if (!(subencoding & rfbHextileAnySubrects)) { -- continue; -- } -- -- if (!ReadFromRFBServer(client, (char *)&nSubrects, 1)) -- return FALSE; -- -- ptr = (uint8_t*)client->buffer; -- -- if (subencoding & rfbHextileSubrectsColoured) { -- if (!ReadFromRFBServer(client, client->buffer, nSubrects * (2 + (BPP / 8)))) -- return FALSE; -- -- for (i = 0; i < nSubrects; i++) { --#if BPP==8 -- GET_PIXEL8(fg, ptr); --#elif BPP==16 -- GET_PIXEL16(fg, ptr); --#elif BPP==32 -- GET_PIXEL32(fg, ptr); --#else --#error "Invalid BPP" --#endif -- sx = rfbHextileExtractX(*ptr); -- sy = rfbHextileExtractY(*ptr); -- ptr++; -- sw = rfbHextileExtractW(*ptr); -- sh = rfbHextileExtractH(*ptr); -- ptr++; -- -- FillRectangle(client, x+sx, y+sy, sw, sh, fg); -- } -- -- } else { -- if (!ReadFromRFBServer(client, client->buffer, nSubrects * 2)) -- return FALSE; -- -- for (i = 0; i < nSubrects; i++) { -- sx = rfbHextileExtractX(*ptr); -- sy = rfbHextileExtractY(*ptr); -- ptr++; -- sw = rfbHextileExtractW(*ptr); -- sh = rfbHextileExtractH(*ptr); -- ptr++; -- -- FillRectangle(client, x+sx, y+sy, sw, sh, fg); -- } -- } -- } -- } -- -- return TRUE; --} -- --#undef CARDBPP -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/listen.c b/remmina-plugins/vnc/libvncserver/libvncclient/listen.c -deleted file mode 100644 -index 58275a0..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/listen.c -+++ /dev/null -@@ -1,172 +0,0 @@ --/* -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* -- * listen.c - listen for incoming connections -- */ -- --#ifdef __STRICT_ANSI__ --#define _BSD_SOURCE --#endif --#include --#include --#ifdef __MINGW32__ --#define close closesocket --#include --#undef max --#else --#include --#include --#endif --#include --#include -- --/* -- * listenForIncomingConnections() - listen for incoming connections from -- * servers, and fork a new process to deal with each connection. -- */ -- --void --listenForIncomingConnections(rfbClient* client) --{ --#ifdef __MINGW32__ -- /* FIXME */ -- rfbClientErr("listenForIncomingConnections on MinGW32 NOT IMPLEMENTED\n"); -- return; --#else -- int listenSocket; -- fd_set fds; -- -- client->listenSpecified = TRUE; -- -- listenSocket = ListenAtTcpPort(client->listenPort); -- -- if ((listenSocket < 0)) -- return; -- -- rfbClientLog("%s -listen: Listening on port %d\n", -- client->programName,client->listenPort); -- rfbClientLog("%s -listen: Command line errors are not reported until " -- "a connection comes in.\n", client->programName); -- -- while (TRUE) { -- -- /* reap any zombies */ -- int status, pid; -- while ((pid= wait3(&status, WNOHANG, (struct rusage *)0))>0); -- -- /* TODO: callback for discard any events (like X11 events) */ -- -- FD_ZERO(&fds); -- -- FD_SET(listenSocket, &fds); -- -- select(listenSocket+1, &fds, NULL, NULL, NULL); -- -- if (FD_ISSET(listenSocket, &fds)) { -- client->sock = AcceptTcpConnection(listenSocket); -- if (client->sock < 0) -- return; -- if (!SetNonBlocking(client->sock)) -- return; -- -- /* Now fork off a new process to deal with it... */ -- -- switch (fork()) { -- -- case -1: -- rfbClientErr("fork\n"); -- return; -- -- case 0: -- /* child - return to caller */ -- close(listenSocket); -- return; -- -- default: -- /* parent - go round and listen again */ -- close(client->sock); -- break; -- } -- } -- } --#endif --} -- -- -- --/* -- * listenForIncomingConnectionsNoFork() - listen for incoming connections -- * from servers, but DON'T fork, instead just wait timeout microseconds. -- * If timeout is negative, block indefinitly. -- * Returns 1 on success (there was an incoming connection on the listen socket -- * and we accepted it successfully), -1 on error, 0 on timeout. -- */ -- --int --listenForIncomingConnectionsNoFork(rfbClient* client, int timeout) --{ -- fd_set fds; -- struct timeval to; -- int r; -- -- to.tv_sec= timeout / 1000000; -- to.tv_usec= timeout % 1000000; -- -- client->listenSpecified = TRUE; -- -- if (client->listenSock < 0) -- { -- client->listenSock = ListenAtTcpPort(client->listenPort); -- -- if (client->listenSock < 0) -- return -1; -- -- rfbClientLog("%s -listennofork: Listening on port %d\n", -- client->programName,client->listenPort); -- rfbClientLog("%s -listennofork: Command line errors are not reported until " -- "a connection comes in.\n", client->programName); -- } -- -- FD_ZERO(&fds); -- -- FD_SET(client->listenSock, &fds); -- -- if (timeout < 0) -- r = select(client->listenSock+1, &fds, NULL, NULL, NULL); -- else -- r = select(client->listenSock+1, &fds, NULL, NULL, &to); -- -- if (r > 0) -- { -- client->sock = AcceptTcpConnection(client->listenSock); -- if (client->sock < 0) -- return -1; -- if (!SetNonBlocking(client->sock)) -- return -1; -- -- close(client->listenSock); -- return r; -- } -- -- /* r is now either 0 (timeout) or -1 (error) */ -- return r; --} -- -- -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/rfbproto.c b/remmina-plugins/vnc/libvncserver/libvncclient/rfbproto.c -deleted file mode 100644 -index a7faab1..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/rfbproto.c -+++ /dev/null -@@ -1,2406 +0,0 @@ --/* -- * Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved. -- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* -- * rfbproto.c - functions to deal with client side of RFB protocol. -- */ -- --#ifdef __STRICT_ANSI__ --#define _BSD_SOURCE --#define _POSIX_SOURCE --#endif --#ifndef WIN32 --#include --#include --#include --#include --#endif --#include --#include --#ifdef LIBVNCSERVER_HAVE_LIBZ --#include --#ifdef __CHECKER__ --#undef Z_NULL --#define Z_NULL NULL --#endif --#endif --#ifdef LIBVNCSERVER_HAVE_LIBJPEG --#ifdef _RPCNDR_H /* This Windows header typedefs 'boolean', jpeglib has to know */ --#define HAVE_BOOLEAN --#endif --#include --#endif --#include --#include -- --#ifdef LIBVNCSERVER_WITH_CLIENT_GCRYPT --#ifdef WIN32 --#undef SOCKET --#undef socklen_t --#endif --#include --#endif -- --#include "minilzo.h" --#include "tls.h" -- --/* -- * rfbClientLog prints a time-stamped message to the log file (stderr). -- */ -- --rfbBool rfbEnableClientLogging=TRUE; -- --static void --rfbDefaultClientLog(const char *format, ...) --{ -- va_list args; -- char buf[256]; -- time_t log_clock; -- -- if(!rfbEnableClientLogging) -- return; -- -- va_start(args, format); -- -- time(&log_clock); -- strftime(buf, 255, "%d/%m/%Y %X ", localtime(&log_clock)); -- fprintf(stderr, "%s", buf); -- -- vfprintf(stderr, format, args); -- fflush(stderr); -- -- va_end(args); --} -- --rfbClientLogProc rfbClientLog=rfbDefaultClientLog; --rfbClientLogProc rfbClientErr=rfbDefaultClientLog; -- --/* extensions */ -- --rfbClientProtocolExtension* rfbClientExtensions = NULL; -- --void rfbClientRegisterExtension(rfbClientProtocolExtension* e) --{ -- e->next = rfbClientExtensions; -- rfbClientExtensions = e; --} -- --/* client data */ -- --void rfbClientSetClientData(rfbClient* client, void* tag, void* data) --{ -- rfbClientData* clientData = client->clientData; -- -- while(clientData && clientData->tag != tag) -- clientData = clientData->next; -- if(clientData == NULL) { -- clientData = calloc(sizeof(rfbClientData), 1); -- clientData->next = client->clientData; -- client->clientData = clientData; -- clientData->tag = tag; -- } -- -- clientData->data = data; --} -- --void* rfbClientGetClientData(rfbClient* client, void* tag) --{ -- rfbClientData* clientData = client->clientData; -- -- while(clientData) { -- if(clientData->tag == tag) -- return clientData->data; -- clientData = clientData->next; -- } -- -- return NULL; --} -- --/* messages */ -- --static void FillRectangle(rfbClient* client, int x, int y, int w, int h, uint32_t colour) { -- int i,j; -- --#define FILL_RECT(BPP) \ -- for(j=y*client->width;j<(y+h)*client->width;j+=client->width) \ -- for(i=x;iframeBuffer)[j+i]=colour; -- -- switch(client->format.bitsPerPixel) { -- case 8: FILL_RECT(8); break; -- case 16: FILL_RECT(16); break; -- case 32: FILL_RECT(32); break; -- default: -- rfbClientLog("Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel); -- } --} -- --static void CopyRectangle(rfbClient* client, uint8_t* buffer, int x, int y, int w, int h) { -- int j; -- --#define COPY_RECT(BPP) \ -- { \ -- int rs = w * BPP / 8, rs2 = client->width * BPP / 8; \ -- for (j = ((x * (BPP / 8)) + (y * rs2)); j < (y + h) * rs2; j += rs2) { \ -- memcpy(client->frameBuffer + j, buffer, rs); \ -- buffer += rs; \ -- } \ -- } -- -- switch(client->format.bitsPerPixel) { -- case 8: COPY_RECT(8); break; -- case 16: COPY_RECT(16); break; -- case 32: COPY_RECT(32); break; -- default: -- rfbClientLog("Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel); -- } --} -- --/* TODO: test */ --static void CopyRectangleFromRectangle(rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y) { -- int i,j; -- --#define COPY_RECT_FROM_RECT(BPP) \ -- { \ -- uint##BPP##_t* _buffer=((uint##BPP##_t*)client->frameBuffer)+(src_y-dest_y)*client->width+src_x-dest_x; \ -- if (dest_y < src_y) { \ -- for(j = dest_y*client->width; j < (dest_y+h)*client->width; j += client->width) { \ -- if (dest_x < src_x) { \ -- for(i = dest_x; i < dest_x+w; i++) { \ -- ((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \ -- } \ -- } else { \ -- for(i = dest_x+w-1; i >= dest_x; i--) { \ -- ((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \ -- } \ -- } \ -- } \ -- } else { \ -- for(j = (dest_y+h-1)*client->width; j >= dest_y*client->width; j-=client->width) { \ -- if (dest_x < src_x) { \ -- for(i = dest_x; i < dest_x+w; i++) { \ -- ((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \ -- } \ -- } else { \ -- for(i = dest_x+w-1; i >= dest_x; i--) { \ -- ((uint##BPP##_t*)client->frameBuffer)[j+i]=_buffer[j+i]; \ -- } \ -- } \ -- } \ -- } \ -- } -- -- switch(client->format.bitsPerPixel) { -- case 8: COPY_RECT_FROM_RECT(8); break; -- case 16: COPY_RECT_FROM_RECT(16); break; -- case 32: COPY_RECT_FROM_RECT(32); break; -- default: -- rfbClientLog("Unsupported bitsPerPixel: %d\n",client->format.bitsPerPixel); -- } --} -- --static rfbBool HandleRRE8(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleRRE16(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleRRE32(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleCoRRE8(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleCoRRE16(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleCoRRE32(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleHextile8(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleHextile16(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleHextile32(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleUltra8(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleUltra16(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleUltra32(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleUltraZip8(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleUltraZip16(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleUltraZip32(rfbClient* client, int rx, int ry, int rw, int rh); --#ifdef LIBVNCSERVER_HAVE_LIBZ --static rfbBool HandleZlib8(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleZlib16(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleZlib32(rfbClient* client, int rx, int ry, int rw, int rh); --#ifdef LIBVNCSERVER_HAVE_LIBJPEG --static rfbBool HandleTight8(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleTight16(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleTight32(rfbClient* client, int rx, int ry, int rw, int rh); -- --static long ReadCompactLen (rfbClient* client); -- --static void JpegInitSource(j_decompress_ptr cinfo); --static boolean JpegFillInputBuffer(j_decompress_ptr cinfo); --static void JpegSkipInputData(j_decompress_ptr cinfo, long num_bytes); --static void JpegTermSource(j_decompress_ptr cinfo); --static void JpegSetSrcManager(j_decompress_ptr cinfo, uint8_t *compressedData, -- int compressedLen); --#endif --static rfbBool HandleZRLE8(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleZRLE15(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleZRLE16(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleZRLE24(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleZRLE24Up(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleZRLE24Down(rfbClient* client, int rx, int ry, int rw, int rh); --static rfbBool HandleZRLE32(rfbClient* client, int rx, int ry, int rw, int rh); --#endif -- --/* -- * Server Capability Functions -- */ --rfbBool --SupportsClient2Server(rfbClient* client, int messageType) --{ -- return (client->supportedMessages.client2server[((messageType & 0xFF)/8)] & (1<<(messageType % 8)) ? TRUE : FALSE); --} -- --rfbBool --SupportsServer2Client(rfbClient* client, int messageType) --{ -- return (client->supportedMessages.server2client[((messageType & 0xFF)/8)] & (1<<(messageType % 8)) ? TRUE : FALSE); --} -- --void --SetClient2Server(rfbClient* client, int messageType) --{ -- client->supportedMessages.client2server[((messageType & 0xFF)/8)] |= (1<<(messageType % 8)); --} -- --void --SetServer2Client(rfbClient* client, int messageType) --{ -- client->supportedMessages.server2client[((messageType & 0xFF)/8)] |= (1<<(messageType % 8)); --} -- --void --ClearClient2Server(rfbClient* client, int messageType) --{ -- client->supportedMessages.client2server[((messageType & 0xFF)/8)] &= (!(1<<(messageType % 8))); --} -- --void --ClearServer2Client(rfbClient* client, int messageType) --{ -- client->supportedMessages.server2client[((messageType & 0xFF)/8)] &= (!(1<<(messageType % 8))); --} -- -- --void --DefaultSupportedMessages(rfbClient* client) --{ -- memset((char *)&client->supportedMessages,0,sizeof(client->supportedMessages)); -- -- /* Default client supported messages (universal RFB 3.3 protocol) */ -- SetClient2Server(client, rfbSetPixelFormat); -- /* SetClient2Server(client, rfbFixColourMapEntries); Not currently supported */ -- SetClient2Server(client, rfbSetEncodings); -- SetClient2Server(client, rfbFramebufferUpdateRequest); -- SetClient2Server(client, rfbKeyEvent); -- SetClient2Server(client, rfbPointerEvent); -- SetClient2Server(client, rfbClientCutText); -- /* technically, we only care what we can *send* to the server -- * but, we set Server2Client Just in case it ever becomes useful -- */ -- SetServer2Client(client, rfbFramebufferUpdate); -- SetServer2Client(client, rfbSetColourMapEntries); -- SetServer2Client(client, rfbBell); -- SetServer2Client(client, rfbServerCutText); --} -- --void --DefaultSupportedMessagesUltraVNC(rfbClient* client) --{ -- DefaultSupportedMessages(client); -- SetClient2Server(client, rfbFileTransfer); -- SetClient2Server(client, rfbSetScale); -- SetClient2Server(client, rfbSetServerInput); -- SetClient2Server(client, rfbSetSW); -- SetClient2Server(client, rfbTextChat); -- SetClient2Server(client, rfbPalmVNCSetScaleFactor); -- /* technically, we only care what we can *send* to the server */ -- SetServer2Client(client, rfbResizeFrameBuffer); -- SetServer2Client(client, rfbPalmVNCReSizeFrameBuffer); -- SetServer2Client(client, rfbFileTransfer); -- SetServer2Client(client, rfbTextChat); --} -- -- --void --DefaultSupportedMessagesTightVNC(rfbClient* client) --{ -- DefaultSupportedMessages(client); -- SetClient2Server(client, rfbFileTransfer); -- SetClient2Server(client, rfbSetServerInput); -- SetClient2Server(client, rfbSetSW); -- /* SetClient2Server(client, rfbTextChat); */ -- /* technically, we only care what we can *send* to the server */ -- SetServer2Client(client, rfbFileTransfer); -- SetServer2Client(client, rfbTextChat); --} -- --#ifndef WIN32 --static rfbBool --IsUnixSocket(const char *name) --{ -- struct stat sb; -- if(stat(name, &sb) == 0 && (sb.st_mode & S_IFMT) == S_IFSOCK) -- return TRUE; -- return FALSE; --} --#endif -- --/* -- * ConnectToRFBServer. -- */ -- --rfbBool --ConnectToRFBServer(rfbClient* client,const char *hostname, int port) --{ -- if (client->serverPort==-1) { -- /* serverHost is a file recorded by vncrec. */ -- const char* magic="vncLog0.0"; -- char buffer[10]; -- rfbVNCRec* rec = (rfbVNCRec*)malloc(sizeof(rfbVNCRec)); -- client->vncRec = rec; -- -- rec->file = fopen(client->serverHost,"rb"); -- rec->tv.tv_sec = 0; -- rec->readTimestamp = FALSE; -- rec->doNotSleep = FALSE; -- -- if (!rec->file) { -- rfbClientLog("Could not open %s.\n",client->serverHost); -- return FALSE; -- } -- setbuf(rec->file,NULL); -- fread(buffer,1,strlen(magic),rec->file); -- if (strncmp(buffer,magic,strlen(magic))) { -- rfbClientLog("File %s was not recorded by vncrec.\n",client->serverHost); -- fclose(rec->file); -- return FALSE; -- } -- client->sock = -1; -- return TRUE; -- } -- --#ifndef WIN32 -- if(IsUnixSocket(hostname)) -- /* serverHost is a UNIX socket. */ -- client->sock = ConnectClientToUnixSock(hostname); -- else --#endif -- { --#ifdef LIBVNCSERVER_IPv6 -- client->sock = ConnectClientToTcpAddr6(hostname, port); -- if (client->sock == -1) --#endif -- { -- unsigned int host; -- -- /* serverHost is a hostname */ -- if (!StringToIPAddr(hostname, &host)) { -- rfbClientLog("Couldn't convert '%s' to host address\n", hostname); -- return FALSE; -- } -- client->sock = ConnectClientToTcpAddr(host, port); -- } -- } -- -- if (client->sock < 0) { -- rfbClientLog("Unable to connect to VNC server\n"); -- return FALSE; -- } -- -- if(client->QoS_DSCP && !SetDSCP(client->sock, client->QoS_DSCP)) -- return FALSE; -- -- return SetNonBlocking(client->sock); --} -- --/* -- * ConnectToRFBRepeater. -- */ -- --rfbBool ConnectToRFBRepeater(rfbClient* client,const char *repeaterHost, int repeaterPort, const char *destHost, int destPort) --{ -- rfbProtocolVersionMsg pv; -- int major,minor; -- char tmphost[250]; -- --#ifdef LIBVNCSERVER_IPv6 -- client->sock = ConnectClientToTcpAddr6(repeaterHost, repeaterPort); -- if (client->sock == -1) --#endif -- { -- unsigned int host; -- if (!StringToIPAddr(repeaterHost, &host)) { -- rfbClientLog("Couldn't convert '%s' to host address\n", repeaterHost); -- return FALSE; -- } -- -- client->sock = ConnectClientToTcpAddr(host, repeaterPort); -- } -- -- if (client->sock < 0) { -- rfbClientLog("Unable to connect to VNC repeater\n"); -- return FALSE; -- } -- -- if (!SetNonBlocking(client->sock)) -- return FALSE; -- -- if (!ReadFromRFBServer(client, pv, sz_rfbProtocolVersionMsg)) -- return FALSE; -- pv[sz_rfbProtocolVersionMsg] = 0; -- -- /* UltraVNC repeater always report version 000.000 to identify itself */ -- if (sscanf(pv,rfbProtocolVersionFormat,&major,&minor) != 2 || major != 0 || minor != 0) { -- rfbClientLog("Not a valid VNC repeater (%s)\n",pv); -- return FALSE; -- } -- -- rfbClientLog("Connected to VNC repeater, using protocol version %d.%d\n", major, minor); -- -- snprintf(tmphost, sizeof(tmphost), "%s:%d", destHost, destPort); -- if (!WriteToRFBServer(client, tmphost, sizeof(tmphost))) -- return FALSE; -- -- return TRUE; --} -- --extern void rfbClientEncryptBytes(unsigned char* bytes, char* passwd); --extern void rfbClientEncryptBytes2(unsigned char *where, const int length, unsigned char *key); -- --rfbBool --rfbHandleAuthResult(rfbClient* client) --{ -- uint32_t authResult=0, reasonLen=0; -- char *reason=NULL; -- -- if (!ReadFromRFBServer(client, (char *)&authResult, 4)) return FALSE; -- -- authResult = rfbClientSwap32IfLE(authResult); -- -- switch (authResult) { -- case rfbVncAuthOK: -- rfbClientLog("VNC authentication succeeded\n"); -- return TRUE; -- break; -- case rfbVncAuthFailed: -- if (client->major==3 && client->minor>7) -- { -- /* we have an error following */ -- if (!ReadFromRFBServer(client, (char *)&reasonLen, 4)) return FALSE; -- reasonLen = rfbClientSwap32IfLE(reasonLen); -- reason = malloc(reasonLen+1); -- if (!ReadFromRFBServer(client, reason, reasonLen)) { free(reason); return FALSE; } -- reason[reasonLen]=0; -- rfbClientLog("VNC connection failed: %s\n",reason); -- free(reason); -- return FALSE; -- } -- rfbClientLog("VNC authentication failed\n"); -- return FALSE; -- case rfbVncAuthTooMany: -- rfbClientLog("VNC authentication failed - too many tries\n"); -- return FALSE; -- } -- -- rfbClientLog("Unknown VNC authentication result: %d\n", -- (int)authResult); -- return FALSE; --} -- --static void --ReadReason(rfbClient* client) --{ -- uint32_t reasonLen; -- char *reason; -- -- /* we have an error following */ -- if (!ReadFromRFBServer(client, (char *)&reasonLen, 4)) return; -- reasonLen = rfbClientSwap32IfLE(reasonLen); -- reason = malloc(reasonLen+1); -- if (!ReadFromRFBServer(client, reason, reasonLen)) { free(reason); return; } -- reason[reasonLen]=0; -- rfbClientLog("VNC connection failed: %s\n",reason); -- free(reason); --} -- --static rfbBool --ReadSupportedSecurityType(rfbClient* client, uint32_t *result, rfbBool subAuth) --{ -- uint8_t count=0; -- uint8_t loop=0; -- uint8_t flag=0; -- uint8_t tAuth[256]; -- char buf1[500],buf2[10]; -- uint32_t authScheme; -- -- if (!ReadFromRFBServer(client, (char *)&count, 1)) return FALSE; -- -- if (count==0) -- { -- rfbClientLog("List of security types is ZERO, expecting an error to follow\n"); -- ReadReason(client); -- return FALSE; -- } -- -- rfbClientLog("We have %d security types to read\n", count); -- authScheme=0; -- /* now, we have a list of available security types to read ( uint8_t[] ) */ -- for (loop=0;loopGetCredential) || -- (!subAuth && (tAuth[loop]==rfbTLS || (tAuth[loop]==rfbVeNCrypt && client->GetCredential)))) -- { -- if (!subAuth && client->clientAuthSchemes) -- { -- int i; -- for (i=0;client->clientAuthSchemes[i];i++) -- { -- if (client->clientAuthSchemes[i]==(uint32_t)tAuth[loop]) -- { -- flag++; -- authScheme=tAuth[loop]; -- break; -- } -- } -- } -- else -- { -- flag++; -- authScheme=tAuth[loop]; -- } -- if (flag) -- { -- rfbClientLog("Selecting security type %d (%d/%d in the list)\n", authScheme, loop, count); -- /* send back a single byte indicating which security type to use */ -- if (!WriteToRFBServer(client, (char *)&tAuth[loop], 1)) return FALSE; -- } -- } -- } -- if (authScheme==0) -- { -- memset(buf1, 0, sizeof(buf1)); -- for (loop=0;loop=sizeof(buf1)-1) break; -- snprintf(buf2, sizeof(buf2), (loop>0 ? ", %d" : "%d"), (int)tAuth[loop]); -- strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1); -- } -- rfbClientLog("Unknown authentication scheme from VNC server: %s\n", -- buf1); -- return FALSE; -- } -- *result = authScheme; -- return TRUE; --} -- --static rfbBool --HandleVncAuth(rfbClient *client) --{ -- uint8_t challenge[CHALLENGESIZE]; -- char *passwd=NULL; -- int i; -- -- if (!ReadFromRFBServer(client, (char *)challenge, CHALLENGESIZE)) return FALSE; -- -- if (client->serverPort!=-1) { /* if not playing a vncrec file */ -- if (client->GetPassword) -- passwd = client->GetPassword(client); -- -- if ((!passwd) || (strlen(passwd) == 0)) { -- rfbClientLog("Reading password failed\n"); -- return FALSE; -- } -- if (strlen(passwd) > 8) { -- passwd[8] = '\0'; -- } -- -- rfbClientEncryptBytes(challenge, passwd); -- -- /* Lose the password from memory */ -- for (i = strlen(passwd); i >= 0; i--) { -- passwd[i] = '\0'; -- } -- free(passwd); -- -- if (!WriteToRFBServer(client, (char *)challenge, CHALLENGESIZE)) return FALSE; -- } -- -- /* Handle the SecurityResult message */ -- if (!rfbHandleAuthResult(client)) return FALSE; -- -- return TRUE; --} -- --static void --FreeUserCredential(rfbCredential *cred) --{ -- if (cred->userCredential.username) free(cred->userCredential.username); -- if (cred->userCredential.password) free(cred->userCredential.password); -- free(cred); --} -- --static rfbBool --HandlePlainAuth(rfbClient *client) --{ -- uint32_t ulen, ulensw; -- uint32_t plen, plensw; -- rfbCredential *cred; -- -- if (!client->GetCredential) -- { -- rfbClientLog("GetCredential callback is not set.\n"); -- return FALSE; -- } -- cred = client->GetCredential(client, rfbCredentialTypeUser); -- if (!cred) -- { -- rfbClientLog("Reading credential failed\n"); -- return FALSE; -- } -- -- ulen = (cred->userCredential.username ? strlen(cred->userCredential.username) : 0); -- ulensw = rfbClientSwap32IfLE(ulen); -- plen = (cred->userCredential.password ? strlen(cred->userCredential.password) : 0); -- plensw = rfbClientSwap32IfLE(plen); -- if (!WriteToRFBServer(client, (char *)&ulensw, 4) || -- !WriteToRFBServer(client, (char *)&plensw, 4)) -- { -- FreeUserCredential(cred); -- return FALSE; -- } -- if (ulen > 0) -- { -- if (!WriteToRFBServer(client, cred->userCredential.username, ulen)) -- { -- FreeUserCredential(cred); -- return FALSE; -- } -- } -- if (plen > 0) -- { -- if (!WriteToRFBServer(client, cred->userCredential.password, plen)) -- { -- FreeUserCredential(cred); -- return FALSE; -- } -- } -- -- FreeUserCredential(cred); -- -- /* Handle the SecurityResult message */ -- if (!rfbHandleAuthResult(client)) return FALSE; -- -- return TRUE; --} -- --/* Simple 64bit big integer arithmetic implementation */ --/* (x + y) % m, works even if (x + y) > 64bit */ --#define rfbAddM64(x,y,m) ((x+y)%m+(x+y0;x>>=1) -- { -- if (x&1) r=rfbAddM64(r,y,m); -- y=rfbAddM64(y,y,m); -- } -- return r; --} --/* (x ^ y) % m */ --static uint64_t --rfbPowM64(uint64_t b, uint64_t e, uint64_t m) --{ -- uint64_t r; -- for(r=1;e>0;e>>=1) -- { -- if(e&1) r=rfbMulM64(r,b,m); -- b=rfbMulM64(b,b,m); -- } -- return r; --} -- --static rfbBool --HandleMSLogonAuth(rfbClient *client) --{ -- uint64_t gen, mod, resp, priv, pub, key; -- uint8_t username[256], password[64]; -- rfbCredential *cred; -- -- if (!ReadFromRFBServer(client, (char *)&gen, 8)) return FALSE; -- if (!ReadFromRFBServer(client, (char *)&mod, 8)) return FALSE; -- if (!ReadFromRFBServer(client, (char *)&resp, 8)) return FALSE; -- gen = rfbClientSwap64IfLE(gen); -- mod = rfbClientSwap64IfLE(mod); -- resp = rfbClientSwap64IfLE(resp); -- -- if (!client->GetCredential) -- { -- rfbClientLog("GetCredential callback is not set.\n"); -- return FALSE; -- } -- rfbClientLog("WARNING! MSLogon security type has very low password encryption! "\ -- "Use it only with SSH tunnel or trusted network.\n"); -- cred = client->GetCredential(client, rfbCredentialTypeUser); -- if (!cred) -- { -- rfbClientLog("Reading credential failed\n"); -- return FALSE; -- } -- -- memset(username, 0, sizeof(username)); -- strncpy((char *)username, cred->userCredential.username, sizeof(username)); -- memset(password, 0, sizeof(password)); -- strncpy((char *)password, cred->userCredential.password, sizeof(password)); -- FreeUserCredential(cred); -- -- srand(time(NULL)); -- priv = ((uint64_t)rand())<<32; -- priv |= (uint64_t)rand(); -- -- pub = rfbPowM64(gen, priv, mod); -- key = rfbPowM64(resp, priv, mod); -- pub = rfbClientSwap64IfLE(pub); -- key = rfbClientSwap64IfLE(key); -- -- rfbClientEncryptBytes2(username, sizeof(username), (unsigned char *)&key); -- rfbClientEncryptBytes2(password, sizeof(password), (unsigned char *)&key); -- -- if (!WriteToRFBServer(client, (char *)&pub, 8)) return FALSE; -- if (!WriteToRFBServer(client, (char *)username, sizeof(username))) return FALSE; -- if (!WriteToRFBServer(client, (char *)password, sizeof(password))) return FALSE; -- -- /* Handle the SecurityResult message */ -- if (!rfbHandleAuthResult(client)) return FALSE; -- -- return TRUE; --} -- --#ifdef LIBVNCSERVER_WITH_CLIENT_GCRYPT --static rfbBool --rfbMpiToBytes(const gcry_mpi_t value, uint8_t *result, size_t size) --{ -- gcry_error_t error; -- size_t len; -- int i; -- -- error = gcry_mpi_print(GCRYMPI_FMT_USG, result, size, &len, value); -- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) -- { -- rfbClientLog("gcry_mpi_print error: %s\n", gcry_strerror(error)); -- return FALSE; -- } -- for (i=size-1;i>(int)size-1-(int)len;--i) -- result[i] = result[i-size+len]; -- for (;i>=0;--i) -- result[i] = 0; -- return TRUE; --} -- --static rfbBool --HandleARDAuth(rfbClient *client) --{ -- uint8_t gen[2], len[2]; -- size_t keylen; -- uint8_t *mod = NULL, *resp, *pub, *key, *shared; -- gcry_mpi_t genmpi = NULL, modmpi = NULL, respmpi = NULL; -- gcry_mpi_t privmpi = NULL, pubmpi = NULL, keympi = NULL; -- gcry_md_hd_t md5 = NULL; -- gcry_cipher_hd_t aes = NULL; -- gcry_error_t error; -- uint8_t userpass[128], ciphertext[128]; -- int passwordLen, usernameLen; -- rfbCredential *cred = NULL; -- rfbBool result = FALSE; -- -- while (1) -- { -- if (!ReadFromRFBServer(client, (char *)gen, 2)) -- break; -- if (!ReadFromRFBServer(client, (char *)len, 2)) -- break; -- -- if (!client->GetCredential) -- { -- rfbClientLog("GetCredential callback is not set.\n"); -- break; -- } -- cred = client->GetCredential(client, rfbCredentialTypeUser); -- if (!cred) -- { -- rfbClientLog("Reading credential failed\n"); -- break; -- } -- -- keylen = 256*len[0]+len[1]; -- mod = (uint8_t*)malloc(keylen*4); -- if (!mod) -- { -- rfbClientLog("malloc out of memory\n"); -- break; -- } -- resp = mod+keylen; -- pub = resp+keylen; -- key = pub+keylen; -- -- if (!ReadFromRFBServer(client, (char *)mod, keylen)) -- break; -- if (!ReadFromRFBServer(client, (char *)resp, keylen)) -- break; -- -- error = gcry_mpi_scan(&genmpi, GCRYMPI_FMT_USG, gen, 2, NULL); -- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) -- { -- rfbClientLog("gcry_mpi_scan error: %s\n", gcry_strerror(error)); -- break; -- } -- error = gcry_mpi_scan(&modmpi, GCRYMPI_FMT_USG, mod, keylen, NULL); -- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) -- { -- rfbClientLog("gcry_mpi_scan error: %s\n", gcry_strerror(error)); -- break; -- } -- error = gcry_mpi_scan(&respmpi, GCRYMPI_FMT_USG, resp, keylen, NULL); -- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) -- { -- rfbClientLog("gcry_mpi_scan error: %s\n", gcry_strerror(error)); -- break; -- } -- -- privmpi = gcry_mpi_new(keylen); -- if (!privmpi) -- { -- rfbClientLog("gcry_mpi_new out of memory\n"); -- break; -- } -- gcry_mpi_randomize(privmpi, (keylen/8)*8, GCRY_STRONG_RANDOM); -- -- pubmpi = gcry_mpi_new(keylen); -- if (!pubmpi) -- { -- rfbClientLog("gcry_mpi_new out of memory\n"); -- break; -- } -- gcry_mpi_powm(pubmpi, genmpi, privmpi, modmpi); -- -- keympi = gcry_mpi_new(keylen); -- if (!keympi) -- { -- rfbClientLog("gcry_mpi_new out of memory\n"); -- break; -- } -- gcry_mpi_powm(keympi, respmpi, privmpi, modmpi); -- -- if (!rfbMpiToBytes(pubmpi, pub, keylen)) -- break; -- if (!rfbMpiToBytes(keympi, key, keylen)) -- break; -- -- error = gcry_md_open(&md5, GCRY_MD_MD5, 0); -- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) -- { -- rfbClientLog("gcry_md_open error: %s\n", gcry_strerror(error)); -- break; -- } -- gcry_md_write(md5, key, keylen); -- error = gcry_md_final(md5); -- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) -- { -- rfbClientLog("gcry_md_final error: %s\n", gcry_strerror(error)); -- break; -- } -- shared = gcry_md_read(md5, GCRY_MD_MD5); -- -- passwordLen = strlen(cred->userCredential.password)+1; -- usernameLen = strlen(cred->userCredential.username)+1; -- if (passwordLen > sizeof(userpass)/2) -- passwordLen = sizeof(userpass)/2; -- if (usernameLen > sizeof(userpass)/2) -- usernameLen = sizeof(userpass)/2; -- -- gcry_randomize(userpass, sizeof(userpass), GCRY_STRONG_RANDOM); -- memcpy(userpass, cred->userCredential.username, usernameLen); -- memcpy(userpass+sizeof(userpass)/2, cred->userCredential.password, passwordLen); -- -- error = gcry_cipher_open(&aes, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_ECB, 0); -- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) -- { -- rfbClientLog("gcry_cipher_open error: %s\n", gcry_strerror(error)); -- break; -- } -- error = gcry_cipher_setkey(aes, shared, 16); -- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) -- { -- rfbClientLog("gcry_cipher_setkey error: %s\n", gcry_strerror(error)); -- break; -- } -- error = gcry_cipher_encrypt(aes, ciphertext, sizeof(ciphertext), userpass, sizeof(userpass)); -- if (gcry_err_code(error) != GPG_ERR_NO_ERROR) -- { -- rfbClientLog("gcry_cipher_encrypt error: %s\n", gcry_strerror(error)); -- break; -- } -- -- if (!WriteToRFBServer(client, (char *)ciphertext, sizeof(ciphertext))) -- break; -- if (!WriteToRFBServer(client, (char *)pub, keylen)) -- break; -- -- /* Handle the SecurityResult message */ -- if (!rfbHandleAuthResult(client)) -- break; -- -- result = TRUE; -- break; -- } -- -- if (cred) -- FreeUserCredential(cred); -- if (mod) -- free(mod); -- if (genmpi) -- gcry_mpi_release(genmpi); -- if (modmpi) -- gcry_mpi_release(modmpi); -- if (respmpi) -- gcry_mpi_release(respmpi); -- if (privmpi) -- gcry_mpi_release(privmpi); -- if (pubmpi) -- gcry_mpi_release(pubmpi); -- if (keympi) -- gcry_mpi_release(keympi); -- if (md5) -- gcry_md_close(md5); -- if (aes) -- gcry_cipher_close(aes); -- return result; --} --#endif -- --/* -- * SetClientAuthSchemes. -- */ -- --void --SetClientAuthSchemes(rfbClient* client,const uint32_t *authSchemes, int size) --{ -- int i; -- -- if (client->clientAuthSchemes) -- { -- free(client->clientAuthSchemes); -- client->clientAuthSchemes = NULL; -- } -- if (authSchemes) -- { -- if (size<0) -- { -- /* If size<0 we assume the passed-in list is also 0-terminate, so we -- * calculate the size here */ -- for (size=0;authSchemes[size];size++) ; -- } -- client->clientAuthSchemes = (uint32_t*)malloc(sizeof(uint32_t)*(size+1)); -- for (i=0;iclientAuthSchemes[i] = authSchemes[i]; -- client->clientAuthSchemes[size] = 0; -- } --} -- --/* -- * InitialiseRFBConnection. -- */ -- --rfbBool --InitialiseRFBConnection(rfbClient* client) --{ -- rfbProtocolVersionMsg pv; -- int major,minor; -- uint32_t authScheme; --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- uint32_t subAuthScheme; --#endif -- rfbClientInitMsg ci; -- -- /* if the connection is immediately closed, don't report anything, so -- that pmw's monitor can make test connections */ -- -- if (client->listenSpecified) -- errorMessageOnReadFailure = FALSE; -- -- if (!ReadFromRFBServer(client, pv, sz_rfbProtocolVersionMsg)) return FALSE; -- pv[sz_rfbProtocolVersionMsg]=0; -- -- errorMessageOnReadFailure = TRUE; -- -- pv[sz_rfbProtocolVersionMsg] = 0; -- -- if (sscanf(pv,rfbProtocolVersionFormat,&major,&minor) != 2) { -- rfbClientLog("Not a valid VNC server (%s)\n",pv); -- return FALSE; -- } -- -- -- DefaultSupportedMessages(client); -- client->major = major; -- client->minor = minor; -- -- /* fall back to viewer supported version */ -- if ((major==rfbProtocolMajorVersion) && (minor>rfbProtocolMinorVersion)) -- client->minor = rfbProtocolMinorVersion; -- -- /* UltraVNC uses minor codes 4 and 6 for the server */ -- if (major==3 && (minor==4 || minor==6)) { -- rfbClientLog("UltraVNC server detected, enabling UltraVNC specific messages\n",pv); -- DefaultSupportedMessagesUltraVNC(client); -- } -- -- /* TightVNC uses minor codes 5 for the server */ -- if (major==3 && minor==5) { -- rfbClientLog("TightVNC server detected, enabling TightVNC specific messages\n",pv); -- DefaultSupportedMessagesTightVNC(client); -- } -- -- /* we do not support > RFB3.8 */ -- if ((major==3 && minor>8) || major>3) -- { -- client->major=3; -- client->minor=8; -- } -- -- rfbClientLog("VNC server supports protocol version %d.%d (viewer %d.%d)\n", -- major, minor, rfbProtocolMajorVersion, rfbProtocolMinorVersion); -- -- sprintf(pv,rfbProtocolVersionFormat,client->major,client->minor); -- -- if (!WriteToRFBServer(client, pv, sz_rfbProtocolVersionMsg)) return FALSE; -- -- -- /* 3.7 and onwards sends a # of security types first */ -- if (client->major==3 && client->minor > 6) -- { -- if (!ReadSupportedSecurityType(client, &authScheme, FALSE)) return FALSE; -- } -- else -- { -- if (!ReadFromRFBServer(client, (char *)&authScheme, 4)) return FALSE; -- authScheme = rfbClientSwap32IfLE(authScheme); -- } -- -- rfbClientLog("Selected Security Scheme %d\n", authScheme); -- client->authScheme = authScheme; -- -- switch (authScheme) { -- -- case rfbConnFailed: -- ReadReason(client); -- return FALSE; -- -- case rfbNoAuth: -- rfbClientLog("No authentication needed\n"); -- -- /* 3.8 and upwards sends a Security Result for rfbNoAuth */ -- if ((client->major==3 && client->minor > 7) || client->major>3) -- if (!rfbHandleAuthResult(client)) return FALSE; -- -- break; -- -- case rfbVncAuth: -- if (!HandleVncAuth(client)) return FALSE; -- break; -- -- case rfbMSLogon: -- if (!HandleMSLogonAuth(client)) return FALSE; -- break; -- -- case rfbARD: --#ifndef LIBVNCSERVER_WITH_CLIENT_GCRYPT -- rfbClientLog("GCrypt support was not compiled in\n"); -- return FALSE; --#else -- if (!HandleARDAuth(client)) return FALSE; --#endif -- break; -- -- case rfbTLS: --#ifndef LIBVNCSERVER_WITH_CLIENT_TLS -- rfbClientLog("TLS support was not compiled in\n"); -- return FALSE; --#else -- if (!HandleAnonTLSAuth(client)) return FALSE; -- /* After the TLS session is established, sub auth types are expected. -- * Note that all following reading/writing are through the TLS session from here. -- */ -- if (!ReadSupportedSecurityType(client, &subAuthScheme, TRUE)) return FALSE; -- client->subAuthScheme = subAuthScheme; -- -- switch (subAuthScheme) { -- -- case rfbConnFailed: -- ReadReason(client); -- return FALSE; -- -- case rfbNoAuth: -- rfbClientLog("No sub authentication needed\n"); -- /* 3.8 and upwards sends a Security Result for rfbNoAuth */ -- if ((client->major==3 && client->minor > 7) || client->major>3) -- if (!rfbHandleAuthResult(client)) return FALSE; -- break; -- -- case rfbVncAuth: -- if (!HandleVncAuth(client)) return FALSE; -- break; -- -- default: -- rfbClientLog("Unknown sub authentication scheme from VNC server: %d\n", -- (int)subAuthScheme); -- return FALSE; -- } --#endif -- -- break; -- -- case rfbVeNCrypt: --#ifndef LIBVNCSERVER_WITH_CLIENT_TLS -- rfbClientLog("TLS support was not compiled in\n"); -- return FALSE; --#else -- if (!HandleVeNCryptAuth(client)) return FALSE; -- -- switch (client->subAuthScheme) { -- -- case rfbVeNCryptTLSNone: -- case rfbVeNCryptX509None: -- rfbClientLog("No sub authentication needed\n"); -- if (!rfbHandleAuthResult(client)) return FALSE; -- break; -- -- case rfbVeNCryptTLSVNC: -- case rfbVeNCryptX509VNC: -- if (!HandleVncAuth(client)) return FALSE; -- break; -- -- case rfbVeNCryptTLSPlain: -- case rfbVeNCryptX509Plain: -- if (!HandlePlainAuth(client)) return FALSE; -- break; -- -- default: -- rfbClientLog("Unknown sub authentication scheme from VNC server: %d\n", -- client->subAuthScheme); -- return FALSE; -- } --#endif -- break; -- -- default: -- rfbClientLog("Unknown authentication scheme from VNC server: %d\n", -- (int)authScheme); -- return FALSE; -- } -- -- ci.shared = (client->appData.shareDesktop ? 1 : 0); -- -- if (!WriteToRFBServer(client, (char *)&ci, sz_rfbClientInitMsg)) return FALSE; -- -- if (!ReadFromRFBServer(client, (char *)&client->si, sz_rfbServerInitMsg)) return FALSE; -- -- client->si.framebufferWidth = rfbClientSwap16IfLE(client->si.framebufferWidth); -- client->si.framebufferHeight = rfbClientSwap16IfLE(client->si.framebufferHeight); -- client->si.format.redMax = rfbClientSwap16IfLE(client->si.format.redMax); -- client->si.format.greenMax = rfbClientSwap16IfLE(client->si.format.greenMax); -- client->si.format.blueMax = rfbClientSwap16IfLE(client->si.format.blueMax); -- client->si.nameLength = rfbClientSwap32IfLE(client->si.nameLength); -- -- client->desktopName = malloc(client->si.nameLength + 1); -- if (!client->desktopName) { -- rfbClientLog("Error allocating memory for desktop name, %lu bytes\n", -- (unsigned long)client->si.nameLength); -- return FALSE; -- } -- -- if (!ReadFromRFBServer(client, client->desktopName, client->si.nameLength)) return FALSE; -- -- client->desktopName[client->si.nameLength] = 0; -- -- rfbClientLog("Desktop name \"%s\"\n",client->desktopName); -- -- rfbClientLog("Connected to VNC server, using protocol version %d.%d\n", -- client->major, client->minor); -- -- rfbClientLog("VNC server default format:\n"); -- PrintPixelFormat(&client->si.format); -- -- return TRUE; --} -- -- --/* -- * SetFormatAndEncodings. -- */ -- --rfbBool --SetFormatAndEncodings(rfbClient* client) --{ -- rfbSetPixelFormatMsg spf; -- char buf[sz_rfbSetEncodingsMsg + MAX_ENCODINGS * 4]; -- -- rfbSetEncodingsMsg *se = (rfbSetEncodingsMsg *)buf; -- uint32_t *encs = (uint32_t *)(&buf[sz_rfbSetEncodingsMsg]); -- int len = 0; -- rfbBool requestCompressLevel = FALSE; -- rfbBool requestQualityLevel = FALSE; -- rfbBool requestLastRectEncoding = FALSE; -- rfbClientProtocolExtension* e; -- -- if (!SupportsClient2Server(client, rfbSetPixelFormat)) return TRUE; -- -- spf.type = rfbSetPixelFormat; -- spf.format = client->format; -- spf.format.redMax = rfbClientSwap16IfLE(spf.format.redMax); -- spf.format.greenMax = rfbClientSwap16IfLE(spf.format.greenMax); -- spf.format.blueMax = rfbClientSwap16IfLE(spf.format.blueMax); -- -- if (!WriteToRFBServer(client, (char *)&spf, sz_rfbSetPixelFormatMsg)) -- return FALSE; -- -- -- if (!SupportsClient2Server(client, rfbSetEncodings)) return TRUE; -- -- se->type = rfbSetEncodings; -- se->nEncodings = 0; -- -- if (client->appData.encodingsString) { -- const char *encStr = client->appData.encodingsString; -- int encStrLen; -- do { -- const char *nextEncStr = strchr(encStr, ' '); -- if (nextEncStr) { -- encStrLen = nextEncStr - encStr; -- nextEncStr++; -- } else { -- encStrLen = strlen(encStr); -- } -- -- if (strncasecmp(encStr,"raw",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRaw); -- } else if (strncasecmp(encStr,"copyrect",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCopyRect); --#ifdef LIBVNCSERVER_HAVE_LIBZ --#ifdef LIBVNCSERVER_HAVE_LIBJPEG -- } else if (strncasecmp(encStr,"tight",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingTight); -- requestLastRectEncoding = TRUE; -- if (client->appData.compressLevel >= 0 && client->appData.compressLevel <= 9) -- requestCompressLevel = TRUE; -- if (client->appData.enableJPEG) -- requestQualityLevel = TRUE; --#endif --#endif -- } else if (strncasecmp(encStr,"hextile",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingHextile); --#ifdef LIBVNCSERVER_HAVE_LIBZ -- } else if (strncasecmp(encStr,"zlib",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZlib); -- if (client->appData.compressLevel >= 0 && client->appData.compressLevel <= 9) -- requestCompressLevel = TRUE; -- } else if (strncasecmp(encStr,"zlibhex",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZlibHex); -- if (client->appData.compressLevel >= 0 && client->appData.compressLevel <= 9) -- requestCompressLevel = TRUE; -- } else if (strncasecmp(encStr,"zrle",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZRLE); -- } else if (strncasecmp(encStr,"zywrle",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZYWRLE); -- requestQualityLevel = TRUE; --#endif -- } else if ((strncasecmp(encStr,"ultra",encStrLen) == 0) || (strncasecmp(encStr,"ultrazip",encStrLen) == 0)) { -- /* There are 2 encodings used in 'ultra' */ -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingUltra); -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingUltraZip); -- } else if (strncasecmp(encStr,"corre",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCoRRE); -- } else if (strncasecmp(encStr,"rre",encStrLen) == 0) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRRE); -- } else { -- rfbClientLog("Unknown encoding '%.*s'\n",encStrLen,encStr); -- } -- -- encStr = nextEncStr; -- } while (encStr && se->nEncodings < MAX_ENCODINGS); -- -- if (se->nEncodings < MAX_ENCODINGS && requestCompressLevel) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(client->appData.compressLevel + -- rfbEncodingCompressLevel0); -- } -- -- if (se->nEncodings < MAX_ENCODINGS && requestQualityLevel) { -- if (client->appData.qualityLevel < 0 || client->appData.qualityLevel > 9) -- client->appData.qualityLevel = 5; -- encs[se->nEncodings++] = rfbClientSwap32IfLE(client->appData.qualityLevel + -- rfbEncodingQualityLevel0); -- } -- } -- else { -- if (SameMachine(client->sock)) { -- /* TODO: -- if (!tunnelSpecified) { -- */ -- rfbClientLog("Same machine: preferring raw encoding\n"); -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRaw); -- /* -- } else { -- rfbClientLog("Tunneling active: preferring tight encoding\n"); -- } -- */ -- } -- -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCopyRect); --#ifdef LIBVNCSERVER_HAVE_LIBZ --#ifdef LIBVNCSERVER_HAVE_LIBJPEG -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingTight); -- requestLastRectEncoding = TRUE; --#endif --#endif -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingHextile); --#ifdef LIBVNCSERVER_HAVE_LIBZ -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZlib); -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZRLE); -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingZYWRLE); --#endif -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingUltra); -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingUltraZip); -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCoRRE); -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRRE); -- -- if (client->appData.compressLevel >= 0 && client->appData.compressLevel <= 9) { -- encs[se->nEncodings++] = rfbClientSwap32IfLE(client->appData.compressLevel + -- rfbEncodingCompressLevel0); -- } else /* if (!tunnelSpecified) */ { -- /* If -tunnel option was provided, we assume that server machine is -- not in the local network so we use default compression level for -- tight encoding instead of fast compression. Thus we are -- requesting level 1 compression only if tunneling is not used. */ -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingCompressLevel1); -- } -- -- if (client->appData.enableJPEG) { -- if (client->appData.qualityLevel < 0 || client->appData.qualityLevel > 9) -- client->appData.qualityLevel = 5; -- encs[se->nEncodings++] = rfbClientSwap32IfLE(client->appData.qualityLevel + -- rfbEncodingQualityLevel0); -- } -- } -- -- -- -- /* Remote Cursor Support (local to viewer) */ -- if (client->appData.useRemoteCursor) { -- if (se->nEncodings < MAX_ENCODINGS) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingXCursor); -- if (se->nEncodings < MAX_ENCODINGS) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingRichCursor); -- if (se->nEncodings < MAX_ENCODINGS) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingPointerPos); -- } -- -- /* Keyboard State Encodings */ -- if (se->nEncodings < MAX_ENCODINGS) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingKeyboardLedState); -- -- /* New Frame Buffer Size */ -- if (se->nEncodings < MAX_ENCODINGS && client->canHandleNewFBSize) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingNewFBSize); -- -- /* Last Rect */ -- if (se->nEncodings < MAX_ENCODINGS && requestLastRectEncoding) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingLastRect); -- -- /* Server Capabilities */ -- if (se->nEncodings < MAX_ENCODINGS) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingSupportedMessages); -- if (se->nEncodings < MAX_ENCODINGS) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingSupportedEncodings); -- if (se->nEncodings < MAX_ENCODINGS) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingServerIdentity); -- -- /* xvp */ -- if (se->nEncodings < MAX_ENCODINGS) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(rfbEncodingXvp); -- -- /* client extensions */ -- for(e = rfbClientExtensions; e; e = e->next) -- if(e->encodings) { -- int* enc; -- for(enc = e->encodings; *enc; enc++) -- encs[se->nEncodings++] = rfbClientSwap32IfLE(*enc); -- } -- -- len = sz_rfbSetEncodingsMsg + se->nEncodings * 4; -- -- se->nEncodings = rfbClientSwap16IfLE(se->nEncodings); -- -- if (!WriteToRFBServer(client, buf, len)) return FALSE; -- -- return TRUE; --} -- -- --/* -- * SendIncrementalFramebufferUpdateRequest. -- */ -- --rfbBool --SendIncrementalFramebufferUpdateRequest(rfbClient* client) --{ -- return SendFramebufferUpdateRequest(client, -- client->updateRect.x, client->updateRect.y, -- client->updateRect.w, client->updateRect.h, TRUE); --} -- -- --/* -- * SendFramebufferUpdateRequest. -- */ -- --rfbBool --SendFramebufferUpdateRequest(rfbClient* client, int x, int y, int w, int h, rfbBool incremental) --{ -- rfbFramebufferUpdateRequestMsg fur; -- -- if (!SupportsClient2Server(client, rfbFramebufferUpdateRequest)) return TRUE; -- -- fur.type = rfbFramebufferUpdateRequest; -- fur.incremental = incremental ? 1 : 0; -- fur.x = rfbClientSwap16IfLE(x); -- fur.y = rfbClientSwap16IfLE(y); -- fur.w = rfbClientSwap16IfLE(w); -- fur.h = rfbClientSwap16IfLE(h); -- -- if (!WriteToRFBServer(client, (char *)&fur, sz_rfbFramebufferUpdateRequestMsg)) -- return FALSE; -- -- return TRUE; --} -- -- --/* -- * SendScaleSetting. -- */ --rfbBool --SendScaleSetting(rfbClient* client,int scaleSetting) --{ -- rfbSetScaleMsg ssm; -- -- ssm.scale = scaleSetting; -- ssm.pad = 0; -- -- /* favor UltraVNC SetScale if both are supported */ -- if (SupportsClient2Server(client, rfbSetScale)) { -- ssm.type = rfbSetScale; -- if (!WriteToRFBServer(client, (char *)&ssm, sz_rfbSetScaleMsg)) -- return FALSE; -- } -- -- if (SupportsClient2Server(client, rfbPalmVNCSetScaleFactor)) { -- ssm.type = rfbPalmVNCSetScaleFactor; -- if (!WriteToRFBServer(client, (char *)&ssm, sz_rfbSetScaleMsg)) -- return FALSE; -- } -- -- return TRUE; --} -- --/* -- * TextChatFunctions (UltraVNC) -- * Extremely bandwidth friendly method of communicating with a user -- * (Think HelpDesk type applications) -- */ -- --rfbBool TextChatSend(rfbClient* client, char *text) --{ -- rfbTextChatMsg chat; -- int count = strlen(text); -- -- if (!SupportsClient2Server(client, rfbTextChat)) return TRUE; -- chat.type = rfbTextChat; -- chat.pad1 = 0; -- chat.pad2 = 0; -- chat.length = (uint32_t)count; -- chat.length = rfbClientSwap32IfLE(chat.length); -- -- if (!WriteToRFBServer(client, (char *)&chat, sz_rfbTextChatMsg)) -- return FALSE; -- -- if (count>0) { -- if (!WriteToRFBServer(client, text, count)) -- return FALSE; -- } -- return TRUE; --} -- --rfbBool TextChatOpen(rfbClient* client) --{ -- rfbTextChatMsg chat; -- -- if (!SupportsClient2Server(client, rfbTextChat)) return TRUE; -- chat.type = rfbTextChat; -- chat.pad1 = 0; -- chat.pad2 = 0; -- chat.length = rfbClientSwap32IfLE(rfbTextChatOpen); -- return (WriteToRFBServer(client, (char *)&chat, sz_rfbTextChatMsg) ? TRUE : FALSE); --} -- --rfbBool TextChatClose(rfbClient* client) --{ -- rfbTextChatMsg chat; -- if (!SupportsClient2Server(client, rfbTextChat)) return TRUE; -- chat.type = rfbTextChat; -- chat.pad1 = 0; -- chat.pad2 = 0; -- chat.length = rfbClientSwap32IfLE(rfbTextChatClose); -- return (WriteToRFBServer(client, (char *)&chat, sz_rfbTextChatMsg) ? TRUE : FALSE); --} -- --rfbBool TextChatFinish(rfbClient* client) --{ -- rfbTextChatMsg chat; -- if (!SupportsClient2Server(client, rfbTextChat)) return TRUE; -- chat.type = rfbTextChat; -- chat.pad1 = 0; -- chat.pad2 = 0; -- chat.length = rfbClientSwap32IfLE(rfbTextChatFinished); -- return (WriteToRFBServer(client, (char *)&chat, sz_rfbTextChatMsg) ? TRUE : FALSE); --} -- --/* -- * UltraVNC Server Input Disable -- * Apparently, the remote client can *prevent* the local user from interacting with the display -- * I would think this is extremely helpful when used in a HelpDesk situation -- */ --rfbBool PermitServerInput(rfbClient* client, int enabled) --{ -- rfbSetServerInputMsg msg; -- -- if (!SupportsClient2Server(client, rfbSetServerInput)) return TRUE; -- /* enabled==1, then server input from local keyboard is disabled */ -- msg.type = rfbSetServerInput; -- msg.status = (enabled ? 1 : 0); -- msg.pad = 0; -- return (WriteToRFBServer(client, (char *)&msg, sz_rfbSetServerInputMsg) ? TRUE : FALSE); --} -- -- --/* -- * send xvp client message -- * A client supporting the xvp extension sends this to request that the server initiate -- * a clean shutdown, clean reboot or abrupt reset of the system whose framebuffer the -- * client is displaying. -- * -- * only version 1 is defined in the protocol specs -- * -- * possible values for code are: -- * rfbXvp_Shutdown -- * rfbXvp_Reboot -- * rfbXvp_Reset -- */ -- --rfbBool SendXvpMsg(rfbClient* client, uint8_t version, uint8_t code) --{ -- rfbXvpMsg xvp; -- -- if (!SupportsClient2Server(client, rfbXvp)) return TRUE; -- xvp.type = rfbXvp; -- xvp.pad = 0; -- xvp.version = version; -- xvp.code = code; -- -- if (!WriteToRFBServer(client, (char *)&xvp, sz_rfbXvpMsg)) -- return FALSE; -- -- return TRUE; --} -- -- --/* -- * SendPointerEvent. -- */ -- --rfbBool --SendPointerEvent(rfbClient* client,int x, int y, int buttonMask) --{ -- rfbPointerEventMsg pe; -- -- if (!SupportsClient2Server(client, rfbPointerEvent)) return TRUE; -- -- pe.type = rfbPointerEvent; -- pe.buttonMask = buttonMask; -- if (x < 0) x = 0; -- if (y < 0) y = 0; -- -- pe.x = rfbClientSwap16IfLE(x); -- pe.y = rfbClientSwap16IfLE(y); -- return WriteToRFBServer(client, (char *)&pe, sz_rfbPointerEventMsg); --} -- -- --/* -- * SendKeyEvent. -- */ -- --rfbBool --SendKeyEvent(rfbClient* client, uint32_t key, rfbBool down) --{ -- rfbKeyEventMsg ke; -- -- if (!SupportsClient2Server(client, rfbKeyEvent)) return TRUE; -- -- ke.type = rfbKeyEvent; -- ke.down = down ? 1 : 0; -- ke.key = rfbClientSwap32IfLE(key); -- return WriteToRFBServer(client, (char *)&ke, sz_rfbKeyEventMsg); --} -- -- --/* -- * SendClientCutText. -- */ -- --rfbBool --SendClientCutText(rfbClient* client, char *str, int len) --{ -- rfbClientCutTextMsg cct; -- -- if (!SupportsClient2Server(client, rfbClientCutText)) return TRUE; -- -- cct.type = rfbClientCutText; -- cct.length = rfbClientSwap32IfLE(len); -- return (WriteToRFBServer(client, (char *)&cct, sz_rfbClientCutTextMsg) && -- WriteToRFBServer(client, str, len)); --} -- -- -- --/* -- * HandleRFBServerMessage. -- */ -- --rfbBool --HandleRFBServerMessage(rfbClient* client) --{ -- rfbServerToClientMsg msg; -- -- if (client->serverPort==-1) -- client->vncRec->readTimestamp = TRUE; -- if (!ReadFromRFBServer(client, (char *)&msg, 1)) -- return FALSE; -- -- switch (msg.type) { -- -- case rfbSetColourMapEntries: -- { -- /* TODO: -- int i; -- uint16_t rgb[3]; -- XColor xc; -- -- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, -- sz_rfbSetColourMapEntriesMsg - 1)) -- return FALSE; -- -- msg.scme.firstColour = rfbClientSwap16IfLE(msg.scme.firstColour); -- msg.scme.nColours = rfbClientSwap16IfLE(msg.scme.nColours); -- -- for (i = 0; i < msg.scme.nColours; i++) { -- if (!ReadFromRFBServer(client, (char *)rgb, 6)) -- return FALSE; -- xc.pixel = msg.scme.firstColour + i; -- xc.red = rfbClientSwap16IfLE(rgb[0]); -- xc.green = rfbClientSwap16IfLE(rgb[1]); -- xc.blue = rfbClientSwap16IfLE(rgb[2]); -- xc.flags = DoRed|DoGreen|DoBlue; -- XStoreColor(dpy, cmap, &xc); -- } -- */ -- -- break; -- } -- -- case rfbFramebufferUpdate: -- { -- rfbFramebufferUpdateRectHeader rect; -- int linesToRead; -- int bytesPerLine; -- int i; -- -- if (!ReadFromRFBServer(client, ((char *)&msg.fu) + 1, -- sz_rfbFramebufferUpdateMsg - 1)) -- return FALSE; -- -- msg.fu.nRects = rfbClientSwap16IfLE(msg.fu.nRects); -- -- for (i = 0; i < msg.fu.nRects; i++) { -- if (!ReadFromRFBServer(client, (char *)&rect, sz_rfbFramebufferUpdateRectHeader)) -- return FALSE; -- -- rect.encoding = rfbClientSwap32IfLE(rect.encoding); -- if (rect.encoding == rfbEncodingLastRect) -- break; -- -- rect.r.x = rfbClientSwap16IfLE(rect.r.x); -- rect.r.y = rfbClientSwap16IfLE(rect.r.y); -- rect.r.w = rfbClientSwap16IfLE(rect.r.w); -- rect.r.h = rfbClientSwap16IfLE(rect.r.h); -- -- -- if (rect.encoding == rfbEncodingXCursor || -- rect.encoding == rfbEncodingRichCursor) { -- -- if (!HandleCursorShape(client, -- rect.r.x, rect.r.y, rect.r.w, rect.r.h, -- rect.encoding)) { -- return FALSE; -- } -- continue; -- } -- -- if (rect.encoding == rfbEncodingPointerPos) { -- if (!client->HandleCursorPos(client,rect.r.x, rect.r.y)) { -- return FALSE; -- } -- continue; -- } -- -- if (rect.encoding == rfbEncodingKeyboardLedState) { -- /* OK! We have received a keyboard state message!!! */ -- client->KeyboardLedStateEnabled = 1; -- if (client->HandleKeyboardLedState!=NULL) -- client->HandleKeyboardLedState(client, rect.r.x, 0); -- /* stash it for the future */ -- client->CurrentKeyboardLedState = rect.r.x; -- continue; -- } -- -- if (rect.encoding == rfbEncodingNewFBSize) { -- client->width = rect.r.w; -- client->height = rect.r.h; -- client->updateRect.x = client->updateRect.y = 0; -- client->updateRect.w = client->width; -- client->updateRect.h = client->height; -- client->MallocFrameBuffer(client); -- SendFramebufferUpdateRequest(client, 0, 0, rect.r.w, rect.r.h, FALSE); -- rfbClientLog("Got new framebuffer size: %dx%d\n", rect.r.w, rect.r.h); -- continue; -- } -- -- /* rect.r.w=byte count */ -- if (rect.encoding == rfbEncodingSupportedMessages) { -- int loop; -- if (!ReadFromRFBServer(client, (char *)&client->supportedMessages, sz_rfbSupportedMessages)) -- return FALSE; -- -- /* msgs is two sets of bit flags of supported messages client2server[] and server2client[] */ -- /* currently ignored by this library */ -- -- rfbClientLog("client2server supported messages (bit flags)\n"); -- for (loop=0;loop<32;loop+=8) -- rfbClientLog("%02X: %04x %04x %04x %04x - %04x %04x %04x %04x\n", loop, -- client->supportedMessages.client2server[loop], client->supportedMessages.client2server[loop+1], -- client->supportedMessages.client2server[loop+2], client->supportedMessages.client2server[loop+3], -- client->supportedMessages.client2server[loop+4], client->supportedMessages.client2server[loop+5], -- client->supportedMessages.client2server[loop+6], client->supportedMessages.client2server[loop+7]); -- -- rfbClientLog("server2client supported messages (bit flags)\n"); -- for (loop=0;loop<32;loop+=8) -- rfbClientLog("%02X: %04x %04x %04x %04x - %04x %04x %04x %04x\n", loop, -- client->supportedMessages.server2client[loop], client->supportedMessages.server2client[loop+1], -- client->supportedMessages.server2client[loop+2], client->supportedMessages.server2client[loop+3], -- client->supportedMessages.server2client[loop+4], client->supportedMessages.server2client[loop+5], -- client->supportedMessages.server2client[loop+6], client->supportedMessages.server2client[loop+7]); -- continue; -- } -- -- /* rect.r.w=byte count, rect.r.h=# of encodings */ -- if (rect.encoding == rfbEncodingSupportedEncodings) { -- char *buffer; -- buffer = malloc(rect.r.w); -- if (!ReadFromRFBServer(client, buffer, rect.r.w)) -- { -- free(buffer); -- return FALSE; -- } -- -- /* buffer now contains rect.r.h # of uint32_t encodings that the server supports */ -- /* currently ignored by this library */ -- free(buffer); -- continue; -- } -- -- /* rect.r.w=byte count */ -- if (rect.encoding == rfbEncodingServerIdentity) { -- char *buffer; -- buffer = malloc(rect.r.w+1); -- if (!ReadFromRFBServer(client, buffer, rect.r.w)) -- { -- free(buffer); -- return FALSE; -- } -- buffer[rect.r.w]=0; /* null terminate, just in case */ -- rfbClientLog("Connected to Server \"%s\"\n", buffer); -- free(buffer); -- continue; -- } -- -- /* rfbEncodingUltraZip is a collection of subrects. x = # of subrects, and h is always 0 */ -- if (rect.encoding != rfbEncodingUltraZip) -- { -- if ((rect.r.x + rect.r.w > client->width) || -- (rect.r.y + rect.r.h > client->height)) -- { -- rfbClientLog("Rect too large: %dx%d at (%d, %d)\n", -- rect.r.w, rect.r.h, rect.r.x, rect.r.y); -- return FALSE; -- } -- -- /* UltraVNC with scaling, will send rectangles with a zero W or H -- * -- if ((rect.encoding != rfbEncodingTight) && -- (rect.r.h * rect.r.w == 0)) -- { -- rfbClientLog("Zero size rect - ignoring (encoding=%d (0x%08x) %dx, %dy, %dw, %dh)\n", rect.encoding, rect.encoding, rect.r.x, rect.r.y, rect.r.w, rect.r.h); -- continue; -- } -- */ -- -- /* If RichCursor encoding is used, we should prevent collisions -- between framebuffer updates and cursor drawing operations. */ -- client->SoftCursorLockArea(client, rect.r.x, rect.r.y, rect.r.w, rect.r.h); -- } -- -- switch (rect.encoding) { -- -- case rfbEncodingRaw: { -- int y=rect.r.y, h=rect.r.h; -- -- bytesPerLine = rect.r.w * client->format.bitsPerPixel / 8; -- linesToRead = RFB_BUFFER_SIZE / bytesPerLine; -- -- while (h > 0) { -- if (linesToRead > h) -- linesToRead = h; -- -- if (!ReadFromRFBServer(client, client->buffer,bytesPerLine * linesToRead)) -- return FALSE; -- -- CopyRectangle(client, (uint8_t *)client->buffer, -- rect.r.x, y, rect.r.w,linesToRead); -- -- h -= linesToRead; -- y += linesToRead; -- -- } -- } break; -- -- case rfbEncodingCopyRect: -- { -- rfbCopyRect cr; -- -- if (!ReadFromRFBServer(client, (char *)&cr, sz_rfbCopyRect)) -- return FALSE; -- -- cr.srcX = rfbClientSwap16IfLE(cr.srcX); -- cr.srcY = rfbClientSwap16IfLE(cr.srcY); -- -- /* If RichCursor encoding is used, we should extend our -- "cursor lock area" (previously set to destination -- rectangle) to the source rectangle as well. */ -- client->SoftCursorLockArea(client, -- cr.srcX, cr.srcY, rect.r.w, rect.r.h); -- -- if (client->GotCopyRect != NULL) { -- client->GotCopyRect(client, cr.srcX, cr.srcY, rect.r.w, rect.r.h, -- rect.r.x, rect.r.y); -- } else -- CopyRectangleFromRectangle(client, -- cr.srcX, cr.srcY, rect.r.w, rect.r.h, -- rect.r.x, rect.r.y); -- -- break; -- } -- -- case rfbEncodingRRE: -- { -- switch (client->format.bitsPerPixel) { -- case 8: -- if (!HandleRRE8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 16: -- if (!HandleRRE16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 32: -- if (!HandleRRE32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- } -- break; -- } -- -- case rfbEncodingCoRRE: -- { -- switch (client->format.bitsPerPixel) { -- case 8: -- if (!HandleCoRRE8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 16: -- if (!HandleCoRRE16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 32: -- if (!HandleCoRRE32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- } -- break; -- } -- -- case rfbEncodingHextile: -- { -- switch (client->format.bitsPerPixel) { -- case 8: -- if (!HandleHextile8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 16: -- if (!HandleHextile16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 32: -- if (!HandleHextile32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- } -- break; -- } -- -- case rfbEncodingUltra: -- { -- switch (client->format.bitsPerPixel) { -- case 8: -- if (!HandleUltra8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 16: -- if (!HandleUltra16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 32: -- if (!HandleUltra32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- } -- break; -- } -- case rfbEncodingUltraZip: -- { -- switch (client->format.bitsPerPixel) { -- case 8: -- if (!HandleUltraZip8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 16: -- if (!HandleUltraZip16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 32: -- if (!HandleUltraZip32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- } -- break; -- } -- --#ifdef LIBVNCSERVER_HAVE_LIBZ -- case rfbEncodingZlib: -- { -- switch (client->format.bitsPerPixel) { -- case 8: -- if (!HandleZlib8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 16: -- if (!HandleZlib16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 32: -- if (!HandleZlib32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- } -- break; -- } -- --#ifdef LIBVNCSERVER_HAVE_LIBJPEG -- case rfbEncodingTight: -- { -- switch (client->format.bitsPerPixel) { -- case 8: -- if (!HandleTight8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 16: -- if (!HandleTight16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 32: -- if (!HandleTight32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- } -- break; -- } --#endif -- case rfbEncodingZRLE: -- /* Fail safe for ZYWRLE unsupport VNC server. */ -- client->appData.qualityLevel = 9; -- /* fall through */ -- case rfbEncodingZYWRLE: -- { -- switch (client->format.bitsPerPixel) { -- case 8: -- if (!HandleZRLE8(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- case 16: -- if (client->si.format.greenMax > 0x1F) { -- if (!HandleZRLE16(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- } else { -- if (!HandleZRLE15(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- } -- break; -- case 32: -- { -- uint32_t maxColor=(client->format.redMax<format.redShift)| -- (client->format.greenMax<format.greenShift)| -- (client->format.blueMax<format.blueShift); -- if ((client->format.bigEndian && (maxColor&0xff)==0) || -- (!client->format.bigEndian && (maxColor&0xff000000)==0)) { -- if (!HandleZRLE24(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- } else if (!client->format.bigEndian && (maxColor&0xff)==0) { -- if (!HandleZRLE24Up(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- } else if (client->format.bigEndian && (maxColor&0xff000000)==0) { -- if (!HandleZRLE24Down(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- } else if (!HandleZRLE32(client, rect.r.x,rect.r.y,rect.r.w,rect.r.h)) -- return FALSE; -- break; -- } -- } -- break; -- } -- --#endif -- -- default: -- { -- rfbBool handled = FALSE; -- rfbClientProtocolExtension* e; -- -- for(e = rfbClientExtensions; !handled && e; e = e->next) -- if(e->handleEncoding && e->handleEncoding(client, &rect)) -- handled = TRUE; -- -- if(!handled) { -- rfbClientLog("Unknown rect encoding %d\n", -- (int)rect.encoding); -- return FALSE; -- } -- } -- } -- -- /* Now we may discard "soft cursor locks". */ -- client->SoftCursorUnlockScreen(client); -- -- client->GotFrameBufferUpdate(client, rect.r.x, rect.r.y, rect.r.w, rect.r.h); -- } -- -- if (!SendIncrementalFramebufferUpdateRequest(client)) -- return FALSE; -- -- if (client->FinishedFrameBufferUpdate) -- client->FinishedFrameBufferUpdate(client); -- -- break; -- } -- -- case rfbBell: -- { -- client->Bell(client); -- -- break; -- } -- -- case rfbServerCutText: -- { -- char *buffer; -- -- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, -- sz_rfbServerCutTextMsg - 1)) -- return FALSE; -- -- msg.sct.length = rfbClientSwap32IfLE(msg.sct.length); -- -- buffer = malloc(msg.sct.length+1); -- -- if (!ReadFromRFBServer(client, buffer, msg.sct.length)) -- return FALSE; -- -- buffer[msg.sct.length] = 0; -- -- if (client->GotXCutText) -- client->GotXCutText(client, buffer, msg.sct.length); -- -- free(buffer); -- -- break; -- } -- -- case rfbTextChat: -- { -- char *buffer=NULL; -- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, -- sz_rfbTextChatMsg- 1)) -- return FALSE; -- msg.tc.length = rfbClientSwap32IfLE(msg.sct.length); -- switch(msg.tc.length) { -- case rfbTextChatOpen: -- rfbClientLog("Received TextChat Open\n"); -- if (client->HandleTextChat!=NULL) -- client->HandleTextChat(client, (int)rfbTextChatOpen, NULL); -- break; -- case rfbTextChatClose: -- rfbClientLog("Received TextChat Close\n"); -- if (client->HandleTextChat!=NULL) -- client->HandleTextChat(client, (int)rfbTextChatClose, NULL); -- break; -- case rfbTextChatFinished: -- rfbClientLog("Received TextChat Finished\n"); -- if (client->HandleTextChat!=NULL) -- client->HandleTextChat(client, (int)rfbTextChatFinished, NULL); -- break; -- default: -- buffer=malloc(msg.tc.length+1); -- if (!ReadFromRFBServer(client, buffer, msg.tc.length)) -- { -- free(buffer); -- return FALSE; -- } -- /* Null Terminate */ -- buffer[msg.tc.length]=0; -- rfbClientLog("Received TextChat \"%s\"\n", buffer); -- if (client->HandleTextChat!=NULL) -- client->HandleTextChat(client, (int)msg.tc.length, buffer); -- free(buffer); -- break; -- } -- break; -- } -- -- case rfbXvp: -- { -- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, -- sz_rfbXvpMsg -1)) -- return FALSE; -- -- SetClient2Server(client, rfbXvp); -- /* technically, we only care what we can *send* to the server -- * but, we set Server2Client Just in case it ever becomes useful -- */ -- SetServer2Client(client, rfbXvp); -- -- if(client->HandleXvpMsg) -- client->HandleXvpMsg(client, msg.xvp.version, msg.xvp.code); -- -- break; -- } -- -- case rfbResizeFrameBuffer: -- { -- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, -- sz_rfbResizeFrameBufferMsg -1)) -- return FALSE; -- client->width = rfbClientSwap16IfLE(msg.rsfb.framebufferWidth); -- client->height = rfbClientSwap16IfLE(msg.rsfb.framebufferHeigth); -- client->updateRect.x = client->updateRect.y = 0; -- client->updateRect.w = client->width; -- client->updateRect.h = client->height; -- client->MallocFrameBuffer(client); -- SendFramebufferUpdateRequest(client, 0, 0, client->width, client->height, FALSE); -- rfbClientLog("Got new framebuffer size: %dx%d\n", client->width, client->height); -- break; -- } -- -- case rfbPalmVNCReSizeFrameBuffer: -- { -- if (!ReadFromRFBServer(client, ((char *)&msg) + 1, -- sz_rfbPalmVNCReSizeFrameBufferMsg -1)) -- return FALSE; -- client->width = rfbClientSwap16IfLE(msg.prsfb.buffer_w); -- client->height = rfbClientSwap16IfLE(msg.prsfb.buffer_h); -- client->updateRect.x = client->updateRect.y = 0; -- client->updateRect.w = client->width; -- client->updateRect.h = client->height; -- client->MallocFrameBuffer(client); -- SendFramebufferUpdateRequest(client, 0, 0, client->width, client->height, FALSE); -- rfbClientLog("Got new framebuffer size: %dx%d\n", client->width, client->height); -- break; -- } -- -- default: -- { -- rfbBool handled = FALSE; -- rfbClientProtocolExtension* e; -- -- for(e = rfbClientExtensions; !handled && e; e = e->next) -- if(e->handleMessage && e->handleMessage(client, &msg)) -- handled = TRUE; -- -- if(!handled) { -- char buffer[256]; -- rfbClientLog("Unknown message type %d from VNC server\n",msg.type); -- ReadFromRFBServer(client, buffer, 256); -- return FALSE; -- } -- } -- } -- -- return TRUE; --} -- -- --#define GET_PIXEL8(pix, ptr) ((pix) = *(ptr)++) -- --#define GET_PIXEL16(pix, ptr) (((uint8_t*)&(pix))[0] = *(ptr)++, \ -- ((uint8_t*)&(pix))[1] = *(ptr)++) -- --#define GET_PIXEL32(pix, ptr) (((uint8_t*)&(pix))[0] = *(ptr)++, \ -- ((uint8_t*)&(pix))[1] = *(ptr)++, \ -- ((uint8_t*)&(pix))[2] = *(ptr)++, \ -- ((uint8_t*)&(pix))[3] = *(ptr)++) -- --/* CONCAT2 concatenates its two arguments. CONCAT2E does the same but also -- expands its arguments if they are macros */ -- --#define CONCAT2(a,b) a##b --#define CONCAT2E(a,b) CONCAT2(a,b) --#define CONCAT3(a,b,c) a##b##c --#define CONCAT3E(a,b,c) CONCAT3(a,b,c) -- --#define BPP 8 --#include "rre.c" --#include "corre.c" --#include "hextile.c" --#include "ultra.c" --#include "zlib.c" --#include "tight.c" --#include "zrle.c" --#undef BPP --#define BPP 16 --#include "rre.c" --#include "corre.c" --#include "hextile.c" --#include "ultra.c" --#include "zlib.c" --#include "tight.c" --#include "zrle.c" --#define REALBPP 15 --#include "zrle.c" --#undef BPP --#define BPP 32 --#include "rre.c" --#include "corre.c" --#include "hextile.c" --#include "ultra.c" --#include "zlib.c" --#include "tight.c" --#include "zrle.c" --#define REALBPP 24 --#include "zrle.c" --#define REALBPP 24 --#define UNCOMP 8 --#include "zrle.c" --#define REALBPP 24 --#define UNCOMP -8 --#include "zrle.c" --#undef BPP -- -- --/* -- * PrintPixelFormat. -- */ -- --void --PrintPixelFormat(rfbPixelFormat *format) --{ -- if (format->bitsPerPixel == 1) { -- rfbClientLog(" Single bit per pixel.\n"); -- rfbClientLog( -- " %s significant bit in each byte is leftmost on the screen.\n", -- (format->bigEndian ? "Most" : "Least")); -- } else { -- rfbClientLog(" %d bits per pixel.\n",format->bitsPerPixel); -- if (format->bitsPerPixel != 8) { -- rfbClientLog(" %s significant byte first in each pixel.\n", -- (format->bigEndian ? "Most" : "Least")); -- } -- if (format->trueColour) { -- rfbClientLog(" TRUE colour: max red %d green %d blue %d" -- ", shift red %d green %d blue %d\n", -- format->redMax, format->greenMax, format->blueMax, -- format->redShift, format->greenShift, format->blueShift); -- } else { -- rfbClientLog(" Colour map (not true colour).\n"); -- } -- } --} -- --/* avoid name clashes with LibVNCServer */ -- --#define rfbEncryptBytes rfbClientEncryptBytes --#define rfbEncryptBytes2 rfbClientEncryptBytes2 --#define rfbDes rfbClientDes --#define rfbDesKey rfbClientDesKey --#define rfbUseKey rfbClientUseKey --#define rfbCPKey rfbClientCPKey -- --#include "vncauth.c" --#include "d3des.c" -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/rre.c b/remmina-plugins/vnc/libvncserver/libvncclient/rre.c -deleted file mode 100644 -index 94158c9..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/rre.c -+++ /dev/null -@@ -1,68 +0,0 @@ --/* -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* -- * rre.c - handle RRE encoding. -- * -- * This file shouldn't be compiled directly. It is included multiple times by -- * rfbproto.c, each time with a different definition of the macro BPP. For -- * each value of BPP, this file defines a function which handles an RRE -- * encoded rectangle with BPP bits per pixel. -- */ -- --#define HandleRREBPP CONCAT2E(HandleRRE,BPP) --#define CARDBPP CONCAT3E(uint,BPP,_t) -- --static rfbBool --HandleRREBPP (rfbClient* client, int rx, int ry, int rw, int rh) --{ -- rfbRREHeader hdr; -- int i; -- CARDBPP pix; -- rfbRectangle subrect; -- -- if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbRREHeader)) -- return FALSE; -- -- hdr.nSubrects = rfbClientSwap32IfLE(hdr.nSubrects); -- -- if (!ReadFromRFBServer(client, (char *)&pix, sizeof(pix))) -- return FALSE; -- -- FillRectangle(client, rx, ry, rw, rh, pix); -- -- for (i = 0; i < hdr.nSubrects; i++) { -- if (!ReadFromRFBServer(client, (char *)&pix, sizeof(pix))) -- return FALSE; -- -- if (!ReadFromRFBServer(client, (char *)&subrect, sz_rfbRectangle)) -- return FALSE; -- -- subrect.x = rfbClientSwap16IfLE(subrect.x); -- subrect.y = rfbClientSwap16IfLE(subrect.y); -- subrect.w = rfbClientSwap16IfLE(subrect.w); -- subrect.h = rfbClientSwap16IfLE(subrect.h); -- -- FillRectangle(client, rx+subrect.x, ry+subrect.y, subrect.w, subrect.h, pix); -- } -- -- return TRUE; --} -- --#undef CARDBPP -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/sockets.c b/remmina-plugins/vnc/libvncserver/libvncclient/sockets.c -deleted file mode 100644 -index 6c8cec1..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/sockets.c -+++ /dev/null -@@ -1,743 +0,0 @@ --/* -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* -- * sockets.c - functions to deal with sockets. -- */ -- --#ifdef __STRICT_ANSI__ --#define _BSD_SOURCE --#endif --#include --#include --#include --#include --#include --#ifdef WIN32 --#undef SOCKET --#include --#define EWOULDBLOCK WSAEWOULDBLOCK --#define close closesocket --#define read(sock,buf,len) recv(sock,buf,len,0) --#define write(sock,buf,len) send(sock,buf,len,0) --#define socklen_t int --#ifdef LIBVNCSERVER_HAVE_WS2TCPIP_H --#undef socklen_t --#include --#endif --#else --#include --#include --#include --#include --#include --#include --#endif --#include "tls.h" -- --void PrintInHex(char *buf, int len); -- --rfbBool errorMessageOnReadFailure = TRUE; -- --/* -- * ReadFromRFBServer is called whenever we want to read some data from the RFB -- * server. It is non-trivial for two reasons: -- * -- * 1. For efficiency it performs some intelligent buffering, avoiding invoking -- * the read() system call too often. For small chunks of data, it simply -- * copies the data out of an internal buffer. For large amounts of data it -- * reads directly into the buffer provided by the caller. -- * -- * 2. Whenever read() would block, it invokes the Xt event dispatching -- * mechanism to process X events. In fact, this is the only place these -- * events are processed, as there is no XtAppMainLoop in the program. -- */ -- --rfbBool --ReadFromRFBServer(rfbClient* client, char *out, unsigned int n) --{ --#undef DEBUG_READ_EXACT --#ifdef DEBUG_READ_EXACT -- char* oout=out; -- int nn=n; -- rfbClientLog("ReadFromRFBServer %d bytes\n",n); --#endif -- if (client->serverPort==-1) { -- /* vncrec playing */ -- rfbVNCRec* rec = client->vncRec; -- struct timeval tv; -- -- if (rec->readTimestamp) { -- rec->readTimestamp = FALSE; -- if (!fread(&tv,sizeof(struct timeval),1,rec->file)) -- return FALSE; -- -- tv.tv_sec = rfbClientSwap32IfLE (tv.tv_sec); -- tv.tv_usec = rfbClientSwap32IfLE (tv.tv_usec); -- -- if (rec->tv.tv_sec!=0 && !rec->doNotSleep) { -- struct timeval diff; -- diff.tv_sec = tv.tv_sec - rec->tv.tv_sec; -- diff.tv_usec = tv.tv_usec - rec->tv.tv_usec; -- if(diff.tv_usec<0) { -- diff.tv_sec--; -- diff.tv_usec+=1000000; -- } --#ifndef __MINGW32__ -- sleep (diff.tv_sec); -- usleep (diff.tv_usec); --#else -- Sleep (diff.tv_sec * 1000 + diff.tv_usec/1000); --#endif -- } -- -- rec->tv=tv; -- } -- -- return (fread(out,1,n,rec->file)<0?FALSE:TRUE); -- } -- -- if (n <= client->buffered) { -- memcpy(out, client->bufoutptr, n); -- client->bufoutptr += n; -- client->buffered -= n; --#ifdef DEBUG_READ_EXACT -- goto hexdump; --#endif -- return TRUE; -- } -- -- memcpy(out, client->bufoutptr, client->buffered); -- -- out += client->buffered; -- n -= client->buffered; -- -- client->bufoutptr = client->buf; -- client->buffered = 0; -- -- if (n <= RFB_BUF_SIZE) { -- -- while (client->buffered < n) { -- int i; --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- if (client->tlsSession) { -- i = ReadFromTLS(client, client->buf + client->buffered, RFB_BUF_SIZE - client->buffered); -- } else { --#endif -- i = read(client->sock, client->buf + client->buffered, RFB_BUF_SIZE - client->buffered); --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- } --#endif -- if (i <= 0) { -- if (i < 0) { --#ifdef WIN32 -- errno=WSAGetLastError(); --#endif -- if (errno == EWOULDBLOCK || errno == EAGAIN) { -- /* TODO: -- ProcessXtEvents(); -- */ -- WaitForMessage(client, 100000); -- i = 0; -- } else { -- rfbClientErr("read (%d: %s)\n",errno,strerror(errno)); -- return FALSE; -- } -- } else { -- if (errorMessageOnReadFailure) { -- rfbClientLog("VNC server closed connection\n"); -- } -- return FALSE; -- } -- } -- client->buffered += i; -- } -- -- memcpy(out, client->bufoutptr, n); -- client->bufoutptr += n; -- client->buffered -= n; -- -- } else { -- -- while (n > 0) { -- int i; --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- if (client->tlsSession) { -- i = ReadFromTLS(client, out, n); -- } else { --#endif -- i = read(client->sock, out, n); --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- } --#endif -- if (i <= 0) { -- if (i < 0) { --#ifdef WIN32 -- errno=WSAGetLastError(); --#endif -- if (errno == EWOULDBLOCK || errno == EAGAIN) { -- /* TODO: -- ProcessXtEvents(); -- */ -- WaitForMessage(client, 100000); -- i = 0; -- } else { -- rfbClientErr("read (%s)\n",strerror(errno)); -- return FALSE; -- } -- } else { -- if (errorMessageOnReadFailure) { -- rfbClientLog("VNC server closed connection\n"); -- } -- return FALSE; -- } -- } -- out += i; -- n -= i; -- } -- } -- --#ifdef DEBUG_READ_EXACT --hexdump: -- { int ii; -- for(ii=0;iiserverPort==-1) -- return TRUE; /* vncrec playing */ -- --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- if (client->tlsSession) { -- /* WriteToTLS() will guarantee either everything is written, or error/eof returns */ -- i = WriteToTLS(client, buf, n); -- if (i <= 0) return FALSE; -- -- return TRUE; -- } --#endif -- -- while (i < n) { -- j = write(client->sock, buf + i, (n - i)); -- if (j <= 0) { -- if (j < 0) { --#ifdef WIN32 -- errno=WSAGetLastError(); --#endif -- if (errno == EWOULDBLOCK || --#ifdef LIBVNCSERVER_ENOENT_WORKAROUND -- errno == ENOENT || --#endif -- errno == EAGAIN) { -- FD_ZERO(&fds); -- FD_SET(client->sock,&fds); -- -- if (select(client->sock+1, NULL, &fds, NULL, NULL) <= 0) { -- rfbClientErr("select\n"); -- return FALSE; -- } -- j = 0; -- } else { -- rfbClientErr("write\n"); -- return FALSE; -- } -- } else { -- rfbClientLog("write failed\n"); -- return FALSE; -- } -- } -- i += j; -- } -- return TRUE; --} -- -- -- --static int initSockets() { --#ifdef WIN32 -- WSADATA trash; -- static rfbBool WSAinitted=FALSE; -- if(!WSAinitted) { -- int i=WSAStartup(MAKEWORD(2,0),&trash); -- if(i!=0) { -- rfbClientErr("Couldn't init Windows Sockets\n"); -- return 0; -- } -- WSAinitted=TRUE; -- } --#endif -- return 1; --} -- --/* -- * ConnectToTcpAddr connects to the given TCP port. -- */ -- --int --ConnectClientToTcpAddr(unsigned int host, int port) --{ -- int sock; -- struct sockaddr_in addr; -- int one = 1; -- -- if (!initSockets()) -- return -1; -- -- addr.sin_family = AF_INET; -- addr.sin_port = htons(port); -- addr.sin_addr.s_addr = host; -- -- sock = socket(AF_INET, SOCK_STREAM, 0); -- if (sock < 0) { --#ifdef WIN32 -- errno=WSAGetLastError(); --#endif -- rfbClientErr("ConnectToTcpAddr: socket (%s)\n",strerror(errno)); -- return -1; -- } -- -- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) { -- rfbClientErr("ConnectToTcpAddr: connect\n"); -- close(sock); -- return -1; -- } -- -- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, -- (char *)&one, sizeof(one)) < 0) { -- rfbClientErr("ConnectToTcpAddr: setsockopt\n"); -- close(sock); -- return -1; -- } -- -- return sock; --} -- --int --ConnectClientToTcpAddr6(const char *hostname, int port) --{ --#ifdef LIBVNCSERVER_IPv6 -- int sock; -- int n; -- struct addrinfo hints, *res, *ressave; -- char port_s[10]; -- int one = 1; -- -- if (!initSockets()) -- return -1; -- -- snprintf(port_s, 10, "%d", port); -- memset(&hints, 0, sizeof(struct addrinfo)); -- hints.ai_family = AF_UNSPEC; -- hints.ai_socktype = SOCK_STREAM; -- if ((n = getaddrinfo(hostname, port_s, &hints, &res))) -- { -- rfbClientErr("ConnectClientToTcpAddr6: getaddrinfo (%s)\n", gai_strerror(n)); -- return -1; -- } -- -- ressave = res; -- sock = -1; -- while (res) -- { -- sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol); -- if (sock >= 0) -- { -- if (connect(sock, res->ai_addr, res->ai_addrlen) == 0) -- break; -- close(sock); -- sock = -1; -- } -- res = res->ai_next; -- } -- freeaddrinfo(ressave); -- -- if (sock == -1) -- { -- rfbClientErr("ConnectClientToTcpAddr6: connect\n"); -- return -1; -- } -- -- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, -- (char *)&one, sizeof(one)) < 0) { -- rfbClientErr("ConnectToTcpAddr: setsockopt\n"); -- close(sock); -- return -1; -- } -- -- return sock; -- --#else -- -- rfbClientErr("ConnectClientToTcpAddr6: IPv6 disabled\n"); -- return -1; -- --#endif --} -- --int --ConnectClientToUnixSock(const char *sockFile) --{ --#ifdef WIN32 -- rfbClientErr("Windows doesn't support UNIX sockets\n"); -- return -1; --#else -- int sock; -- struct sockaddr_un addr; -- addr.sun_family = AF_UNIX; -- strcpy(addr.sun_path, sockFile); -- -- sock = socket(AF_UNIX, SOCK_STREAM, 0); -- if (sock < 0) { -- rfbClientErr("ConnectToUnixSock: socket (%s)\n",strerror(errno)); -- return -1; -- } -- -- if (connect(sock, (struct sockaddr *)&addr, sizeof(addr.sun_family) + strlen(addr.sun_path)) < 0) { -- rfbClientErr("ConnectToUnixSock: connect\n"); -- close(sock); -- return -1; -- } -- -- return sock; --#endif --} -- -- -- --/* -- * FindFreeTcpPort tries to find unused TCP port in the range -- * (TUNNEL_PORT_OFFSET, TUNNEL_PORT_OFFSET + 99]. Returns 0 on failure. -- */ -- --int --FindFreeTcpPort(void) --{ -- int sock, port; -- struct sockaddr_in addr; -- -- addr.sin_family = AF_INET; -- addr.sin_addr.s_addr = htonl(INADDR_ANY); -- -- if (!initSockets()) -- return -1; -- -- sock = socket(AF_INET, SOCK_STREAM, 0); -- if (sock < 0) { -- rfbClientErr(": FindFreeTcpPort: socket\n"); -- return 0; -- } -- -- for (port = TUNNEL_PORT_OFFSET + 99; port > TUNNEL_PORT_OFFSET; port--) { -- addr.sin_port = htons((unsigned short)port); -- if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0) { -- close(sock); -- return port; -- } -- } -- -- close(sock); -- return 0; --} -- -- --/* -- * ListenAtTcpPort starts listening at the given TCP port. -- */ -- --int --ListenAtTcpPort(int port) --{ -- int sock; -- struct sockaddr_in addr; -- int one = 1; -- -- addr.sin_family = AF_INET; -- addr.sin_port = htons(port); -- addr.sin_addr.s_addr = htonl(INADDR_ANY); -- -- if (!initSockets()) -- return -1; -- -- sock = socket(AF_INET, SOCK_STREAM, 0); -- if (sock < 0) { -- rfbClientErr("ListenAtTcpPort: socket\n"); -- return -1; -- } -- -- if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, -- (const char *)&one, sizeof(one)) < 0) { -- rfbClientErr("ListenAtTcpPort: setsockopt\n"); -- close(sock); -- return -1; -- } -- -- if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) { -- rfbClientErr("ListenAtTcpPort: bind\n"); -- close(sock); -- return -1; -- } -- -- if (listen(sock, 5) < 0) { -- rfbClientErr("ListenAtTcpPort: listen\n"); -- close(sock); -- return -1; -- } -- -- return sock; --} -- -- --/* -- * AcceptTcpConnection accepts a TCP connection. -- */ -- --int --AcceptTcpConnection(int listenSock) --{ -- int sock; -- struct sockaddr_in addr; -- socklen_t addrlen = sizeof(addr); -- int one = 1; -- -- sock = accept(listenSock, (struct sockaddr *) &addr, &addrlen); -- if (sock < 0) { -- rfbClientErr("AcceptTcpConnection: accept\n"); -- return -1; -- } -- -- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, -- (char *)&one, sizeof(one)) < 0) { -- rfbClientErr("AcceptTcpConnection: setsockopt\n"); -- close(sock); -- return -1; -- } -- -- return sock; --} -- -- --/* -- * SetNonBlocking sets a socket into non-blocking mode. -- */ -- --rfbBool --SetNonBlocking(int sock) --{ --#ifdef WIN32 -- unsigned long block=1; -- if(ioctlsocket(sock, FIONBIO, &block) == SOCKET_ERROR) { -- errno=WSAGetLastError(); --#else -- int flags = fcntl(sock, F_GETFL); -- if(flags < 0 || fcntl(sock, F_SETFL, flags | O_NONBLOCK) < 0) { --#endif -- rfbClientErr("Setting socket to non-blocking failed: %s\n",strerror(errno)); -- return FALSE; -- } -- return TRUE; --} -- -- -- --/* -- * SetDSCP sets a socket's IP QoS parameters aka Differentiated Services Code Point field -- */ -- --rfbBool --SetDSCP(int sock, int dscp) --{ --#ifdef WIN32 -- rfbClientErr("Setting of QoS IP DSCP not implemented for Windows\n"); -- return TRUE; --#else -- int level, cmd; -- struct sockaddr addr; -- socklen_t addrlen = sizeof(addr); -- -- if(getsockname(sock, &addr, &addrlen) != 0) { -- rfbClientErr("Setting socket QoS failed while getting socket address: %s\n",strerror(errno)); -- return FALSE; -- } -- -- switch(addr.sa_family) -- { --#if defined LIBVNCSERVER_IPv6 && defined IPV6_TCLASS -- case AF_INET6: -- level = IPPROTO_IPV6; -- cmd = IPV6_TCLASS; -- break; --#endif -- case AF_INET: -- level = IPPROTO_IP; -- cmd = IP_TOS; -- break; -- default: -- rfbClientErr("Setting socket QoS failed: Not bound to IP address"); -- return FALSE; -- } -- -- if(setsockopt(sock, level, cmd, (void*)&dscp, sizeof(dscp)) != 0) { -- rfbClientErr("Setting socket QoS failed: %s\n", strerror(errno)); -- return FALSE; -- } -- -- return TRUE; --#endif --} -- -- -- --/* -- * StringToIPAddr - convert a host string to an IP address. -- */ -- --rfbBool --StringToIPAddr(const char *str, unsigned int *addr) --{ -- struct hostent *hp; -- -- if (strcmp(str,"") == 0) { -- *addr = htonl(INADDR_LOOPBACK); /* local */ -- return TRUE; -- } -- -- *addr = inet_addr(str); -- -- if (*addr != -1) -- return TRUE; -- -- if (!initSockets()) -- return -1; -- -- hp = gethostbyname(str); -- -- if (hp) { -- *addr = *(unsigned int *)hp->h_addr; -- return TRUE; -- } -- -- return FALSE; --} -- -- --/* -- * Test if the other end of a socket is on the same machine. -- */ -- --rfbBool --SameMachine(int sock) --{ -- struct sockaddr_in peeraddr, myaddr; -- socklen_t addrlen = sizeof(struct sockaddr_in); -- -- getpeername(sock, (struct sockaddr *)&peeraddr, &addrlen); -- getsockname(sock, (struct sockaddr *)&myaddr, &addrlen); -- -- return (peeraddr.sin_addr.s_addr == myaddr.sin_addr.s_addr); --} -- -- --/* -- * Print out the contents of a packet for debugging. -- */ -- --void --PrintInHex(char *buf, int len) --{ -- int i, j; -- char c, str[17]; -- -- str[16] = 0; -- -- rfbClientLog("ReadExact: "); -- -- for (i = 0; i < len; i++) -- { -- if ((i % 16 == 0) && (i != 0)) { -- rfbClientLog(" "); -- } -- c = buf[i]; -- str[i % 16] = (((c > 31) && (c < 127)) ? c : '.'); -- rfbClientLog("%02x ",(unsigned char)c); -- if ((i % 4) == 3) -- rfbClientLog(" "); -- if ((i % 16) == 15) -- { -- rfbClientLog("%s\n",str); -- } -- } -- if ((i % 16) != 0) -- { -- for (j = i % 16; j < 16; j++) -- { -- rfbClientLog(" "); -- if ((j % 4) == 3) rfbClientLog(" "); -- } -- str[i % 16] = 0; -- rfbClientLog("%s\n",str); -- } -- -- fflush(stderr); --} -- --int WaitForMessage(rfbClient* client,unsigned int usecs) --{ -- fd_set fds; -- struct timeval timeout; -- int num; -- -- if (client->serverPort==-1) -- /* playing back vncrec file */ -- return 1; -- -- timeout.tv_sec=(usecs/1000000); -- timeout.tv_usec=(usecs%1000000); -- -- FD_ZERO(&fds); -- FD_SET(client->sock,&fds); -- -- num=select(client->sock+1, &fds, NULL, NULL, &timeout); -- if(num<0) { --#ifdef WIN32 -- errno=WSAGetLastError(); --#endif -- rfbClientLog("Waiting for message failed: %d (%s)\n",errno,strerror(errno)); -- } -- -- return num; --} -- -- -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/tight.c b/remmina-plugins/vnc/libvncserver/libvncclient/tight.c -deleted file mode 100644 -index 2f9fbab..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/tight.c -+++ /dev/null -@@ -1,688 +0,0 @@ --/* -- * Copyright (C) 2000, 2001 Const Kaplinsky. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --#ifdef LIBVNCSERVER_HAVE_LIBZ --#ifdef LIBVNCSERVER_HAVE_LIBJPEG -- --/* -- * tight.c - handle ``tight'' encoding. -- * -- * This file shouldn't be compiled directly. It is included multiple -- * times by rfbproto.c, each time with a different definition of the -- * macro BPP. For each value of BPP, this file defines a function -- * which handles a tight-encoded rectangle with BPP bits per pixel. -- * -- */ -- --#define TIGHT_MIN_TO_COMPRESS 12 -- --#define CARDBPP CONCAT3E(uint,BPP,_t) --#define filterPtrBPP CONCAT2E(filterPtr,BPP) -- --#define HandleTightBPP CONCAT2E(HandleTight,BPP) --#define InitFilterCopyBPP CONCAT2E(InitFilterCopy,BPP) --#define InitFilterPaletteBPP CONCAT2E(InitFilterPalette,BPP) --#define InitFilterGradientBPP CONCAT2E(InitFilterGradient,BPP) --#define FilterCopyBPP CONCAT2E(FilterCopy,BPP) --#define FilterPaletteBPP CONCAT2E(FilterPalette,BPP) --#define FilterGradientBPP CONCAT2E(FilterGradient,BPP) -- --#if BPP != 8 --#define DecompressJpegRectBPP CONCAT2E(DecompressJpegRect,BPP) --#endif -- --#ifndef RGB_TO_PIXEL -- --#define RGB_TO_PIXEL(bpp,r,g,b) \ -- (((CARD##bpp)(r) & client->format.redMax) << client->format.redShift | \ -- ((CARD##bpp)(g) & client->format.greenMax) << client->format.greenShift | \ -- ((CARD##bpp)(b) & client->format.blueMax) << client->format.blueShift) -- --#define RGB24_TO_PIXEL(bpp,r,g,b) \ -- ((((CARD##bpp)(r) & 0xFF) * client->format.redMax + 127) / 255 \ -- << client->format.redShift | \ -- (((CARD##bpp)(g) & 0xFF) * client->format.greenMax + 127) / 255 \ -- << client->format.greenShift | \ -- (((CARD##bpp)(b) & 0xFF) * client->format.blueMax + 127) / 255 \ -- << client->format.blueShift) -- --#define RGB24_TO_PIXEL32(r,g,b) \ -- (((uint32_t)(r) & 0xFF) << client->format.redShift | \ -- ((uint32_t)(g) & 0xFF) << client->format.greenShift | \ -- ((uint32_t)(b) & 0xFF) << client->format.blueShift) -- --#endif -- --/* Type declarations */ -- --typedef void (*filterPtrBPP)(rfbClient* client, int, CARDBPP *); -- --/* Prototypes */ -- --static int InitFilterCopyBPP (rfbClient* client, int rw, int rh); --static int InitFilterPaletteBPP (rfbClient* client, int rw, int rh); --static int InitFilterGradientBPP (rfbClient* client, int rw, int rh); --static void FilterCopyBPP (rfbClient* client, int numRows, CARDBPP *destBuffer); --static void FilterPaletteBPP (rfbClient* client, int numRows, CARDBPP *destBuffer); --static void FilterGradientBPP (rfbClient* client, int numRows, CARDBPP *destBuffer); -- --#if BPP != 8 --static rfbBool DecompressJpegRectBPP(rfbClient* client, int x, int y, int w, int h); --#endif -- --/* Definitions */ -- --static rfbBool --HandleTightBPP (rfbClient* client, int rx, int ry, int rw, int rh) --{ -- CARDBPP fill_colour; -- uint8_t comp_ctl; -- uint8_t filter_id; -- filterPtrBPP filterFn; -- z_streamp zs; -- char *buffer2; -- int err, stream_id, compressedLen, bitsPixel; -- int bufferSize, rowSize, numRows, portionLen, rowsProcessed, extraBytes; -- -- if (!ReadFromRFBServer(client, (char *)&comp_ctl, 1)) -- return FALSE; -- -- /* Flush zlib streams if we are told by the server to do so. */ -- for (stream_id = 0; stream_id < 4; stream_id++) { -- if ((comp_ctl & 1) && client->zlibStreamActive[stream_id]) { -- if (inflateEnd (&client->zlibStream[stream_id]) != Z_OK && -- client->zlibStream[stream_id].msg != NULL) -- rfbClientLog("inflateEnd: %s\n", client->zlibStream[stream_id].msg); -- client->zlibStreamActive[stream_id] = FALSE; -- } -- comp_ctl >>= 1; -- } -- -- /* Handle solid rectangles. */ -- if (comp_ctl == rfbTightFill) { --#if BPP == 32 -- if (client->format.depth == 24 && client->format.redMax == 0xFF && -- client->format.greenMax == 0xFF && client->format.blueMax == 0xFF) { -- if (!ReadFromRFBServer(client, client->buffer, 3)) -- return FALSE; -- fill_colour = RGB24_TO_PIXEL32(client->buffer[0], client->buffer[1], client->buffer[2]); -- } else { -- if (!ReadFromRFBServer(client, (char*)&fill_colour, sizeof(fill_colour))) -- return FALSE; -- } --#else -- if (!ReadFromRFBServer(client, (char*)&fill_colour, sizeof(fill_colour))) -- return FALSE; --#endif -- -- FillRectangle(client, rx, ry, rw, rh, fill_colour); -- -- return TRUE; -- } -- --#if BPP == 8 -- if (comp_ctl == rfbTightJpeg) { -- rfbClientLog("Tight encoding: JPEG is not supported in 8 bpp mode.\n"); -- return FALSE; -- } --#else -- if (comp_ctl == rfbTightJpeg) { -- return DecompressJpegRectBPP(client, rx, ry, rw, rh); -- } --#endif -- -- /* Quit on unsupported subencoding value. */ -- if (comp_ctl > rfbTightMaxSubencoding) { -- rfbClientLog("Tight encoding: bad subencoding value received.\n"); -- return FALSE; -- } -- -- /* -- * Here primary compression mode handling begins. -- * Data was processed with optional filter + zlib compression. -- */ -- -- /* First, we should identify a filter to use. */ -- if ((comp_ctl & rfbTightExplicitFilter) != 0) { -- if (!ReadFromRFBServer(client, (char*)&filter_id, 1)) -- return FALSE; -- -- switch (filter_id) { -- case rfbTightFilterCopy: -- filterFn = FilterCopyBPP; -- bitsPixel = InitFilterCopyBPP(client, rw, rh); -- break; -- case rfbTightFilterPalette: -- filterFn = FilterPaletteBPP; -- bitsPixel = InitFilterPaletteBPP(client, rw, rh); -- break; -- case rfbTightFilterGradient: -- filterFn = FilterGradientBPP; -- bitsPixel = InitFilterGradientBPP(client, rw, rh); -- break; -- default: -- rfbClientLog("Tight encoding: unknown filter code received.\n"); -- return FALSE; -- } -- } else { -- filterFn = FilterCopyBPP; -- bitsPixel = InitFilterCopyBPP(client, rw, rh); -- } -- if (bitsPixel == 0) { -- rfbClientLog("Tight encoding: error receiving palette.\n"); -- return FALSE; -- } -- -- /* Determine if the data should be decompressed or just copied. */ -- rowSize = (rw * bitsPixel + 7) / 8; -- if (rh * rowSize < TIGHT_MIN_TO_COMPRESS) { -- if (!ReadFromRFBServer(client, (char*)client->buffer, rh * rowSize)) -- return FALSE; -- -- buffer2 = &client->buffer[TIGHT_MIN_TO_COMPRESS * 4]; -- filterFn(client, rh, (CARDBPP *)buffer2); -- -- CopyRectangle(client, (uint8_t *)buffer2, rx, ry, rw, rh); -- -- return TRUE; -- } -- -- /* Read the length (1..3 bytes) of compressed data following. */ -- compressedLen = (int)ReadCompactLen(client); -- if (compressedLen <= 0) { -- rfbClientLog("Incorrect data received from the server.\n"); -- return FALSE; -- } -- -- /* Now let's initialize compression stream if needed. */ -- stream_id = comp_ctl & 0x03; -- zs = &client->zlibStream[stream_id]; -- if (!client->zlibStreamActive[stream_id]) { -- zs->zalloc = Z_NULL; -- zs->zfree = Z_NULL; -- zs->opaque = Z_NULL; -- err = inflateInit(zs); -- if (err != Z_OK) { -- if (zs->msg != NULL) -- rfbClientLog("InflateInit error: %s.\n", zs->msg); -- return FALSE; -- } -- client->zlibStreamActive[stream_id] = TRUE; -- } -- -- /* Read, decode and draw actual pixel data in a loop. */ -- -- bufferSize = RFB_BUFFER_SIZE * bitsPixel / (bitsPixel + BPP) & 0xFFFFFFFC; -- buffer2 = &client->buffer[bufferSize]; -- if (rowSize > bufferSize) { -- /* Should be impossible when RFB_BUFFER_SIZE >= 16384 */ -- rfbClientLog("Internal error: incorrect buffer size.\n"); -- return FALSE; -- } -- -- rowsProcessed = 0; -- extraBytes = 0; -- -- while (compressedLen > 0) { -- if (compressedLen > ZLIB_BUFFER_SIZE) -- portionLen = ZLIB_BUFFER_SIZE; -- else -- portionLen = compressedLen; -- -- if (!ReadFromRFBServer(client, (char*)client->zlib_buffer, portionLen)) -- return FALSE; -- -- compressedLen -= portionLen; -- -- zs->next_in = (Bytef *)client->zlib_buffer; -- zs->avail_in = portionLen; -- -- do { -- zs->next_out = (Bytef *)&client->buffer[extraBytes]; -- zs->avail_out = bufferSize - extraBytes; -- -- err = inflate(zs, Z_SYNC_FLUSH); -- if (err == Z_BUF_ERROR) /* Input exhausted -- no problem. */ -- break; -- if (err != Z_OK && err != Z_STREAM_END) { -- if (zs->msg != NULL) { -- rfbClientLog("Inflate error: %s.\n", zs->msg); -- } else { -- rfbClientLog("Inflate error: %d.\n", err); -- } -- return FALSE; -- } -- -- numRows = (bufferSize - zs->avail_out) / rowSize; -- -- filterFn(client, numRows, (CARDBPP *)buffer2); -- -- extraBytes = bufferSize - zs->avail_out - numRows * rowSize; -- if (extraBytes > 0) -- memcpy(client->buffer, &client->buffer[numRows * rowSize], extraBytes); -- -- CopyRectangle(client, (uint8_t *)buffer2, rx, ry+rowsProcessed, rw, numRows); -- -- rowsProcessed += numRows; -- } -- while (zs->avail_out == 0); -- } -- -- if (rowsProcessed != rh) { -- rfbClientLog("Incorrect number of scan lines after decompression.\n"); -- return FALSE; -- } -- -- return TRUE; --} -- --/*---------------------------------------------------------------------------- -- * -- * Filter stuff. -- * -- */ -- --static int --InitFilterCopyBPP (rfbClient* client, int rw, int rh) --{ -- client->rectWidth = rw; -- --#if BPP == 32 -- if (client->format.depth == 24 && client->format.redMax == 0xFF && -- client->format.greenMax == 0xFF && client->format.blueMax == 0xFF) { -- client->cutZeros = TRUE; -- return 24; -- } else { -- client->cutZeros = FALSE; -- } --#endif -- -- return BPP; --} -- --static void --FilterCopyBPP (rfbClient* client, int numRows, CARDBPP *dst) --{ -- --#if BPP == 32 -- int x, y; -- -- if (client->cutZeros) { -- for (y = 0; y < numRows; y++) { -- for (x = 0; x < client->rectWidth; x++) { -- dst[y*client->rectWidth+x] = -- RGB24_TO_PIXEL32(client->buffer[(y*client->rectWidth+x)*3], -- client->buffer[(y*client->rectWidth+x)*3+1], -- client->buffer[(y*client->rectWidth+x)*3+2]); -- } -- } -- return; -- } --#endif -- -- memcpy (dst, client->buffer, numRows * client->rectWidth * (BPP / 8)); --} -- --static int --InitFilterGradientBPP (rfbClient* client, int rw, int rh) --{ -- int bits; -- -- bits = InitFilterCopyBPP(client, rw, rh); -- if (client->cutZeros) -- memset(client->tightPrevRow, 0, rw * 3); -- else -- memset(client->tightPrevRow, 0, rw * 3 * sizeof(uint16_t)); -- -- return bits; --} -- --#if BPP == 32 -- --static void --FilterGradient24 (rfbClient* client, int numRows, uint32_t *dst) --{ -- int x, y, c; -- uint8_t thisRow[2048*3]; -- uint8_t pix[3]; -- int est[3]; -- -- for (y = 0; y < numRows; y++) { -- -- /* First pixel in a row */ -- for (c = 0; c < 3; c++) { -- pix[c] = client->tightPrevRow[c] + client->buffer[y*client->rectWidth*3+c]; -- thisRow[c] = pix[c]; -- } -- dst[y*client->rectWidth] = RGB24_TO_PIXEL32(pix[0], pix[1], pix[2]); -- -- /* Remaining pixels of a row */ -- for (x = 1; x < client->rectWidth; x++) { -- for (c = 0; c < 3; c++) { -- est[c] = (int)client->tightPrevRow[x*3+c] + (int)pix[c] - -- (int)client->tightPrevRow[(x-1)*3+c]; -- if (est[c] > 0xFF) { -- est[c] = 0xFF; -- } else if (est[c] < 0x00) { -- est[c] = 0x00; -- } -- pix[c] = (uint8_t)est[c] + client->buffer[(y*client->rectWidth+x)*3+c]; -- thisRow[x*3+c] = pix[c]; -- } -- dst[y*client->rectWidth+x] = RGB24_TO_PIXEL32(pix[0], pix[1], pix[2]); -- } -- -- memcpy(client->tightPrevRow, thisRow, client->rectWidth * 3); -- } --} -- --#endif -- --static void --FilterGradientBPP (rfbClient* client, int numRows, CARDBPP *dst) --{ -- int x, y, c; -- CARDBPP *src = (CARDBPP *)client->buffer; -- uint16_t *thatRow = (uint16_t *)client->tightPrevRow; -- uint16_t thisRow[2048*3]; -- uint16_t pix[3]; -- uint16_t max[3]; -- int shift[3]; -- int est[3]; -- --#if BPP == 32 -- if (client->cutZeros) { -- FilterGradient24(client, numRows, dst); -- return; -- } --#endif -- -- max[0] = client->format.redMax; -- max[1] = client->format.greenMax; -- max[2] = client->format.blueMax; -- -- shift[0] = client->format.redShift; -- shift[1] = client->format.greenShift; -- shift[2] = client->format.blueShift; -- -- for (y = 0; y < numRows; y++) { -- -- /* First pixel in a row */ -- for (c = 0; c < 3; c++) { -- pix[c] = (uint16_t)(((src[y*client->rectWidth] >> shift[c]) + thatRow[c]) & max[c]); -- thisRow[c] = pix[c]; -- } -- dst[y*client->rectWidth] = RGB_TO_PIXEL(BPP, pix[0], pix[1], pix[2]); -- -- /* Remaining pixels of a row */ -- for (x = 1; x < client->rectWidth; x++) { -- for (c = 0; c < 3; c++) { -- est[c] = (int)thatRow[x*3+c] + (int)pix[c] - (int)thatRow[(x-1)*3+c]; -- if (est[c] > (int)max[c]) { -- est[c] = (int)max[c]; -- } else if (est[c] < 0) { -- est[c] = 0; -- } -- pix[c] = (uint16_t)(((src[y*client->rectWidth+x] >> shift[c]) + est[c]) & max[c]); -- thisRow[x*3+c] = pix[c]; -- } -- dst[y*client->rectWidth+x] = RGB_TO_PIXEL(BPP, pix[0], pix[1], pix[2]); -- } -- memcpy(thatRow, thisRow, client->rectWidth * 3 * sizeof(uint16_t)); -- } --} -- --static int --InitFilterPaletteBPP (rfbClient* client, int rw, int rh) --{ -- uint8_t numColors; --#if BPP == 32 -- int i; -- CARDBPP *palette = (CARDBPP *)client->tightPalette; --#endif -- -- client->rectWidth = rw; -- -- if (!ReadFromRFBServer(client, (char*)&numColors, 1)) -- return 0; -- -- client->rectColors = (int)numColors; -- if (++client->rectColors < 2) -- return 0; -- --#if BPP == 32 -- if (client->format.depth == 24 && client->format.redMax == 0xFF && -- client->format.greenMax == 0xFF && client->format.blueMax == 0xFF) { -- if (!ReadFromRFBServer(client, (char*)&client->tightPalette, client->rectColors * 3)) -- return 0; -- for (i = client->rectColors - 1; i >= 0; i--) { -- palette[i] = RGB24_TO_PIXEL32(client->tightPalette[i*3], -- client->tightPalette[i*3+1], -- client->tightPalette[i*3+2]); -- } -- return (client->rectColors == 2) ? 1 : 8; -- } --#endif -- -- if (!ReadFromRFBServer(client, (char*)&client->tightPalette, client->rectColors * (BPP / 8))) -- return 0; -- -- return (client->rectColors == 2) ? 1 : 8; --} -- --static void --FilterPaletteBPP (rfbClient* client, int numRows, CARDBPP *dst) --{ -- int x, y, b, w; -- uint8_t *src = (uint8_t *)client->buffer; -- CARDBPP *palette = (CARDBPP *)client->tightPalette; -- -- if (client->rectColors == 2) { -- w = (client->rectWidth + 7) / 8; -- for (y = 0; y < numRows; y++) { -- for (x = 0; x < client->rectWidth / 8; x++) { -- for (b = 7; b >= 0; b--) -- dst[y*client->rectWidth+x*8+7-b] = palette[src[y*w+x] >> b & 1]; -- } -- for (b = 7; b >= 8 - client->rectWidth % 8; b--) { -- dst[y*client->rectWidth+x*8+7-b] = palette[src[y*w+x] >> b & 1]; -- } -- } -- } else { -- for (y = 0; y < numRows; y++) -- for (x = 0; x < client->rectWidth; x++) -- dst[y*client->rectWidth+x] = palette[(int)src[y*client->rectWidth+x]]; -- } --} -- --#if BPP != 8 -- --/*---------------------------------------------------------------------------- -- * -- * JPEG decompression. -- * -- */ -- --static rfbBool --DecompressJpegRectBPP(rfbClient* client, int x, int y, int w, int h) --{ -- struct jpeg_decompress_struct cinfo; -- struct jpeg_error_mgr jerr; -- int compressedLen; -- uint8_t *compressedData; -- CARDBPP *pixelPtr; -- JSAMPROW rowPointer[1]; -- int dx, dy; -- -- compressedLen = (int)ReadCompactLen(client); -- if (compressedLen <= 0) { -- rfbClientLog("Incorrect data received from the server.\n"); -- return FALSE; -- } -- -- compressedData = malloc(compressedLen); -- if (compressedData == NULL) { -- rfbClientLog("Memory allocation error.\n"); -- return FALSE; -- } -- -- if (!ReadFromRFBServer(client, (char*)compressedData, compressedLen)) { -- free(compressedData); -- return FALSE; -- } -- -- cinfo.err = jpeg_std_error(&jerr); -- cinfo.client_data = client; -- jpeg_create_decompress(&cinfo); -- -- JpegSetSrcManager(&cinfo, compressedData, compressedLen); -- -- jpeg_read_header(&cinfo, TRUE); -- cinfo.out_color_space = JCS_RGB; -- -- jpeg_start_decompress(&cinfo); -- if (cinfo.output_width != w || cinfo.output_height != h || -- cinfo.output_components != 3) { -- rfbClientLog("Tight Encoding: Wrong JPEG data received.\n"); -- jpeg_destroy_decompress(&cinfo); -- free(compressedData); -- return FALSE; -- } -- -- rowPointer[0] = (JSAMPROW)client->buffer; -- dy = 0; -- while (cinfo.output_scanline < cinfo.output_height) { -- jpeg_read_scanlines(&cinfo, rowPointer, 1); -- if (client->jpegError) { -- break; -- } -- pixelPtr = (CARDBPP *)&client->buffer[RFB_BUFFER_SIZE / 2]; -- for (dx = 0; dx < w; dx++) { -- *pixelPtr++ = -- RGB24_TO_PIXEL(BPP, client->buffer[dx*3], client->buffer[dx*3+1], client->buffer[dx*3+2]); -- } -- CopyRectangle(client, (uint8_t *)&client->buffer[RFB_BUFFER_SIZE / 2], x, y + dy, w, 1); -- dy++; -- } -- -- if (!client->jpegError) -- jpeg_finish_decompress(&cinfo); -- -- jpeg_destroy_decompress(&cinfo); -- free(compressedData); -- -- return !client->jpegError; --} -- --#else -- --static long --ReadCompactLen (rfbClient* client) --{ -- long len; -- uint8_t b; -- -- if (!ReadFromRFBServer(client, (char *)&b, 1)) -- return -1; -- len = (int)b & 0x7F; -- if (b & 0x80) { -- if (!ReadFromRFBServer(client, (char *)&b, 1)) -- return -1; -- len |= ((int)b & 0x7F) << 7; -- if (b & 0x80) { -- if (!ReadFromRFBServer(client, (char *)&b, 1)) -- return -1; -- len |= ((int)b & 0xFF) << 14; -- } -- } -- return len; --} -- --/* -- * JPEG source manager functions for JPEG decompression in Tight decoder. -- */ -- --static void --JpegInitSource(j_decompress_ptr cinfo) --{ -- rfbClient* client=(rfbClient*)cinfo->client_data; -- client->jpegError = FALSE; --} -- --static boolean --JpegFillInputBuffer(j_decompress_ptr cinfo) --{ -- rfbClient* client=(rfbClient*)cinfo->client_data; -- client->jpegError = TRUE; -- client->jpegSrcManager->bytes_in_buffer = client->jpegBufferLen; -- client->jpegSrcManager->next_input_byte = (JOCTET *)client->jpegBufferPtr; -- -- return TRUE; --} -- --static void --JpegSkipInputData(j_decompress_ptr cinfo, long num_bytes) --{ -- rfbClient* client=(rfbClient*)cinfo->client_data; -- if (num_bytes < 0 || num_bytes > client->jpegSrcManager->bytes_in_buffer) { -- client->jpegError = TRUE; -- client->jpegSrcManager->bytes_in_buffer = client->jpegBufferLen; -- client->jpegSrcManager->next_input_byte = (JOCTET *)client->jpegBufferPtr; -- } else { -- client->jpegSrcManager->next_input_byte += (size_t) num_bytes; -- client->jpegSrcManager->bytes_in_buffer -= (size_t) num_bytes; -- } --} -- --static void --JpegTermSource(j_decompress_ptr cinfo) --{ -- /* nothing to do here. */ --} -- --static void --JpegSetSrcManager(j_decompress_ptr cinfo, -- uint8_t *compressedData, -- int compressedLen) --{ -- rfbClient* client=(rfbClient*)cinfo->client_data; -- client->jpegBufferPtr = compressedData; -- client->jpegBufferLen = (size_t)compressedLen; -- -- if(client->jpegSrcManager == NULL) -- client->jpegSrcManager = malloc(sizeof(struct jpeg_source_mgr)); -- client->jpegSrcManager->init_source = JpegInitSource; -- client->jpegSrcManager->fill_input_buffer = JpegFillInputBuffer; -- client->jpegSrcManager->skip_input_data = JpegSkipInputData; -- client->jpegSrcManager->resync_to_restart = jpeg_resync_to_restart; -- client->jpegSrcManager->term_source = JpegTermSource; -- client->jpegSrcManager->next_input_byte = (JOCTET*)client->jpegBufferPtr; -- client->jpegSrcManager->bytes_in_buffer = client->jpegBufferLen; -- -- cinfo->src = client->jpegSrcManager; --} -- --#endif -- --#undef CARDBPP -- --/* LIBVNCSERVER_HAVE_LIBZ and LIBVNCSERVER_HAVE_LIBJPEG */ --#endif --#endif -- -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/tls.c b/remmina-plugins/vnc/libvncserver/libvncclient/tls.c -deleted file mode 100644 -index a926c8c..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/tls.c -+++ /dev/null -@@ -1,536 +0,0 @@ --/* -- * Copyright (C) 2009 Vic Lee. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --#include --#include --#ifdef WIN32 --#undef SOCKET --#include /* for Sleep() */ --#define sleep(X) Sleep(1000*X) /* MinGW32 has no sleep() */ --#include --#define read(sock,buf,len) recv(sock,buf,len,0) --#define write(sock,buf,len) send(sock,buf,len,0) --#endif --#include "tls.h" -- --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- --static const int rfbCertTypePriority[] = { GNUTLS_CRT_X509, 0 }; --static const int rfbProtoPriority[]= { GNUTLS_TLS1_1, GNUTLS_TLS1_0, GNUTLS_SSL3, 0 }; --static const int rfbKXPriority[] = {GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, GNUTLS_KX_DHE_RSA, GNUTLS_KX_SRP, 0}; --static const int rfbKXAnon[] = {GNUTLS_KX_ANON_DH, 0}; -- --#define DH_BITS 1024 --static gnutls_dh_params_t rfbDHParams; -- --static rfbBool rfbTLSInitialized = FALSE; -- --static rfbBool --InitializeTLS(void) --{ -- int ret; -- -- if (rfbTLSInitialized) return TRUE; -- if ((ret = gnutls_global_init()) < 0 || -- (ret = gnutls_dh_params_init(&rfbDHParams)) < 0 || -- (ret = gnutls_dh_params_generate2(rfbDHParams, DH_BITS)) < 0) -- { -- rfbClientLog("Failed to initialized GnuTLS: %s.\n", gnutls_strerror(ret)); -- return FALSE; -- } -- rfbClientLog("GnuTLS initialized.\n"); -- rfbTLSInitialized = TRUE; -- return TRUE; --} -- --/* -- * On Windows, translate WSAGetLastError() to errno values as GNU TLS does it -- * internally too. This is necessary because send() and recv() on Windows -- * don't set errno when they fail but GNUTLS expects a proper errno value. -- * -- * Use gnutls_transport_set_global_errno() like the GNU TLS documentation -- * suggests to avoid problems with different errno variables when GNU TLS and -- * libvncclient are linked to different versions of msvcrt.dll. -- */ --#ifdef WIN32 --static void WSAtoTLSErrno() --{ -- switch(WSAGetLastError()) { -- case WSAEWOULDBLOCK: -- gnutls_transport_set_global_errno(EAGAIN); -- break; -- case WSAEINTR: -- gnutls_transport_set_global_errno(EINTR); -- break; -- default: -- gnutls_transport_set_global_errno(EIO); -- break; -- } --} --#endif -- -- --static ssize_t --PushTLS(gnutls_transport_ptr_t transport, const void *data, size_t len) --{ -- rfbClient *client = (rfbClient*)transport; -- int ret; -- -- while (1) -- { -- ret = write(client->sock, data, len); -- if (ret < 0) -- { --#ifdef WIN32 -- WSAtoTLSErrno(); --#endif -- if (errno == EINTR) continue; -- return -1; -- } -- return ret; -- } --} -- -- --static ssize_t --PullTLS(gnutls_transport_ptr_t transport, void *data, size_t len) --{ -- rfbClient *client = (rfbClient*)transport; -- int ret; -- -- while (1) -- { -- ret = read(client->sock, data, len); -- if (ret < 0) -- { --#ifdef WIN32 -- WSAtoTLSErrno(); --#endif -- if (errno == EINTR) continue; -- return -1; -- } -- return ret; -- } --} -- --static rfbBool --InitializeTLSSession(rfbClient* client, rfbBool anonTLS) --{ -- int ret; -- -- if (client->tlsSession) return TRUE; -- -- if ((ret = gnutls_init(&client->tlsSession, GNUTLS_CLIENT)) < 0) -- { -- rfbClientLog("Failed to initialized TLS session: %s.\n", gnutls_strerror(ret)); -- return FALSE; -- } -- -- if ((ret = gnutls_set_default_priority(client->tlsSession)) < 0 || -- (ret = gnutls_kx_set_priority(client->tlsSession, anonTLS ? rfbKXAnon : rfbKXPriority)) < 0 || -- (ret = gnutls_certificate_type_set_priority(client->tlsSession, rfbCertTypePriority)) < 0 || -- (ret = gnutls_protocol_set_priority(client->tlsSession, rfbProtoPriority)) < 0) -- { -- rfbClientLog("Warning: Failed to set TLS priority: %s.\n", gnutls_strerror(ret)); -- } -- -- gnutls_transport_set_ptr(client->tlsSession, (gnutls_transport_ptr_t)client); -- gnutls_transport_set_push_function(client->tlsSession, PushTLS); -- gnutls_transport_set_pull_function(client->tlsSession, PullTLS); -- -- rfbClientLog("TLS session initialized.\n"); -- -- return TRUE; --} -- --static rfbBool --SetTLSAnonCredential(rfbClient* client) --{ -- gnutls_anon_client_credentials anonCred; -- int ret; -- -- if ((ret = gnutls_anon_allocate_client_credentials(&anonCred)) < 0 || -- (ret = gnutls_credentials_set(client->tlsSession, GNUTLS_CRD_ANON, anonCred)) < 0) -- { -- FreeTLS(client); -- rfbClientLog("Failed to create anonymous credentials: %s", gnutls_strerror(ret)); -- return FALSE; -- } -- rfbClientLog("TLS anonymous credential created.\n"); -- return TRUE; --} -- --static rfbBool --HandshakeTLS(rfbClient* client) --{ -- int timeout = 15; -- int ret; -- -- while (timeout > 0 && (ret = gnutls_handshake(client->tlsSession)) < 0) -- { -- if (!gnutls_error_is_fatal(ret)) -- { -- rfbClientLog("TLS handshake blocking.\n"); -- sleep(1); -- timeout--; -- continue; -- } -- rfbClientLog("TLS handshake failed: %s.\n", gnutls_strerror(ret)); -- FreeTLS(client); -- return FALSE; -- } -- -- if (timeout <= 0) -- { -- rfbClientLog("TLS handshake timeout.\n"); -- FreeTLS(client); -- return FALSE; -- } -- -- rfbClientLog("TLS handshake done.\n"); -- return TRUE; --} -- --/* VeNCrypt sub auth. 1 byte auth count, followed by count * 4 byte integers */ --static rfbBool --ReadVeNCryptSecurityType(rfbClient* client, uint32_t *result) --{ -- uint8_t count=0; -- uint8_t loop=0; -- uint8_t flag=0; -- uint32_t tAuth[256], t; -- char buf1[500],buf2[10]; -- uint32_t authScheme; -- -- if (!ReadFromRFBServer(client, (char *)&count, 1)) return FALSE; -- -- if (count==0) -- { -- rfbClientLog("List of security types is ZERO. Giving up.\n"); -- return FALSE; -- } -- -- if (count>sizeof(tAuth)) -- { -- rfbClientLog("%d security types are too many; maximum is %d\n", count, sizeof(tAuth)); -- return FALSE; -- } -- -- rfbClientLog("We have %d security types to read\n", count); -- authScheme=0; -- /* now, we have a list of available security types to read ( uint8_t[] ) */ -- for (loop=0;loop=sizeof(buf1)-1) break; -- snprintf(buf2, sizeof(buf2), (loop>0 ? ", %d" : "%d"), (int)tAuth[loop]); -- strncat(buf1, buf2, sizeof(buf1)-strlen(buf1)-1); -- } -- rfbClientLog("Unknown VeNCrypt authentication scheme from VNC server: %s\n", -- buf1); -- return FALSE; -- } -- *result = authScheme; -- return TRUE; --} -- --static void --FreeX509Credential(rfbCredential *cred) --{ -- if (cred->x509Credential.x509CACertFile) free(cred->x509Credential.x509CACertFile); -- if (cred->x509Credential.x509CACrlFile) free(cred->x509Credential.x509CACrlFile); -- if (cred->x509Credential.x509ClientCertFile) free(cred->x509Credential.x509ClientCertFile); -- if (cred->x509Credential.x509ClientKeyFile) free(cred->x509Credential.x509ClientKeyFile); -- free(cred); --} -- --static gnutls_certificate_credentials_t --CreateX509CertCredential(rfbCredential *cred) --{ -- gnutls_certificate_credentials_t x509_cred; -- int ret; -- -- if (!cred->x509Credential.x509CACertFile) -- { -- rfbClientLog("No CA certificate provided.\n"); -- return NULL; -- } -- -- if ((ret = gnutls_certificate_allocate_credentials(&x509_cred)) < 0) -- { -- rfbClientLog("Cannot allocate credentials: %s.\n", gnutls_strerror(ret)); -- return NULL; -- } -- if ((ret = gnutls_certificate_set_x509_trust_file(x509_cred, -- cred->x509Credential.x509CACertFile, GNUTLS_X509_FMT_PEM)) < 0) -- { -- rfbClientLog("Cannot load CA credentials: %s.\n", gnutls_strerror(ret)); -- gnutls_certificate_free_credentials (x509_cred); -- return NULL; -- } -- if (cred->x509Credential.x509ClientCertFile && cred->x509Credential.x509ClientKeyFile) -- { -- if ((ret = gnutls_certificate_set_x509_key_file(x509_cred, -- cred->x509Credential.x509ClientCertFile, cred->x509Credential.x509ClientKeyFile, -- GNUTLS_X509_FMT_PEM)) < 0) -- { -- rfbClientLog("Cannot load client certificate or key: %s.\n", gnutls_strerror(ret)); -- gnutls_certificate_free_credentials (x509_cred); -- return NULL; -- } -- } else -- { -- rfbClientLog("No client certificate or key provided.\n"); -- } -- if (cred->x509Credential.x509CACrlFile) -- { -- if ((ret = gnutls_certificate_set_x509_crl_file(x509_cred, -- cred->x509Credential.x509CACrlFile, GNUTLS_X509_FMT_PEM)) < 0) -- { -- rfbClientLog("Cannot load CRL: %s.\n", gnutls_strerror(ret)); -- gnutls_certificate_free_credentials (x509_cred); -- return NULL; -- } -- } else -- { -- rfbClientLog("No CRL provided.\n"); -- } -- gnutls_certificate_set_dh_params (x509_cred, rfbDHParams); -- return x509_cred; --} -- --#endif -- --rfbBool --HandleAnonTLSAuth(rfbClient* client) --{ --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- -- if (!InitializeTLS() || !InitializeTLSSession(client, TRUE)) return FALSE; -- -- if (!SetTLSAnonCredential(client)) return FALSE; -- -- if (!HandshakeTLS(client)) return FALSE; -- -- return TRUE; -- --#else -- rfbClientLog("TLS is not supported.\n"); -- return FALSE; --#endif --} -- --rfbBool --HandleVeNCryptAuth(rfbClient* client) --{ --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- uint8_t major, minor, status; -- uint32_t authScheme; -- rfbBool anonTLS; -- gnutls_certificate_credentials_t x509_cred = NULL; -- int ret; -- -- if (!InitializeTLS()) return FALSE; -- -- /* Read VeNCrypt version */ -- if (!ReadFromRFBServer(client, (char *)&major, 1) || -- !ReadFromRFBServer(client, (char *)&minor, 1)) -- { -- return FALSE; -- } -- rfbClientLog("Got VeNCrypt version %d.%d from server.\n", (int)major, (int)minor); -- -- if (major != 0 && minor != 2) -- { -- rfbClientLog("Unsupported VeNCrypt version.\n"); -- return FALSE; -- } -- -- if (!WriteToRFBServer(client, (char *)&major, 1) || -- !WriteToRFBServer(client, (char *)&minor, 1) || -- !ReadFromRFBServer(client, (char *)&status, 1)) -- { -- return FALSE; -- } -- -- if (status != 0) -- { -- rfbClientLog("Server refused VeNCrypt version %d.%d.\n", (int)major, (int)minor); -- return FALSE; -- } -- -- if (!ReadVeNCryptSecurityType(client, &authScheme)) return FALSE; -- if (!ReadFromRFBServer(client, (char *)&status, 1) || status != 1) -- { -- rfbClientLog("Server refused VeNCrypt authentication %d (%d).\n", authScheme, (int)status); -- return FALSE; -- } -- client->subAuthScheme = authScheme; -- -- /* Some VeNCrypt security types are anonymous TLS, others are X509 */ -- switch (authScheme) -- { -- case rfbVeNCryptTLSNone: -- case rfbVeNCryptTLSVNC: -- case rfbVeNCryptTLSPlain: -- anonTLS = TRUE; -- break; -- default: -- anonTLS = FALSE; -- break; -- } -- -- /* Get X509 Credentials if it's not anonymous */ -- if (!anonTLS) -- { -- rfbCredential *cred; -- -- if (!client->GetCredential) -- { -- rfbClientLog("GetCredential callback is not set.\n"); -- return FALSE; -- } -- cred = client->GetCredential(client, rfbCredentialTypeX509); -- if (!cred) -- { -- rfbClientLog("Reading credential failed\n"); -- return FALSE; -- } -- -- x509_cred = CreateX509CertCredential(cred); -- FreeX509Credential(cred); -- if (!x509_cred) return FALSE; -- } -- -- /* Start up the TLS session */ -- if (!InitializeTLSSession(client, anonTLS)) return FALSE; -- -- if (anonTLS) -- { -- if (!SetTLSAnonCredential(client)) return FALSE; -- } -- else -- { -- if ((ret = gnutls_credentials_set(client->tlsSession, GNUTLS_CRD_CERTIFICATE, x509_cred)) < 0) -- { -- rfbClientLog("Cannot set x509 credential: %s.\n", gnutls_strerror(ret)); -- FreeTLS(client); -- return FALSE; -- } -- } -- -- if (!HandshakeTLS(client)) return FALSE; -- -- /* TODO: validate certificate */ -- -- /* We are done here. The caller should continue with client->subAuthScheme -- * to do actual sub authentication. -- */ -- return TRUE; -- --#else -- rfbClientLog("TLS is not supported.\n"); -- return FALSE; --#endif --} -- --int --ReadFromTLS(rfbClient* client, char *out, unsigned int n) --{ --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- ssize_t ret; -- -- ret = gnutls_record_recv(client->tlsSession, out, n); -- if (ret >= 0) return ret; -- if (ret == GNUTLS_E_REHANDSHAKE || ret == GNUTLS_E_AGAIN) -- { -- errno = EAGAIN; -- } else -- { -- rfbClientLog("Error reading from TLS: %s.\n", gnutls_strerror(ret)); -- errno = EINTR; -- } -- return -1; --#else -- rfbClientLog("TLS is not supported.\n"); -- errno = EINTR; -- return -1; --#endif --} -- --int --WriteToTLS(rfbClient* client, char *buf, unsigned int n) --{ --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- unsigned int offset = 0; -- ssize_t ret; -- -- while (offset < n) -- { -- ret = gnutls_record_send(client->tlsSession, buf+offset, (size_t)(n-offset)); -- if (ret == 0) continue; -- if (ret < 0) -- { -- if (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED) continue; -- rfbClientLog("Error writing to TLS: %s.\n", gnutls_strerror(ret)); -- return -1; -- } -- offset += (unsigned int)ret; -- } -- return offset; --#else -- rfbClientLog("TLS is not supported.\n"); -- errno = EINTR; -- return -1; --#endif --} -- --void FreeTLS(rfbClient* client) --{ --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- if (client->tlsSession) -- { -- gnutls_deinit(client->tlsSession); -- client->tlsSession = NULL; -- } --#endif --} -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/tls.h b/remmina-plugins/vnc/libvncserver/libvncclient/tls.h -deleted file mode 100644 -index 48d159b..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/tls.h -+++ /dev/null -@@ -1,51 +0,0 @@ --#ifndef TLS_H --#define TLS_H -- --/* -- * Copyright (C) 2009 Vic Lee. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* Handle Anonymous TLS Authentication (18) with the server. -- * After authentication, client->tlsSession will be set. -- */ --rfbBool HandleAnonTLSAuth(rfbClient* client); -- --/* Handle VeNCrypt Authentication (19) with the server. -- * The callback function GetX509Credential will be called. -- * After authentication, client->tlsSession will be set. -- */ --rfbBool HandleVeNCryptAuth(rfbClient* client); -- --/* Read desired bytes from TLS session. -- * It's a wrapper function over gnutls_record_recv() and return values -- * are same as read(), that is, >0 for actual bytes read, 0 for EOF, -- * or EAGAIN, EINTR. -- * This should be a non-blocking call. Blocking is handled in sockets.c. -- */ --int ReadFromTLS(rfbClient* client, char *out, unsigned int n); -- --/* Write desired bytes to TLS session. -- * It's a wrapper function over gnutls_record_send() and it will be -- * blocking call, until all bytes are written or error returned. -- */ --int WriteToTLS(rfbClient* client, char *buf, unsigned int n); -- --/* Free TLS resources */ --void FreeTLS(rfbClient* client); -- --#endif /* TLS_H */ -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/ultra.c b/remmina-plugins/vnc/libvncserver/libvncclient/ultra.c -deleted file mode 100644 -index dac89b5..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/ultra.c -+++ /dev/null -@@ -1,210 +0,0 @@ --/* -- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* -- * ultrazip.c - handle ultrazip encoding. -- * -- * This file shouldn't be compiled directly. It is included multiple times by -- * rfbproto.c, each time with a different definition of the macro BPP. For -- * each value of BPP, this file defines a function which handles an zlib -- * encoded rectangle with BPP bits per pixel. -- */ -- --#define HandleUltraZipBPP CONCAT2E(HandleUltraZip,BPP) --#define HandleUltraBPP CONCAT2E(HandleUltra,BPP) --#define CARDBPP CONCAT3E(uint,BPP,_t) -- --static rfbBool --HandleUltraBPP (rfbClient* client, int rx, int ry, int rw, int rh) --{ -- rfbZlibHeader hdr; -- int toRead=0; -- int inflateResult=0; -- lzo_uint uncompressedBytes = (( rw * rh ) * ( BPP / 8 )); -- -- if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbZlibHeader)) -- return FALSE; -- -- toRead = rfbClientSwap32IfLE(hdr.nBytes); -- if (toRead==0) return TRUE; -- -- if (uncompressedBytes==0) -- { -- rfbClientLog("ultra error: rectangle has 0 uncomressed bytes ((%dw * %dh) * (%d / 8))\n", rw, rh, BPP); -- return FALSE; -- } -- -- /* First make sure we have a large enough raw buffer to hold the -- * decompressed data. In practice, with a fixed BPP, fixed frame -- * buffer size and the first update containing the entire frame -- * buffer, this buffer allocation should only happen once, on the -- * first update. -- */ -- if ( client->raw_buffer_size < (int)uncompressedBytes) { -- if ( client->raw_buffer != NULL ) { -- free( client->raw_buffer ); -- } -- client->raw_buffer_size = uncompressedBytes; -- /* buffer needs to be aligned on 4-byte boundaries */ -- if ((client->raw_buffer_size % 4)!=0) -- client->raw_buffer_size += (4-(client->raw_buffer_size % 4)); -- client->raw_buffer = (char*) malloc( client->raw_buffer_size ); -- } -- -- /* allocate enough space to store the incoming compressed packet */ -- if ( client->ultra_buffer_size < toRead ) { -- if ( client->ultra_buffer != NULL ) { -- free( client->ultra_buffer ); -- } -- client->ultra_buffer_size = toRead; -- /* buffer needs to be aligned on 4-byte boundaries */ -- if ((client->ultra_buffer_size % 4)!=0) -- client->ultra_buffer_size += (4-(client->ultra_buffer_size % 4)); -- client->ultra_buffer = (char*) malloc( client->ultra_buffer_size ); -- } -- -- /* Fill the buffer, obtaining data from the server. */ -- if (!ReadFromRFBServer(client, client->ultra_buffer, toRead)) -- return FALSE; -- -- /* uncompress the data */ -- uncompressedBytes = client->raw_buffer_size; -- inflateResult = lzo1x_decompress( -- (lzo_byte *)client->ultra_buffer, toRead, -- (lzo_byte *)client->raw_buffer, (lzo_uintp) &uncompressedBytes, -- NULL); -- -- -- if ((rw * rh * (BPP / 8)) != uncompressedBytes) -- rfbClientLog("Ultra decompressed too little (%d < %d)", (rw * rh * (BPP / 8)), uncompressedBytes); -- -- /* Put the uncompressed contents of the update on the screen. */ -- if ( inflateResult == LZO_E_OK ) -- { -- CopyRectangle(client, (unsigned char *)client->raw_buffer, rx, ry, rw, rh); -- } -- else -- { -- rfbClientLog("ultra decompress returned error: %d\n", -- inflateResult); -- return FALSE; -- } -- return TRUE; --} -- -- --/* UltraZip is like rre in that it is composed of subrects */ --static rfbBool --HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh) --{ -- rfbZlibHeader hdr; -- int i=0; -- int toRead=0; -- int inflateResult=0; -- unsigned char *ptr=NULL; -- lzo_uint uncompressedBytes = ry + (rw * 65535); -- unsigned int numCacheRects = rx; -- -- if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbZlibHeader)) -- return FALSE; -- -- toRead = rfbClientSwap32IfLE(hdr.nBytes); -- -- if (toRead==0) return TRUE; -- -- if (uncompressedBytes==0) -- { -- rfbClientLog("ultrazip error: rectangle has 0 uncomressed bytes (%dy + (%dw * 65535)) (%d rectangles)\n", ry, rw, rx); -- return FALSE; -- } -- -- /* First make sure we have a large enough raw buffer to hold the -- * decompressed data. In practice, with a fixed BPP, fixed frame -- * buffer size and the first update containing the entire frame -- * buffer, this buffer allocation should only happen once, on the -- * first update. -- */ -- if ( client->raw_buffer_size < (int)(uncompressedBytes + 500)) { -- if ( client->raw_buffer != NULL ) { -- free( client->raw_buffer ); -- } -- client->raw_buffer_size = uncompressedBytes + 500; -- /* buffer needs to be aligned on 4-byte boundaries */ -- if ((client->raw_buffer_size % 4)!=0) -- client->raw_buffer_size += (4-(client->raw_buffer_size % 4)); -- client->raw_buffer = (char*) malloc( client->raw_buffer_size ); -- } -- -- -- /* allocate enough space to store the incoming compressed packet */ -- if ( client->ultra_buffer_size < toRead ) { -- if ( client->ultra_buffer != NULL ) { -- free( client->ultra_buffer ); -- } -- client->ultra_buffer_size = toRead; -- client->ultra_buffer = (char*) malloc( client->ultra_buffer_size ); -- } -- -- /* Fill the buffer, obtaining data from the server. */ -- if (!ReadFromRFBServer(client, client->ultra_buffer, toRead)) -- return FALSE; -- -- /* uncompress the data */ -- uncompressedBytes = client->raw_buffer_size; -- inflateResult = lzo1x_decompress( -- (lzo_byte *)client->ultra_buffer, toRead, -- (lzo_byte *)client->raw_buffer, &uncompressedBytes, NULL); -- if ( inflateResult != LZO_E_OK ) -- { -- rfbClientLog("ultra decompress returned error: %d\n", -- inflateResult); -- return FALSE; -- } -- -- /* Put the uncompressed contents of the update on the screen. */ -- ptr = (unsigned char *)client->raw_buffer; -- for (i=0; i --#include --#include --#include --#include --#include "tls.h" -- --static void Dummy(rfbClient* client) { --} --static rfbBool DummyPoint(rfbClient* client, int x, int y) { -- return TRUE; --} --static void DummyRect(rfbClient* client, int x, int y, int w, int h) { --} -- --#ifdef __MINGW32__ --static char* NoPassword(rfbClient* client) { -- return strdup(""); --} --#undef SOCKET --#include --#define close closesocket --#else --#include --#include --#endif -- --static char* ReadPassword(rfbClient* client) { --#ifdef __MINGW32__ -- /* FIXME */ -- rfbClientErr("ReadPassword on MinGW32 NOT IMPLEMENTED\n"); -- return NoPassword(client); --#else -- int i; -- char* p=malloc(9); -- struct termios save,noecho; -- p[0]=0; -- if(tcgetattr(fileno(stdin),&save)!=0) return p; -- noecho=save; noecho.c_lflag &= ~ECHO; -- if(tcsetattr(fileno(stdin),TCSAFLUSH,&noecho)!=0) return p; -- fprintf(stderr,"Password: "); -- i=0; -- while(1) { -- int c=fgetc(stdin); -- if(c=='\n') -- break; -- if(i<8) { -- p[i]=c; -- i++; -- p[i]=0; -- } -- } -- tcsetattr(fileno(stdin),TCSAFLUSH,&save); -- return p; --#endif --} --static rfbBool MallocFrameBuffer(rfbClient* client) { -- if(client->frameBuffer) -- free(client->frameBuffer); -- client->frameBuffer=malloc(client->width*client->height*client->format.bitsPerPixel/8); -- return client->frameBuffer?TRUE:FALSE; --} -- --static void initAppData(AppData* data) { -- data->shareDesktop=TRUE; -- data->viewOnly=FALSE; -- data->encodingsString="tight zrle ultra copyrect hextile zlib corre rre raw"; -- data->useBGR233=FALSE; -- data->nColours=0; -- data->forceOwnCmap=FALSE; -- data->forceTrueColour=FALSE; -- data->requestedDepth=0; -- data->compressLevel=3; -- data->qualityLevel=5; --#ifdef LIBVNCSERVER_HAVE_LIBJPEG -- data->enableJPEG=TRUE; --#else -- data->enableJPEG=FALSE; --#endif -- data->useRemoteCursor=FALSE; --} -- --rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel, -- int bytesPerPixel) { -- rfbClient* client=(rfbClient*)calloc(sizeof(rfbClient),1); -- if(!client) { -- rfbClientErr("Couldn't allocate client structure!\n"); -- return NULL; -- } -- initAppData(&client->appData); -- client->endianTest = 1; -- client->programName=""; -- client->serverHost=strdup(""); -- client->serverPort=5900; -- -- client->destHost = NULL; -- client->destPort = 5900; -- -- client->CurrentKeyboardLedState = 0; -- client->HandleKeyboardLedState = (HandleKeyboardLedStateProc)DummyPoint; -- -- /* default: use complete frame buffer */ -- client->updateRect.x = -1; -- -- client->format.bitsPerPixel = bytesPerPixel*8; -- client->format.depth = bitsPerSample*samplesPerPixel; -- client->appData.requestedDepth=client->format.depth; -- client->format.bigEndian = *(char *)&client->endianTest?FALSE:TRUE; -- client->format.trueColour = TRUE; -- -- if (client->format.bitsPerPixel == 8) { -- client->format.redMax = 7; -- client->format.greenMax = 7; -- client->format.blueMax = 3; -- client->format.redShift = 0; -- client->format.greenShift = 3; -- client->format.blueShift = 6; -- } else { -- client->format.redMax = (1 << bitsPerSample) - 1; -- client->format.greenMax = (1 << bitsPerSample) - 1; -- client->format.blueMax = (1 << bitsPerSample) - 1; -- if(!client->format.bigEndian) { -- client->format.redShift = 0; -- client->format.greenShift = bitsPerSample; -- client->format.blueShift = bitsPerSample * 2; -- } else { -- if(client->format.bitsPerPixel==8*3) { -- client->format.redShift = bitsPerSample*2; -- client->format.greenShift = bitsPerSample*1; -- client->format.blueShift = 0; -- } else { -- client->format.redShift = bitsPerSample*3; -- client->format.greenShift = bitsPerSample*2; -- client->format.blueShift = bitsPerSample; -- } -- } -- } -- -- client->bufoutptr=client->buf; -- client->buffered=0; -- --#ifdef LIBVNCSERVER_HAVE_LIBZ -- client->raw_buffer_size = -1; -- client->decompStreamInited = FALSE; -- --#ifdef LIBVNCSERVER_HAVE_LIBJPEG -- memset(client->zlibStreamActive,0,sizeof(rfbBool)*4); -- client->jpegSrcManager = NULL; --#endif --#endif -- -- client->HandleCursorPos = DummyPoint; -- client->SoftCursorLockArea = DummyRect; -- client->SoftCursorUnlockScreen = Dummy; -- client->GotFrameBufferUpdate = DummyRect; -- client->FinishedFrameBufferUpdate = NULL; -- client->GetPassword = ReadPassword; -- client->MallocFrameBuffer = MallocFrameBuffer; -- client->Bell = Dummy; -- client->CurrentKeyboardLedState = 0; -- client->HandleKeyboardLedState = (HandleKeyboardLedStateProc)DummyPoint; -- client->QoS_DSCP = 0; -- -- client->authScheme = 0; -- client->subAuthScheme = 0; -- client->GetCredential = NULL; --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- client->tlsSession = NULL; --#endif -- client->sock = -1; -- client->listenSock = -1; -- client->clientAuthSchemes = NULL; -- return client; --} -- --static rfbBool rfbInitConnection(rfbClient* client) --{ -- /* Unless we accepted an incoming connection, make a TCP connection to the -- given VNC server */ -- -- if (!client->listenSpecified) { -- if (!client->serverHost) -- return FALSE; -- if (client->destHost) { -- if (!ConnectToRFBRepeater(client,client->serverHost,client->serverPort,client->destHost,client->destPort)) -- return FALSE; -- } else { -- if (!ConnectToRFBServer(client,client->serverHost,client->serverPort)) -- return FALSE; -- } -- } -- -- /* Initialise the VNC connection, including reading the password */ -- -- if (!InitialiseRFBConnection(client)) -- return FALSE; -- -- client->width=client->si.framebufferWidth; -- client->height=client->si.framebufferHeight; -- client->MallocFrameBuffer(client); -- -- if (!SetFormatAndEncodings(client)) -- return FALSE; -- -- if (client->updateRect.x < 0) { -- client->updateRect.x = client->updateRect.y = 0; -- client->updateRect.w = client->width; -- client->updateRect.h = client->height; -- } -- -- if (client->appData.scaleSetting>1) -- { -- if (!SendScaleSetting(client, client->appData.scaleSetting)) -- return FALSE; -- if (!SendFramebufferUpdateRequest(client, -- client->updateRect.x / client->appData.scaleSetting, -- client->updateRect.y / client->appData.scaleSetting, -- client->updateRect.w / client->appData.scaleSetting, -- client->updateRect.h / client->appData.scaleSetting, -- FALSE)) -- return FALSE; -- } -- else -- { -- if (!SendFramebufferUpdateRequest(client, -- client->updateRect.x, client->updateRect.y, -- client->updateRect.w, client->updateRect.h, -- FALSE)) -- return FALSE; -- } -- -- return TRUE; --} -- --rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) { -- int i,j; -- -- if(argv && argc && *argc) { -- if(client->programName==0) -- client->programName=argv[0]; -- -- for (i = 1; i < *argc; i++) { -- j = i; -- if (strcmp(argv[i], "-listen") == 0) { -- listenForIncomingConnections(client); -- break; -- } else if (strcmp(argv[i], "-listennofork") == 0) { -- listenForIncomingConnectionsNoFork(client, -1); -- break; -- } else if (strcmp(argv[i], "-play") == 0) { -- client->serverPort = -1; -- j++; -- } else if (i+1<*argc && strcmp(argv[i], "-encodings") == 0) { -- client->appData.encodingsString = argv[i+1]; -- j+=2; -- } else if (i+1<*argc && strcmp(argv[i], "-compress") == 0) { -- client->appData.compressLevel = atoi(argv[i+1]); -- j+=2; -- } else if (i+1<*argc && strcmp(argv[i], "-quality") == 0) { -- client->appData.qualityLevel = atoi(argv[i+1]); -- j+=2; -- } else if (i+1<*argc && strcmp(argv[i], "-scale") == 0) { -- client->appData.scaleSetting = atoi(argv[i+1]); -- j+=2; -- } else if (i+1<*argc && strcmp(argv[i], "-qosdscp") == 0) { -- client->QoS_DSCP = atoi(argv[i+1]); -- j+=2; -- } else if (i+1<*argc && strcmp(argv[i], "-repeaterdest") == 0) { -- char* colon=strchr(argv[i+1],':'); -- -- if(client->destHost) -- free(client->destHost); -- client->destPort = 5900; -- -- client->destHost = strdup(argv[i+1]); -- if(colon) { -- client->destHost[(int)(colon-argv[i+1])] = '\0'; -- client->destPort = atoi(colon+1); -- } -- j+=2; -- } else { -- char* colon=strchr(argv[i],':'); -- -- if(client->serverHost) -- free(client->serverHost); -- -- if(colon) { -- client->serverHost = strdup(argv[i]); -- client->serverHost[(int)(colon-argv[i])] = '\0'; -- client->serverPort = atoi(colon+1); -- } else { -- client->serverHost = strdup(argv[i]); -- } -- if(client->serverPort >= 0 && client->serverPort < 5900) -- client->serverPort += 5900; -- } -- /* purge arguments */ -- if (j>i) { -- *argc-=j-i; -- memmove(argv+i,argv+j,(*argc-i)*sizeof(char*)); -- i--; -- } -- } -- } -- -- if(!rfbInitConnection(client)) { -- rfbClientCleanup(client); -- return FALSE; -- } -- -- return TRUE; --} -- --void rfbClientCleanup(rfbClient* client) { --#ifdef LIBVNCSERVER_HAVE_LIBZ --#ifdef LIBVNCSERVER_HAVE_LIBJPEG -- int i; -- -- for ( i = 0; i < 4; i++ ) { -- if (client->zlibStreamActive[i] == TRUE ) { -- if (inflateEnd (&client->zlibStream[i]) != Z_OK && -- client->zlibStream[i].msg != NULL) -- rfbClientLog("inflateEnd: %s\n", client->zlibStream[i].msg); -- } -- } -- -- if ( client->decompStreamInited == TRUE ) { -- if (inflateEnd (&client->decompStream) != Z_OK && -- client->decompStream.msg != NULL) -- rfbClientLog("inflateEnd: %s\n", client->decompStream.msg ); -- } -- -- if (client->jpegSrcManager) -- free(client->jpegSrcManager); --#endif --#endif -- --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- FreeTLS(client); --#endif -- if (client->sock >= 0) -- close(client->sock); -- if (client->listenSock >= 0) -- close(client->listenSock); -- free(client->desktopName); -- free(client->serverHost); -- if (client->destHost) -- free(client->destHost); -- if (client->clientAuthSchemes) -- free(client->clientAuthSchemes); -- free(client); --} -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/zlib.c b/remmina-plugins/vnc/libvncserver/libvncclient/zlib.c -deleted file mode 100644 -index e872d40..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/zlib.c -+++ /dev/null -@@ -1,162 +0,0 @@ --/* -- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --#ifdef LIBVNCSERVER_HAVE_LIBZ -- --/* -- * zlib.c - handle zlib encoding. -- * -- * This file shouldn't be compiled directly. It is included multiple times by -- * rfbproto.c, each time with a different definition of the macro BPP. For -- * each value of BPP, this file defines a function which handles an zlib -- * encoded rectangle with BPP bits per pixel. -- */ -- --#define HandleZlibBPP CONCAT2E(HandleZlib,BPP) --#define CARDBPP CONCAT3E(uint,BPP,_t) -- --static rfbBool --HandleZlibBPP (rfbClient* client, int rx, int ry, int rw, int rh) --{ -- rfbZlibHeader hdr; -- int remaining; -- int inflateResult; -- int toRead; -- -- /* First make sure we have a large enough raw buffer to hold the -- * decompressed data. In practice, with a fixed BPP, fixed frame -- * buffer size and the first update containing the entire frame -- * buffer, this buffer allocation should only happen once, on the -- * first update. -- */ -- if ( client->raw_buffer_size < (( rw * rh ) * ( BPP / 8 ))) { -- -- if ( client->raw_buffer != NULL ) { -- -- free( client->raw_buffer ); -- -- } -- -- client->raw_buffer_size = (( rw * rh ) * ( BPP / 8 )); -- client->raw_buffer = (char*) malloc( client->raw_buffer_size ); -- -- } -- -- if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbZlibHeader)) -- return FALSE; -- -- remaining = rfbClientSwap32IfLE(hdr.nBytes); -- -- /* Need to initialize the decompressor state. */ -- client->decompStream.next_in = ( Bytef * )client->buffer; -- client->decompStream.avail_in = 0; -- client->decompStream.next_out = ( Bytef * )client->raw_buffer; -- client->decompStream.avail_out = client->raw_buffer_size; -- client->decompStream.data_type = Z_BINARY; -- -- /* Initialize the decompression stream structures on the first invocation. */ -- if ( client->decompStreamInited == FALSE ) { -- -- inflateResult = inflateInit( &client->decompStream ); -- -- if ( inflateResult != Z_OK ) { -- rfbClientLog( -- "inflateInit returned error: %d, msg: %s\n", -- inflateResult, -- client->decompStream.msg); -- return FALSE; -- } -- -- client->decompStreamInited = TRUE; -- -- } -- -- inflateResult = Z_OK; -- -- /* Process buffer full of data until no more to process, or -- * some type of inflater error, or Z_STREAM_END. -- */ -- while (( remaining > 0 ) && -- ( inflateResult == Z_OK )) { -- -- if ( remaining > RFB_BUFFER_SIZE ) { -- toRead = RFB_BUFFER_SIZE; -- } -- else { -- toRead = remaining; -- } -- -- /* Fill the buffer, obtaining data from the server. */ -- if (!ReadFromRFBServer(client, client->buffer,toRead)) -- return FALSE; -- -- client->decompStream.next_in = ( Bytef * )client->buffer; -- client->decompStream.avail_in = toRead; -- -- /* Need to uncompress buffer full. */ -- inflateResult = inflate( &client->decompStream, Z_SYNC_FLUSH ); -- -- /* We never supply a dictionary for compression. */ -- if ( inflateResult == Z_NEED_DICT ) { -- rfbClientLog("zlib inflate needs a dictionary!\n"); -- return FALSE; -- } -- if ( inflateResult < 0 ) { -- rfbClientLog( -- "zlib inflate returned error: %d, msg: %s\n", -- inflateResult, -- client->decompStream.msg); -- return FALSE; -- } -- -- /* Result buffer allocated to be at least large enough. We should -- * never run out of space! -- */ -- if (( client->decompStream.avail_in > 0 ) && -- ( client->decompStream.avail_out <= 0 )) { -- rfbClientLog("zlib inflate ran out of space!\n"); -- return FALSE; -- } -- -- remaining -= toRead; -- -- } /* while ( remaining > 0 ) */ -- -- if ( inflateResult == Z_OK ) { -- -- /* Put the uncompressed contents of the update on the screen. */ -- CopyRectangle(client, (uint8_t *)client->raw_buffer, rx, ry, rw, rh); -- } -- else { -- -- rfbClientLog( -- "zlib inflate returned error: %d, msg: %s\n", -- inflateResult, -- client->decompStream.msg); -- return FALSE; -- -- } -- -- return TRUE; --} -- --#undef CARDBPP -- --#endif -diff --git a/remmina-plugins/vnc/libvncserver/libvncclient/zrle.c b/remmina-plugins/vnc/libvncserver/libvncclient/zrle.c -deleted file mode 100644 -index a14ad44..0000000 ---- a/remmina-plugins/vnc/libvncserver/libvncclient/zrle.c -+++ /dev/null -@@ -1,427 +0,0 @@ --/* -- * Copyright (C) 2005 Johannes E. Schindelin. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --#ifdef LIBVNCSERVER_HAVE_LIBZ -- --/* -- * zrle.c - handle zrle encoding. -- * -- * This file shouldn't be compiled directly. It is included multiple times by -- * rfbproto.c, each time with a different definition of the macro BPP. For -- * each value of BPP, this file defines a function which handles an zrle -- * encoded rectangle with BPP bits per pixel. -- */ -- --#ifndef REALBPP --#define REALBPP BPP --#endif -- --#if !defined(UNCOMP) || UNCOMP==0 --#define HandleZRLE CONCAT2E(HandleZRLE,REALBPP) --#define HandleZRLETile CONCAT2E(HandleZRLETile,REALBPP) --#elif UNCOMP>0 --#define HandleZRLE CONCAT3E(HandleZRLE,REALBPP,Down) --#define HandleZRLETile CONCAT3E(HandleZRLETile,REALBPP,Down) --#else --#define HandleZRLE CONCAT3E(HandleZRLE,REALBPP,Up) --#define HandleZRLETile CONCAT3E(HandleZRLETile,REALBPP,Up) --#endif --#define CARDBPP CONCAT3E(uint,BPP,_t) --#define CARDREALBPP CONCAT3E(uint,REALBPP,_t) -- --#define ENDIAN_LITTLE 0 --#define ENDIAN_BIG 1 --#define ENDIAN_NO 2 --#define ZYWRLE_ENDIAN ENDIAN_LITTLE --#undef END_FIX --#if ZYWRLE_ENDIAN == ENDIAN_LITTLE --# define END_FIX LE --#elif ZYWRLE_ENDIAN == ENDIAN_BIG --# define END_FIX BE --#else --# define END_FIX NE --#endif --#define __RFB_CONCAT3E(a,b,c) CONCAT3E(a,b,c) --#define __RFB_CONCAT2E(a,b) CONCAT2E(a,b) --#undef CPIXEL --#if REALBPP != BPP --#if UNCOMP == 0 --#define CPIXEL REALBPP --#elif UNCOMP>0 --#define CPIXEL CONCAT2E(REALBPP,Down) --#else --#define CPIXEL CONCAT2E(REALBPP,Up) --#endif --#endif --#define PIXEL_T __RFB_CONCAT3E(uint,BPP,_t) --#if BPP!=8 --#define ZYWRLE_DECODE 1 --#include "zywrletemplate.c" --#endif --#undef CPIXEL -- --static int HandleZRLETile(rfbClient* client, -- uint8_t* buffer,size_t buffer_length, -- int x,int y,int w,int h); -- --static rfbBool --HandleZRLE (rfbClient* client, int rx, int ry, int rw, int rh) --{ -- rfbZRLEHeader header; -- int remaining; -- int inflateResult; -- int toRead; -- int min_buffer_size = rw * rh * (REALBPP / 8) * 2; -- -- /* First make sure we have a large enough raw buffer to hold the -- * decompressed data. In practice, with a fixed REALBPP, fixed frame -- * buffer size and the first update containing the entire frame -- * buffer, this buffer allocation should only happen once, on the -- * first update. -- */ -- if ( client->raw_buffer_size < min_buffer_size) { -- -- if ( client->raw_buffer != NULL ) { -- -- free( client->raw_buffer ); -- -- } -- -- client->raw_buffer_size = min_buffer_size; -- client->raw_buffer = (char*) malloc( client->raw_buffer_size ); -- -- } -- -- if (!ReadFromRFBServer(client, (char *)&header, sz_rfbZRLEHeader)) -- return FALSE; -- -- remaining = rfbClientSwap32IfLE(header.length); -- -- /* Need to initialize the decompressor state. */ -- client->decompStream.next_in = ( Bytef * )client->buffer; -- client->decompStream.avail_in = 0; -- client->decompStream.next_out = ( Bytef * )client->raw_buffer; -- client->decompStream.avail_out = client->raw_buffer_size; -- client->decompStream.data_type = Z_BINARY; -- -- /* Initialize the decompression stream structures on the first invocation. */ -- if ( client->decompStreamInited == FALSE ) { -- -- inflateResult = inflateInit( &client->decompStream ); -- -- if ( inflateResult != Z_OK ) { -- rfbClientLog( -- "inflateInit returned error: %d, msg: %s\n", -- inflateResult, -- client->decompStream.msg); -- return FALSE; -- } -- -- client->decompStreamInited = TRUE; -- -- } -- -- inflateResult = Z_OK; -- -- /* Process buffer full of data until no more to process, or -- * some type of inflater error, or Z_STREAM_END. -- */ -- while (( remaining > 0 ) && -- ( inflateResult == Z_OK )) { -- -- if ( remaining > RFB_BUFFER_SIZE ) { -- toRead = RFB_BUFFER_SIZE; -- } -- else { -- toRead = remaining; -- } -- -- /* Fill the buffer, obtaining data from the server. */ -- if (!ReadFromRFBServer(client, client->buffer,toRead)) -- return FALSE; -- -- client->decompStream.next_in = ( Bytef * )client->buffer; -- client->decompStream.avail_in = toRead; -- -- /* Need to uncompress buffer full. */ -- inflateResult = inflate( &client->decompStream, Z_SYNC_FLUSH ); -- -- /* We never supply a dictionary for compression. */ -- if ( inflateResult == Z_NEED_DICT ) { -- rfbClientLog("zlib inflate needs a dictionary!\n"); -- return FALSE; -- } -- if ( inflateResult < 0 ) { -- rfbClientLog( -- "zlib inflate returned error: %d, msg: %s\n", -- inflateResult, -- client->decompStream.msg); -- return FALSE; -- } -- -- /* Result buffer allocated to be at least large enough. We should -- * never run out of space! -- */ -- if (( client->decompStream.avail_in > 0 ) && -- ( client->decompStream.avail_out <= 0 )) { -- rfbClientLog("zlib inflate ran out of space!\n"); -- return FALSE; -- } -- -- remaining -= toRead; -- -- } /* while ( remaining > 0 ) */ -- -- if ( inflateResult == Z_OK ) { -- void* buf=client->raw_buffer; -- int i,j; -- -- remaining = client->raw_buffer_size-client->decompStream.avail_out; -- -- for(j=0; jrw)?rw-i:rfbZRLETileWidth; -- int subHeight=(j+rfbZRLETileHeight>rh)?rh-j:rfbZRLETileHeight; -- int result=HandleZRLETile(client,buf,remaining,rx+i,ry+j,subWidth,subHeight); -- -- if(result<0) { -- rfbClientLog("ZRLE decoding failed (%d)\n",result); --return TRUE; -- return FALSE; -- } -- -- buf+=result; -- remaining-=result; -- } -- } -- else { -- -- rfbClientLog( -- "zlib inflate returned error: %d, msg: %s\n", -- inflateResult, -- client->decompStream.msg); -- return FALSE; -- -- } -- -- return TRUE; --} -- --#if REALBPP!=BPP && defined(UNCOMP) && UNCOMP!=0 --#if UNCOMP>0 --#define UncompressCPixel(pointer) ((*(CARDBPP*)pointer)>>UNCOMP) --#else --#define UncompressCPixel(pointer) ((*(CARDBPP*)pointer)<<(-(UNCOMP))) --#endif --#else --#define UncompressCPixel(pointer) (*(CARDBPP*)pointer) --#endif -- --static int HandleZRLETile(rfbClient* client, -- uint8_t* buffer,size_t buffer_length, -- int x,int y,int w,int h) { -- uint8_t* buffer_copy = buffer; -- uint8_t* buffer_end = buffer+buffer_length; -- uint8_t type; --#if BPP!=8 -- uint8_t zywrle_level = (client->appData.qualityLevel & 0x80) ? -- 0 : (3 - client->appData.qualityLevel / 3); --#endif -- -- if(buffer_length<1) -- return -2; -- -- type = *buffer; -- buffer++; -- { -- if( type == 0 ) /* raw */ --#if BPP!=8 -- if( zywrle_level > 0 ){ -- CARDBPP* pFrame = (CARDBPP*)client->frameBuffer + y*client->width+x; -- int ret; -- client->appData.qualityLevel |= 0x80; -- ret = HandleZRLETile(client, buffer, buffer_end-buffer, x, y, w, h); -- client->appData.qualityLevel &= 0x7F; -- if( ret < 0 ){ -- return ret; -- } -- ZYWRLE_SYNTHESIZE( pFrame, pFrame, w, h, client->width, zywrle_level, (int*)client->zlib_buffer ); -- buffer += ret; -- }else --#endif -- { --#if REALBPP!=BPP -- int i,j; -- -- if(1+w*h*REALBPP/8>buffer_length) { -- rfbClientLog("expected %d bytes, got only %d (%dx%d)\n",1+w*h*REALBPP/8,buffer_length,w,h); -- return -3; -- } -- -- for(j=y*client->width; j<(y+h)*client->width; j+=client->width) -- for(i=x; iframeBuffer)[j+i] = UncompressCPixel(buffer); --#else -- CopyRectangle(client, buffer, x, y, w, h); -- buffer+=w*h*REALBPP/8; --#endif -- } -- else if( type == 1 ) /* solid */ -- { -- CARDBPP color = UncompressCPixel(buffer); -- -- if(1+REALBPP/8>buffer_length) -- return -4; -- -- FillRectangle(client, x, y, w, h, color); -- -- buffer+=REALBPP/8; -- -- } -- else if( (type >= 2)&&(type <= 127) ) /* packed Palette */ -- { -- CARDBPP palette[16]; -- int i,j,shift, -- bpp=(type>4?(type>16?8:4):(type>2?2:1)), -- mask=(1<buffer_length) -- return -5; -- -- /* read palette */ -- for(i=0; iwidth; j<(y+h)*client->width; j+=client->width) { -- for(i=x,shift=8-bpp; iframeBuffer)[j+i] = palette[((*buffer)>>shift)&mask]; -- shift-=bpp; -- if(shift<0) { -- shift=8-bpp; -- buffer++; -- } -- } -- if(shift<8-bpp) -- buffer++; -- } -- -- } -- /* case 17 ... 127: not used, but valid */ -- else if( type == 128 ) /* plain RLE */ -- { -- int i=0,j=0; -- while(jbuffer_end) -- return -7; -- color = UncompressCPixel(buffer); -- buffer+=REALBPP/8; -- /* read run length */ -- length=1; -- while(*buffer==0xff) { -- if(buffer+1>=buffer_end) -- return -8; -- length+=*buffer; -- buffer++; -- } -- length+=*buffer; -- buffer++; -- while(j0) { -- ((CARDBPP*)client->frameBuffer)[(y+j)*client->width+x+i] = color; -- length--; -- i++; -- if(i>=w) { -- i=0; -- j++; -- } -- } -- if(length>0) -- rfbClientLog("Warning: possible ZRLE corruption\n"); -- } -- -- } -- else if( type == 129 ) /* unused */ -- { -- return -8; -- } -- else if( type >= 130 ) /* palette RLE */ -- { -- CARDBPP palette[128]; -- int i,j; -- -- if(2+(type-128)*REALBPP/8>buffer_length) -- return -9; -- -- /* read palette */ -- for(i=0; i=buffer_end) -- return -10; -- color = palette[(*buffer)&0x7f]; -- length=1; -- if(*buffer&0x80) { -- if(buffer+1>=buffer_end) -- return -11; -- buffer++; -- /* read run length */ -- while(*buffer==0xff) { -- if(buffer+1>=buffer_end) -- return -8; -- length+=*buffer; -- buffer++; -- } -- length+=*buffer; -- } -- buffer++; -- while(j0) { -- ((CARDBPP*)client->frameBuffer)[(y+j)*client->width+x+i] = color; -- length--; -- i++; -- if(i>=w) { -- i=0; -- j++; -- } -- } -- if(length>0) -- rfbClientLog("Warning: possible ZRLE corruption\n"); -- } -- } -- } -- -- return buffer-buffer_copy; --} -- --#undef CARDBPP --#undef CARDREALBPP --#undef HandleZRLE --#undef HandleZRLETile --#undef UncompressCPixel --#undef REALBPP -- --#endif -- --#undef UNCOMP -diff --git a/remmina-plugins/vnc/libvncserver/rfb/default8x16.h b/remmina-plugins/vnc/libvncserver/rfb/default8x16.h -deleted file mode 100644 -index 252f411..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfb/default8x16.h -+++ /dev/null -@@ -1,261 +0,0 @@ --static unsigned char default8x16FontData[4096+1]={ --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x7e,0x81,0xa5,0x81,0x81,0xbd,0x99,0x81,0x81,0x7e,0x00,0x00,0x00,0x00, --0x00,0x00,0x7e,0xff,0xdb,0xff,0xff,0xc3,0xe7,0xff,0xff,0x7e,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x6c,0xfe,0xfe,0xfe,0xfe,0x7c,0x38,0x10,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x10,0x38,0x7c,0xfe,0x7c,0x38,0x10,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x18,0x3c,0x3c,0xe7,0xe7,0xe7,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x18,0x3c,0x7e,0xff,0xff,0x7e,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3c,0x3c,0x18,0x00,0x00,0x00,0x00,0x00,0x00, --0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xc3,0xc3,0xe7,0xff,0xff,0xff,0xff,0xff,0xff, --0x00,0x00,0x00,0x00,0x00,0x3c,0x66,0x42,0x42,0x66,0x3c,0x00,0x00,0x00,0x00,0x00, --0xff,0xff,0xff,0xff,0xff,0xc3,0x99,0xbd,0xbd,0x99,0xc3,0xff,0xff,0xff,0xff,0xff, --0x00,0x00,0x1e,0x0e,0x1a,0x32,0x78,0xcc,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00, --0x00,0x00,0x3c,0x66,0x66,0x66,0x66,0x3c,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0x3f,0x33,0x3f,0x30,0x30,0x30,0x30,0x70,0xf0,0xe0,0x00,0x00,0x00,0x00, --0x00,0x00,0x7f,0x63,0x7f,0x63,0x63,0x63,0x63,0x67,0xe7,0xe6,0xc0,0x00,0x00,0x00, --0x00,0x00,0x00,0x18,0x18,0xdb,0x3c,0xe7,0x3c,0xdb,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfe,0xf8,0xf0,0xe0,0xc0,0x80,0x00,0x00,0x00,0x00, --0x00,0x02,0x06,0x0e,0x1e,0x3e,0xfe,0x3e,0x1e,0x0e,0x06,0x02,0x00,0x00,0x00,0x00, --0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x66,0x66,0x00,0x00,0x00,0x00, --0x00,0x00,0x7f,0xdb,0xdb,0xdb,0x7b,0x1b,0x1b,0x1b,0x1b,0x1b,0x00,0x00,0x00,0x00, --0x00,0x7c,0xc6,0x60,0x38,0x6c,0xc6,0xc6,0x6c,0x38,0x0c,0xc6,0x7c,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0xfe,0xfe,0x00,0x00,0x00,0x00, --0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x7e,0x3c,0x18,0x7e,0x00,0x00,0x00,0x00, --0x00,0x00,0x18,0x3c,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x3c,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x18,0x0c,0xfe,0x0c,0x18,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x30,0x60,0xfe,0x60,0x30,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xc0,0xc0,0xfe,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x24,0x66,0xff,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x10,0x38,0x38,0x7c,0x7c,0xfe,0xfe,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0xfe,0xfe,0x7c,0x7c,0x38,0x38,0x10,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x18,0x3c,0x3c,0x3c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,0x00,0x00, --0x18,0x18,0x7c,0xc6,0xc2,0xc0,0x7c,0x06,0x06,0x86,0xc6,0x7c,0x18,0x18,0x00,0x00, --0x00,0x00,0x00,0x00,0xc2,0xc6,0x0c,0x18,0x30,0x60,0xc6,0x86,0x00,0x00,0x00,0x00, --0x00,0x00,0x38,0x6c,0x6c,0x38,0x76,0xdc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c,0x00,0x00,0x00,0x00, --0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x02,0x06,0x0c,0x18,0x30,0x60,0xc0,0x80,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0xc6,0xce,0xde,0xf6,0xe6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x18,0x38,0x78,0x18,0x18,0x18,0x18,0x18,0x18,0x7e,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0x06,0x0c,0x18,0x30,0x60,0xc0,0xc6,0xfe,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0x06,0x06,0x3c,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x0c,0x1c,0x3c,0x6c,0xcc,0xfe,0x0c,0x0c,0x0c,0x1e,0x00,0x00,0x00,0x00, --0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xfc,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x38,0x60,0xc0,0xc0,0xfc,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0xfe,0xc6,0x06,0x06,0x0c,0x18,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0x0c,0x78,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0xc6,0x0c,0x18,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xde,0xde,0xde,0xdc,0xc0,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, --0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00, --0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00,0x00,0x00, --0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00, --0x00,0x00,0xfe,0x66,0x62,0x68,0x78,0x68,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, --0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xde,0xc6,0xc6,0x66,0x3a,0x00,0x00,0x00,0x00, --0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, --0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0x1e,0x0c,0x0c,0x0c,0x0c,0x0c,0xcc,0xcc,0xcc,0x78,0x00,0x00,0x00,0x00, --0x00,0x00,0xe6,0x66,0x66,0x6c,0x78,0x78,0x6c,0x66,0x66,0xe6,0x00,0x00,0x00,0x00, --0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x60,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00, --0x00,0x00,0xc3,0xe7,0xff,0xff,0xdb,0xc3,0xc3,0xc3,0xc3,0xc3,0x00,0x00,0x00,0x00, --0x00,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xd6,0xde,0x7c,0x0c,0x0e,0x00,0x00, --0x00,0x00,0xfc,0x66,0x66,0x66,0x7c,0x6c,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00, --0x00,0x00,0x7c,0xc6,0xc6,0x60,0x38,0x0c,0x06,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0xff,0xdb,0x99,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0xc3,0xc3,0xc3,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x66,0x00,0x00,0x00,0x00, --0x00,0x00,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x3c,0x66,0xc3,0xc3,0x00,0x00,0x00,0x00, --0x00,0x00,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0xff,0xc3,0x86,0x0c,0x18,0x30,0x60,0xc1,0xc3,0xff,0x00,0x00,0x00,0x00, --0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x80,0xc0,0xe0,0x70,0x38,0x1c,0x0e,0x06,0x02,0x00,0x00,0x00,0x00, --0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00,0x00,0x00, --0x10,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00, --0x30,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x00,0xe0,0x60,0x60,0x78,0x6c,0x66,0x66,0x66,0x66,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x1c,0x0c,0x0c,0x3c,0x6c,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0xcc,0x78,0x00, --0x00,0x00,0xe0,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00, --0x00,0x00,0x18,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0x06,0x06,0x00,0x0e,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3c,0x00, --0x00,0x00,0xe0,0x60,0x60,0x66,0x6c,0x78,0x78,0x6c,0x66,0xe6,0x00,0x00,0x00,0x00, --0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xe6,0xff,0xdb,0xdb,0xdb,0xdb,0xdb,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xf0,0x00, --0x00,0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0x7c,0x0c,0x0c,0x1e,0x00, --0x00,0x00,0x00,0x00,0x00,0xdc,0x76,0x66,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0x60,0x38,0x0c,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x10,0x30,0x30,0xfc,0x30,0x30,0x30,0x30,0x36,0x1c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xc3,0xc3,0x66,0x3c,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xc3,0xc3,0xc3,0xdb,0xdb,0xff,0x66,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xc3,0x66,0x3c,0x18,0x3c,0x66,0xc3,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c,0xf8,0x00, --0x00,0x00,0x00,0x00,0x00,0xfe,0xcc,0x18,0x30,0x60,0xc6,0xfe,0x00,0x00,0x00,0x00, --0x00,0x00,0x0e,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x18,0x0e,0x00,0x00,0x00,0x00, --0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0x70,0x18,0x18,0x18,0x0e,0x18,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00, --0x00,0x00,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xfe,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x0c,0x06,0x7c,0x00,0x00, --0x00,0x00,0xcc,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x0c,0x18,0x30,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x10,0x38,0x6c,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x00,0xcc,0x00,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x60,0x30,0x18,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x38,0x6c,0x38,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x3c,0x66,0x60,0x60,0x66,0x3c,0x0c,0x06,0x3c,0x00,0x00,0x00, --0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x66,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x18,0x3c,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0xc6,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, --0x38,0x6c,0x38,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, --0x18,0x30,0x60,0x00,0xfe,0x66,0x60,0x7c,0x60,0x60,0x66,0xfe,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x6e,0x3b,0x1b,0x7e,0xd8,0xdc,0x77,0x00,0x00,0x00,0x00, --0x00,0x00,0x3e,0x6c,0xcc,0xcc,0xfe,0xcc,0xcc,0xcc,0xcc,0xce,0x00,0x00,0x00,0x00, --0x00,0x10,0x38,0x6c,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0xc6,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x30,0x78,0xcc,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x60,0x30,0x18,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x00,0xc6,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x0c,0x78,0x00, --0x00,0xc6,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0xc6,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x18,0x18,0x7e,0xc3,0xc0,0xc0,0xc0,0xc3,0x7e,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0x38,0x6c,0x64,0x60,0xf0,0x60,0x60,0x60,0x60,0xe6,0xfc,0x00,0x00,0x00,0x00, --0x00,0x00,0xc3,0x66,0x3c,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0xfc,0x66,0x66,0x7c,0x62,0x66,0x6f,0x66,0x66,0x66,0xf3,0x00,0x00,0x00,0x00, --0x00,0x0e,0x1b,0x18,0x18,0x18,0x7e,0x18,0x18,0x18,0x18,0x18,0xd8,0x70,0x00,0x00, --0x00,0x18,0x30,0x60,0x00,0x78,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x0c,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00, --0x00,0x18,0x30,0x60,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x18,0x30,0x60,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00, --0x00,0x00,0x76,0xdc,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00, --0x76,0xdc,0x00,0xc6,0xe6,0xf6,0xfe,0xde,0xce,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, --0x00,0x3c,0x6c,0x6c,0x3e,0x00,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x38,0x6c,0x6c,0x38,0x00,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x30,0x30,0x00,0x30,0x30,0x60,0xc0,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00, --0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x60,0xce,0x9b,0x06,0x0c,0x1f,0x00,0x00, --0x00,0xc0,0xc0,0xc2,0xc6,0xcc,0x18,0x30,0x66,0xce,0x96,0x3e,0x06,0x06,0x00,0x00, --0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3c,0x3c,0x3c,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x36,0x6c,0xd8,0x6c,0x36,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xd8,0x6c,0x36,0x6c,0xd8,0x00,0x00,0x00,0x00,0x00,0x00, --0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44, --0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa,0x55,0xaa, --0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77,0xdd,0x77, --0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x00,0x00,0x00,0x00,0x00,0xfe,0x06,0xf6,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x36,0x36,0x36,0x36,0x36,0xf6,0x06,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x18,0x18,0x18,0x18,0x18,0xf8,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x3f,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xf7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x36,0x36,0x36,0x36,0x36,0xf7,0x00,0xf7,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x18,0x18,0x18,0x18,0x18,0xff,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0xff,0x00,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x18,0x18,0x18,0x18,0x18,0x1f,0x18,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3f,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xff,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, --0x18,0x18,0x18,0x18,0x18,0xff,0x18,0xff,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, --0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, --0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f, --0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0xd8,0xd8,0xd8,0xdc,0x76,0x00,0x00,0x00,0x00, --0x00,0x00,0x78,0xcc,0xcc,0xcc,0xd8,0xcc,0xc6,0xc6,0xc6,0xcc,0x00,0x00,0x00,0x00, --0x00,0x00,0xfe,0xc6,0xc6,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0xfe,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0xfe,0xc6,0x60,0x30,0x18,0x30,0x60,0xc6,0xfe,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x7e,0xd8,0xd8,0xd8,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xc0,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x76,0xdc,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x7e,0x18,0x3c,0x66,0x66,0x66,0x3c,0x18,0x7e,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xfe,0xc6,0xc6,0x6c,0x38,0x00,0x00,0x00,0x00, --0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0x6c,0x6c,0x6c,0x6c,0xee,0x00,0x00,0x00,0x00, --0x00,0x00,0x1e,0x30,0x18,0x0c,0x3e,0x66,0x66,0x66,0x66,0x3c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x7e,0xdb,0xdb,0xdb,0x7e,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x03,0x06,0x7e,0xdb,0xdb,0xf3,0x7e,0x60,0xc0,0x00,0x00,0x00,0x00, --0x00,0x00,0x1c,0x30,0x60,0x60,0x7c,0x60,0x60,0x60,0x30,0x1c,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0xff,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x00,0x7e,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x00,0x7e,0x00,0x00,0x00,0x00, --0x00,0x00,0x0e,0x1b,0x1b,0x1b,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, --0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xd8,0xd8,0xd8,0x70,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x7e,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x76,0xdc,0x00,0x76,0xdc,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x38,0x6c,0x6c,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x0f,0x0c,0x0c,0x0c,0x0c,0x0c,0xec,0x6c,0x6c,0x3c,0x1c,0x00,0x00,0x00,0x00, --0x00,0xd8,0x6c,0x6c,0x6c,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x70,0xd8,0x30,0x60,0xc8,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x7c,0x00,0x00,0x00,0x00,0x00, --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, --}; --static int default8x16FontMetaData[256*5+1]={ --0,8,16,0,0,16,8,16,0,0,32,8,16,0,0,48,8,16,0,0,64,8,16,0,0,80,8,16,0,0,96,8,16,0,0,112,8,16,0,0,128,8,16,0,0,144,8,16,0,0,160,8,16,0,0,176,8,16,0,0,192,8,16,0,0,208,8,16,0,0,224,8,16,0,0,240,8,16,0,0,256,8,16,0,0,272,8,16,0,0,288,8,16,0,0,304,8,16,0,0,320,8,16,0,0,336,8,16,0,0,352,8,16,0,0,368,8,16,0,0,384,8,16,0,0,400,8,16,0,0,416,8,16,0,0,432,8,16,0,0,448,8,16,0,0,464,8,16,0,0,480,8,16,0,0,496,8,16,0,0,512,8,16,0,0,528,8,16,0,0,544,8,16,0,0,560,8,16,0,0,576,8,16,0,0,592,8,16,0,0,608,8,16,0,0,624,8,16,0,0,640,8,16,0,0,656,8,16,0,0,672,8,16,0,0,688,8,16,0,0,704,8,16,0,0,720,8,16,0,0,736,8,16,0,0,752,8,16,0,0,768,8,16,0,0,784,8,16,0,0,800,8,16,0,0,816,8,16,0,0,832,8,16,0,0,848,8,16,0,0,864,8,16,0,0,880,8,16,0,0,896,8,16,0,0,912,8,16,0,0,928,8,16,0,0,944,8,16,0,0,960,8,16,0,0,976,8,16,0,0,992,8,16,0,0,1008,8,16,0,0,1024,8,16,0,0,1040,8,16,0,0,1056,8,16,0,0,1072,8,16,0,0,1088,8,16,0,0,1104,8,16,0,0,1120,8,16,0,0,1136,8,16,0,0,1152,8,16,0,0,1168,8,16,0,0,1184,8,16,0,0,1200,8,16,0,0,1216,8,16,0,0,1232,8,16,0,0,1248,8,16,0,0,1264,8,16,0,0,1280,8,16,0,0,1296,8,16,0,0,1312,8,16,0,0,1328,8,16,0,0,1344,8,16,0,0,1360,8,16,0,0,1376,8,16,0,0,1392,8,16,0,0,1408,8,16,0,0,1424,8,16,0,0,1440,8,16,0,0,1456,8,16,0,0,1472,8,16,0,0,1488,8,16,0,0,1504,8,16,0,0,1520,8,16,0,0,1536,8,16,0,0,1552,8,16,0,0,1568,8,16,0,0,1584,8,16,0,0,1600,8,16,0,0,1616,8,16,0,0,1632,8,16,0,0,1648,8,16,0,0,1664,8,16,0,0,1680,8,16,0,0,1696,8,16,0,0,1712,8,16,0,0,1728,8,16,0,0,1744,8,16,0,0,1760,8,16,0,0,1776,8,16,0,0,1792,8,16,0,0,1808,8,16,0,0,1824,8,16,0,0,1840,8,16,0,0,1856,8,16,0,0,1872,8,16,0,0,1888,8,16,0,0,1904,8,16,0,0,1920,8,16,0,0,1936,8,16,0,0,1952,8,16,0,0,1968,8,16,0,0,1984,8,16,0,0,2000,8,16,0,0,2016,8,16,0,0,2032,8,16,0,0,2048,8,16,0,0,2064,8,16,0,0,2080,8,16,0,0,2096,8,16,0,0,2112,8,16,0,0,2128,8,16,0,0,2144,8,16,0,0,2160,8,16,0,0,2176,8,16,0,0,2192,8,16,0,0,2208,8,16,0,0,2224,8,16,0,0,2240,8,16,0,0,2256,8,16,0,0,2272,8,16,0,0,2288,8,16,0,0,2304,8,16,0,0,2320,8,16,0,0,2336,8,16,0,0,2352,8,16,0,0,2368,8,16,0,0,2384,8,16,0,0,2400,8,16,0,0,2416,8,16,0,0,2432,8,16,0,0,2448,8,16,0,0,2464,8,16,0,0,2480,8,16,0,0,2496,8,16,0,0,2512,8,16,0,0,2528,8,16,0,0,2544,8,16,0,0,2560,8,16,0,0,2576,8,16,0,0,2592,8,16,0,0,2608,8,16,0,0,2624,8,16,0,0,2640,8,16,0,0,2656,8,16,0,0,2672,8,16,0,0,2688,8,16,0,0,2704,8,16,0,0,2720,8,16,0,0,2736,8,16,0,0,2752,8,16,0,0,2768,8,16,0,0,2784,8,16,0,0,2800,8,16,0,0,2816,8,16,0,0,2832,8,16,0,0,2848,8,16,0,0,2864,8,16,0,0,2880,8,16,0,0,2896,8,16,0,0,2912,8,16,0,0,2928,8,16,0,0,2944,8,16,0,0,2960,8,16,0,0,2976,8,16,0,0,2992,8,16,0,0,3008,8,16,0,0,3024,8,16,0,0,3040,8,16,0,0,3056,8,16,0,0,3072,8,16,0,0,3088,8,16,0,0,3104,8,16,0,0,3120,8,16,0,0,3136,8,16,0,0,3152,8,16,0,0,3168,8,16,0,0,3184,8,16,0,0,3200,8,16,0,0,3216,8,16,0,0,3232,8,16,0,0,3248,8,16,0,0,3264,8,16,0,0,3280,8,16,0,0,3296,8,16,0,0,3312,8,16,0,0,3328,8,16,0,0,3344,8,16,0,0,3360,8,16,0,0,3376,8,16,0,0,3392,8,16,0,0,3408,8,16,0,0,3424,8,16,0,0,3440,8,16,0,0,3456,8,16,0,0,3472,8,16,0,0,3488,8,16,0,0,3504,8,16,0,0,3520,8,16,0,0,3536,8,16,0,0,3552,8,16,0,0,3568,8,16,0,0,3584,8,16,0,0,3600,8,16,0,0,3616,8,16,0,0,3632,8,16,0,0,3648,8,16,0,0,3664,8,16,0,0,3680,8,16,0,0,3696,8,16,0,0,3712,8,16,0,0,3728,8,16,0,0,3744,8,16,0,0,3760,8,16,0,0,3776,8,16,0,0,3792,8,16,0,0,3808,8,16,0,0,3824,8,16,0,0,3840,8,16,0,0,3856,8,16,0,0,3872,8,16,0,0,3888,8,16,0,0,3904,8,16,0,0,3920,8,16,0,0,3936,8,16,0,0,3952,8,16,0,0,3968,8,16,0,0,3984,8,16,0,0,4000,8,16,0,0,4016,8,16,0,0,4032,8,16,0,0,4048,8,16,0,0,4064,8,16,0,0,4080,8,16,0,0,}; --static rfbFontData default8x16Font = { default8x16FontData, default8x16FontMetaData }; -diff --git a/remmina-plugins/vnc/libvncserver/rfb/keysym.h b/remmina-plugins/vnc/libvncserver/rfb/keysym.h -deleted file mode 100644 -index 219f95b..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfb/keysym.h -+++ /dev/null -@@ -1,1638 +0,0 @@ --#ifndef XK_0 -- --/* $XConsortium: keysym.h,v 1.15 94/04/17 20:10:55 rws Exp $ */ -- --/*********************************************************** -- --Copyright (c) 1987 X Consortium -- --Permission is hereby granted, free of charge, to any person obtaining a copy --of this software and associated documentation files (the "Software"), to deal --in the Software without restriction, including without limitation the rights --to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --copies of the Software, and to permit persons to whom the Software is --furnished to do so, subject to the following conditions: -- --The above copyright notice and this permission notice shall be included in --all copies or substantial portions of the Software. -- --THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN --AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN --CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- --Except as contained in this notice, the name of the X Consortium shall not be --used in advertising or otherwise to promote the sale, use or other dealings --in this Software without prior written authorization from the X Consortium. -- -- --Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. -- -- All Rights Reserved -- --Permission to use, copy, modify, and distribute this software and its --documentation for any purpose and without fee is hereby granted, --provided that the above copyright notice appear in all copies and that --both that copyright notice and this permission notice appear in --supporting documentation, and that the name of Digital not be --used in advertising or publicity pertaining to distribution of the --software without specific, written prior permission. -- --DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING --ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL --DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR --ANY DAMAGES WHATSOEVER RESULTING FROM 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. -- --******************************************************************/ -- --/* default keysyms */ --#define XK_MISCELLANY --#define XK_XKB_KEYS --#define XK_LATIN1 --#define XK_LATIN2 --#define XK_LATIN3 --#define XK_LATIN4 --#define XK_GREEK -- --/* $TOG: keysymdef.h /main/25 1997/06/21 10:54:51 kaleb $ */ -- --/*********************************************************** --Copyright (c) 1987, 1994 X Consortium -- --Permission is hereby granted, free of charge, to any person obtaining --a copy of this software and associated documentation files (the --"Software"), to deal in the Software without restriction, including --without limitation the rights to use, copy, modify, merge, publish, --distribute, sublicense, and/or sell copies of the Software, and to --permit persons to whom the Software is furnished to do so, subject to --the following conditions: -- --The above copyright notice and this permission notice shall be included --in all copies or substantial portions of the Software. -- --THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR --OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, --ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR --OTHER DEALINGS IN THE SOFTWARE. -- --Except as contained in this notice, the name of the X Consortium shall --not be used in advertising or otherwise to promote the sale, use or --other dealings in this Software without prior written authorization --from the X Consortium. -- -- --Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts -- -- All Rights Reserved -- --Permission to use, copy, modify, and distribute this software and its --documentation for any purpose and without fee is hereby granted, --provided that the above copyright notice appear in all copies and that --both that copyright notice and this permission notice appear in --supporting documentation, and that the name of Digital not be --used in advertising or publicity pertaining to distribution of the --software without specific, written prior permission. -- --DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING --ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL --DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR --ANY DAMAGES WHATSOEVER RESULTING FROM 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. -- --******************************************************************/ -- --#define XK_VoidSymbol 0xFFFFFF /* void symbol */ -- --#ifdef XK_MISCELLANY --/* -- * TTY Functions, cleverly chosen to map to ascii, for convenience of -- * programming, but could have been arbitrary (at the cost of lookup -- * tables in client code. -- */ -- --#define XK_BackSpace 0xFF08 /* back space, back char */ --#define XK_Tab 0xFF09 --#define XK_Linefeed 0xFF0A /* Linefeed, LF */ --#define XK_Clear 0xFF0B --#define XK_Return 0xFF0D /* Return, enter */ --#define XK_Pause 0xFF13 /* Pause, hold */ --#define XK_Scroll_Lock 0xFF14 --#define XK_Sys_Req 0xFF15 --#define XK_Escape 0xFF1B --#define XK_Delete 0xFFFF /* Delete, rubout */ -- -- -- --/* International & multi-key character composition */ -- --#define XK_Multi_key 0xFF20 /* Multi-key character compose */ --#define XK_SingleCandidate 0xFF3C --#define XK_MultipleCandidate 0xFF3D --#define XK_PreviousCandidate 0xFF3E -- --/* Japanese keyboard support */ -- --#define XK_Kanji 0xFF21 /* Kanji, Kanji convert */ --#define XK_Muhenkan 0xFF22 /* Cancel Conversion */ --#define XK_Henkan_Mode 0xFF23 /* Start/Stop Conversion */ --#define XK_Henkan 0xFF23 /* Alias for Henkan_Mode */ --#define XK_Romaji 0xFF24 /* to Romaji */ --#define XK_Hiragana 0xFF25 /* to Hiragana */ --#define XK_Katakana 0xFF26 /* to Katakana */ --#define XK_Hiragana_Katakana 0xFF27 /* Hiragana/Katakana toggle */ --#define XK_Zenkaku 0xFF28 /* to Zenkaku */ --#define XK_Hankaku 0xFF29 /* to Hankaku */ --#define XK_Zenkaku_Hankaku 0xFF2A /* Zenkaku/Hankaku toggle */ --#define XK_Touroku 0xFF2B /* Add to Dictionary */ --#define XK_Massyo 0xFF2C /* Delete from Dictionary */ --#define XK_Kana_Lock 0xFF2D /* Kana Lock */ --#define XK_Kana_Shift 0xFF2E /* Kana Shift */ --#define XK_Eisu_Shift 0xFF2F /* Alphanumeric Shift */ --#define XK_Eisu_toggle 0xFF30 /* Alphanumeric toggle */ --#define XK_Zen_Koho 0xFF3D /* Multiple/All Candidate(s) */ --#define XK_Mae_Koho 0xFF3E /* Previous Candidate */ -- --/* 0xFF31 thru 0xFF3F are under XK_KOREAN */ -- --/* Cursor control & motion */ -- --#define XK_Home 0xFF50 --#define XK_Left 0xFF51 /* Move left, left arrow */ --#define XK_Up 0xFF52 /* Move up, up arrow */ --#define XK_Right 0xFF53 /* Move right, right arrow */ --#define XK_Down 0xFF54 /* Move down, down arrow */ --#define XK_Prior 0xFF55 /* Prior, previous */ --#define XK_Page_Up 0xFF55 --#define XK_Next 0xFF56 /* Next */ --#define XK_Page_Down 0xFF56 --#define XK_End 0xFF57 /* EOL */ --#define XK_Begin 0xFF58 /* BOL */ -- -- --/* Misc Functions */ -- --#define XK_Select 0xFF60 /* Select, mark */ --#define XK_Print 0xFF61 --#define XK_Execute 0xFF62 /* Execute, run, do */ --#define XK_Insert 0xFF63 /* Insert, insert here */ --#define XK_Undo 0xFF65 /* Undo, oops */ --#define XK_Redo 0xFF66 /* redo, again */ --#define XK_Menu 0xFF67 --#define XK_Find 0xFF68 /* Find, search */ --#define XK_Cancel 0xFF69 /* Cancel, stop, abort, exit */ --#define XK_Help 0xFF6A /* Help */ --#define XK_Break 0xFF6B --#define XK_Mode_switch 0xFF7E /* Character set switch */ --#define XK_script_switch 0xFF7E /* Alias for mode_switch */ --#define XK_Num_Lock 0xFF7F -- --/* Keypad Functions, keypad numbers cleverly chosen to map to ascii */ -- --#define XK_KP_Space 0xFF80 /* space */ --#define XK_KP_Tab 0xFF89 --#define XK_KP_Enter 0xFF8D /* enter */ --#define XK_KP_F1 0xFF91 /* PF1, KP_A, ... */ --#define XK_KP_F2 0xFF92 --#define XK_KP_F3 0xFF93 --#define XK_KP_F4 0xFF94 --#define XK_KP_Home 0xFF95 --#define XK_KP_Left 0xFF96 --#define XK_KP_Up 0xFF97 --#define XK_KP_Right 0xFF98 --#define XK_KP_Down 0xFF99 --#define XK_KP_Prior 0xFF9A --#define XK_KP_Page_Up 0xFF9A --#define XK_KP_Next 0xFF9B --#define XK_KP_Page_Down 0xFF9B --#define XK_KP_End 0xFF9C --#define XK_KP_Begin 0xFF9D --#define XK_KP_Insert 0xFF9E --#define XK_KP_Delete 0xFF9F --#define XK_KP_Equal 0xFFBD /* equals */ --#define XK_KP_Multiply 0xFFAA --#define XK_KP_Add 0xFFAB --#define XK_KP_Separator 0xFFAC /* separator, often comma */ --#define XK_KP_Subtract 0xFFAD --#define XK_KP_Decimal 0xFFAE --#define XK_KP_Divide 0xFFAF -- --#define XK_KP_0 0xFFB0 --#define XK_KP_1 0xFFB1 --#define XK_KP_2 0xFFB2 --#define XK_KP_3 0xFFB3 --#define XK_KP_4 0xFFB4 --#define XK_KP_5 0xFFB5 --#define XK_KP_6 0xFFB6 --#define XK_KP_7 0xFFB7 --#define XK_KP_8 0xFFB8 --#define XK_KP_9 0xFFB9 -- -- -- --/* -- * Auxilliary Functions; note the duplicate definitions for left and right -- * function keys; Sun keyboards and a few other manufactures have such -- * function key groups on the left and/or right sides of the keyboard. -- * We've not found a keyboard with more than 35 function keys total. -- */ -- --#define XK_F1 0xFFBE --#define XK_F2 0xFFBF --#define XK_F3 0xFFC0 --#define XK_F4 0xFFC1 --#define XK_F5 0xFFC2 --#define XK_F6 0xFFC3 --#define XK_F7 0xFFC4 --#define XK_F8 0xFFC5 --#define XK_F9 0xFFC6 --#define XK_F10 0xFFC7 --#define XK_F11 0xFFC8 --#define XK_L1 0xFFC8 --#define XK_F12 0xFFC9 --#define XK_L2 0xFFC9 --#define XK_F13 0xFFCA --#define XK_L3 0xFFCA --#define XK_F14 0xFFCB --#define XK_L4 0xFFCB --#define XK_F15 0xFFCC --#define XK_L5 0xFFCC --#define XK_F16 0xFFCD --#define XK_L6 0xFFCD --#define XK_F17 0xFFCE --#define XK_L7 0xFFCE --#define XK_F18 0xFFCF --#define XK_L8 0xFFCF --#define XK_F19 0xFFD0 --#define XK_L9 0xFFD0 --#define XK_F20 0xFFD1 --#define XK_L10 0xFFD1 --#define XK_F21 0xFFD2 --#define XK_R1 0xFFD2 --#define XK_F22 0xFFD3 --#define XK_R2 0xFFD3 --#define XK_F23 0xFFD4 --#define XK_R3 0xFFD4 --#define XK_F24 0xFFD5 --#define XK_R4 0xFFD5 --#define XK_F25 0xFFD6 --#define XK_R5 0xFFD6 --#define XK_F26 0xFFD7 --#define XK_R6 0xFFD7 --#define XK_F27 0xFFD8 --#define XK_R7 0xFFD8 --#define XK_F28 0xFFD9 --#define XK_R8 0xFFD9 --#define XK_F29 0xFFDA --#define XK_R9 0xFFDA --#define XK_F30 0xFFDB --#define XK_R10 0xFFDB --#define XK_F31 0xFFDC --#define XK_R11 0xFFDC --#define XK_F32 0xFFDD --#define XK_R12 0xFFDD --#define XK_F33 0xFFDE --#define XK_R13 0xFFDE --#define XK_F34 0xFFDF --#define XK_R14 0xFFDF --#define XK_F35 0xFFE0 --#define XK_R15 0xFFE0 -- --/* Modifiers */ -- --#define XK_Shift_L 0xFFE1 /* Left shift */ --#define XK_Shift_R 0xFFE2 /* Right shift */ --#define XK_Control_L 0xFFE3 /* Left control */ --#define XK_Control_R 0xFFE4 /* Right control */ --#define XK_Caps_Lock 0xFFE5 /* Caps lock */ --#define XK_Shift_Lock 0xFFE6 /* Shift lock */ -- --#define XK_Meta_L 0xFFE7 /* Left meta */ --#define XK_Meta_R 0xFFE8 /* Right meta */ --#define XK_Alt_L 0xFFE9 /* Left alt */ --#define XK_Alt_R 0xFFEA /* Right alt */ --#define XK_Super_L 0xFFEB /* Left super */ --#define XK_Super_R 0xFFEC /* Right super */ --#define XK_Hyper_L 0xFFED /* Left hyper */ --#define XK_Hyper_R 0xFFEE /* Right hyper */ --#endif /* XK_MISCELLANY */ -- --/* -- * ISO 9995 Function and Modifier Keys -- * Byte 3 = 0xFE -- */ -- --#ifdef XK_XKB_KEYS --#define XK_ISO_Lock 0xFE01 --#define XK_ISO_Level2_Latch 0xFE02 --#define XK_ISO_Level3_Shift 0xFE03 --#define XK_ISO_Level3_Latch 0xFE04 --#define XK_ISO_Level3_Lock 0xFE05 --#define XK_ISO_Group_Shift 0xFF7E /* Alias for mode_switch */ --#define XK_ISO_Group_Latch 0xFE06 --#define XK_ISO_Group_Lock 0xFE07 --#define XK_ISO_Next_Group 0xFE08 --#define XK_ISO_Next_Group_Lock 0xFE09 --#define XK_ISO_Prev_Group 0xFE0A --#define XK_ISO_Prev_Group_Lock 0xFE0B --#define XK_ISO_First_Group 0xFE0C --#define XK_ISO_First_Group_Lock 0xFE0D --#define XK_ISO_Last_Group 0xFE0E --#define XK_ISO_Last_Group_Lock 0xFE0F -- --#define XK_ISO_Left_Tab 0xFE20 --#define XK_ISO_Move_Line_Up 0xFE21 --#define XK_ISO_Move_Line_Down 0xFE22 --#define XK_ISO_Partial_Line_Up 0xFE23 --#define XK_ISO_Partial_Line_Down 0xFE24 --#define XK_ISO_Partial_Space_Left 0xFE25 --#define XK_ISO_Partial_Space_Right 0xFE26 --#define XK_ISO_Set_Margin_Left 0xFE27 --#define XK_ISO_Set_Margin_Right 0xFE28 --#define XK_ISO_Release_Margin_Left 0xFE29 --#define XK_ISO_Release_Margin_Right 0xFE2A --#define XK_ISO_Release_Both_Margins 0xFE2B --#define XK_ISO_Fast_Cursor_Left 0xFE2C --#define XK_ISO_Fast_Cursor_Right 0xFE2D --#define XK_ISO_Fast_Cursor_Up 0xFE2E --#define XK_ISO_Fast_Cursor_Down 0xFE2F --#define XK_ISO_Continuous_Underline 0xFE30 --#define XK_ISO_Discontinuous_Underline 0xFE31 --#define XK_ISO_Emphasize 0xFE32 --#define XK_ISO_Center_Object 0xFE33 --#define XK_ISO_Enter 0xFE34 -- --#define XK_dead_grave 0xFE50 --#define XK_dead_acute 0xFE51 --#define XK_dead_circumflex 0xFE52 --#define XK_dead_tilde 0xFE53 --#define XK_dead_macron 0xFE54 --#define XK_dead_breve 0xFE55 --#define XK_dead_abovedot 0xFE56 --#define XK_dead_diaeresis 0xFE57 --#define XK_dead_abovering 0xFE58 --#define XK_dead_doubleacute 0xFE59 --#define XK_dead_caron 0xFE5A --#define XK_dead_cedilla 0xFE5B --#define XK_dead_ogonek 0xFE5C --#define XK_dead_iota 0xFE5D --#define XK_dead_voiced_sound 0xFE5E --#define XK_dead_semivoiced_sound 0xFE5F --#define XK_dead_belowdot 0xFE60 -- --#define XK_First_Virtual_Screen 0xFED0 --#define XK_Prev_Virtual_Screen 0xFED1 --#define XK_Next_Virtual_Screen 0xFED2 --#define XK_Last_Virtual_Screen 0xFED4 --#define XK_Terminate_Server 0xFED5 -- --#define XK_AccessX_Enable 0xFE70 --#define XK_AccessX_Feedback_Enable 0xFE71 --#define XK_RepeatKeys_Enable 0xFE72 --#define XK_SlowKeys_Enable 0xFE73 --#define XK_BounceKeys_Enable 0xFE74 --#define XK_StickyKeys_Enable 0xFE75 --#define XK_MouseKeys_Enable 0xFE76 --#define XK_MouseKeys_Accel_Enable 0xFE77 --#define XK_Overlay1_Enable 0xFE78 --#define XK_Overlay2_Enable 0xFE79 --#define XK_AudibleBell_Enable 0xFE7A -- --#define XK_Pointer_Left 0xFEE0 --#define XK_Pointer_Right 0xFEE1 --#define XK_Pointer_Up 0xFEE2 --#define XK_Pointer_Down 0xFEE3 --#define XK_Pointer_UpLeft 0xFEE4 --#define XK_Pointer_UpRight 0xFEE5 --#define XK_Pointer_DownLeft 0xFEE6 --#define XK_Pointer_DownRight 0xFEE7 --#define XK_Pointer_Button_Dflt 0xFEE8 --#define XK_Pointer_Button1 0xFEE9 --#define XK_Pointer_Button2 0xFEEA --#define XK_Pointer_Button3 0xFEEB --#define XK_Pointer_Button4 0xFEEC --#define XK_Pointer_Button5 0xFEED --#define XK_Pointer_DblClick_Dflt 0xFEEE --#define XK_Pointer_DblClick1 0xFEEF --#define XK_Pointer_DblClick2 0xFEF0 --#define XK_Pointer_DblClick3 0xFEF1 --#define XK_Pointer_DblClick4 0xFEF2 --#define XK_Pointer_DblClick5 0xFEF3 --#define XK_Pointer_Drag_Dflt 0xFEF4 --#define XK_Pointer_Drag1 0xFEF5 --#define XK_Pointer_Drag2 0xFEF6 --#define XK_Pointer_Drag3 0xFEF7 --#define XK_Pointer_Drag4 0xFEF8 --#define XK_Pointer_Drag5 0xFEFD -- --#define XK_Pointer_EnableKeys 0xFEF9 --#define XK_Pointer_Accelerate 0xFEFA --#define XK_Pointer_DfltBtnNext 0xFEFB --#define XK_Pointer_DfltBtnPrev 0xFEFC -- --#endif -- --/* -- * 3270 Terminal Keys -- * Byte 3 = 0xFD -- */ -- --#ifdef XK_3270 --#define XK_3270_Duplicate 0xFD01 --#define XK_3270_FieldMark 0xFD02 --#define XK_3270_Right2 0xFD03 --#define XK_3270_Left2 0xFD04 --#define XK_3270_BackTab 0xFD05 --#define XK_3270_EraseEOF 0xFD06 --#define XK_3270_EraseInput 0xFD07 --#define XK_3270_Reset 0xFD08 --#define XK_3270_Quit 0xFD09 --#define XK_3270_PA1 0xFD0A --#define XK_3270_PA2 0xFD0B --#define XK_3270_PA3 0xFD0C --#define XK_3270_Test 0xFD0D --#define XK_3270_Attn 0xFD0E --#define XK_3270_CursorBlink 0xFD0F --#define XK_3270_AltCursor 0xFD10 --#define XK_3270_KeyClick 0xFD11 --#define XK_3270_Jump 0xFD12 --#define XK_3270_Ident 0xFD13 --#define XK_3270_Rule 0xFD14 --#define XK_3270_Copy 0xFD15 --#define XK_3270_Play 0xFD16 --#define XK_3270_Setup 0xFD17 --#define XK_3270_Record 0xFD18 --#define XK_3270_ChangeScreen 0xFD19 --#define XK_3270_DeleteWord 0xFD1A --#define XK_3270_ExSelect 0xFD1B --#define XK_3270_CursorSelect 0xFD1C --#define XK_3270_PrintScreen 0xFD1D --#define XK_3270_Enter 0xFD1E --#endif -- --/* -- * Latin 1 -- * Byte 3 = 0 -- */ --#ifdef XK_LATIN1 --#define XK_space 0x020 --#define XK_exclam 0x021 --#define XK_quotedbl 0x022 --#define XK_numbersign 0x023 --#define XK_dollar 0x024 --#define XK_percent 0x025 --#define XK_ampersand 0x026 --#define XK_apostrophe 0x027 --#define XK_quoteright 0x027 /* deprecated */ --#define XK_parenleft 0x028 --#define XK_parenright 0x029 --#define XK_asterisk 0x02a --#define XK_plus 0x02b --#define XK_comma 0x02c --#define XK_minus 0x02d --#define XK_period 0x02e --#define XK_slash 0x02f --#define XK_0 0x030 --#define XK_1 0x031 --#define XK_2 0x032 --#define XK_3 0x033 --#define XK_4 0x034 --#define XK_5 0x035 --#define XK_6 0x036 --#define XK_7 0x037 --#define XK_8 0x038 --#define XK_9 0x039 --#define XK_colon 0x03a --#define XK_semicolon 0x03b --#define XK_less 0x03c --#define XK_equal 0x03d --#define XK_greater 0x03e --#define XK_question 0x03f --#define XK_at 0x040 --#define XK_A 0x041 --#define XK_B 0x042 --#define XK_C 0x043 --#define XK_D 0x044 --#define XK_E 0x045 --#define XK_F 0x046 --#define XK_G 0x047 --#define XK_H 0x048 --#define XK_I 0x049 --#define XK_J 0x04a --#define XK_K 0x04b --#define XK_L 0x04c --#define XK_M 0x04d --#define XK_N 0x04e --#define XK_O 0x04f --#define XK_P 0x050 --#define XK_Q 0x051 --#define XK_R 0x052 --#define XK_S 0x053 --#define XK_T 0x054 --#define XK_U 0x055 --#define XK_V 0x056 --#define XK_W 0x057 --#define XK_X 0x058 --#define XK_Y 0x059 --#define XK_Z 0x05a --#define XK_bracketleft 0x05b --#define XK_backslash 0x05c --#define XK_bracketright 0x05d --#define XK_asciicircum 0x05e --#define XK_underscore 0x05f --#define XK_grave 0x060 --#define XK_quoteleft 0x060 /* deprecated */ --#define XK_a 0x061 --#define XK_b 0x062 --#define XK_c 0x063 --#define XK_d 0x064 --#define XK_e 0x065 --#define XK_f 0x066 --#define XK_g 0x067 --#define XK_h 0x068 --#define XK_i 0x069 --#define XK_j 0x06a --#define XK_k 0x06b --#define XK_l 0x06c --#define XK_m 0x06d --#define XK_n 0x06e --#define XK_o 0x06f --#define XK_p 0x070 --#define XK_q 0x071 --#define XK_r 0x072 --#define XK_s 0x073 --#define XK_t 0x074 --#define XK_u 0x075 --#define XK_v 0x076 --#define XK_w 0x077 --#define XK_x 0x078 --#define XK_y 0x079 --#define XK_z 0x07a --#define XK_braceleft 0x07b --#define XK_bar 0x07c --#define XK_braceright 0x07d --#define XK_asciitilde 0x07e -- --#define XK_nobreakspace 0x0a0 --#define XK_exclamdown 0x0a1 --#define XK_cent 0x0a2 --#define XK_sterling 0x0a3 --#define XK_currency 0x0a4 --#define XK_yen 0x0a5 --#define XK_brokenbar 0x0a6 --#define XK_section 0x0a7 --#define XK_diaeresis 0x0a8 --#define XK_copyright 0x0a9 --#define XK_ordfeminine 0x0aa --#define XK_guillemotleft 0x0ab /* left angle quotation mark */ --#define XK_notsign 0x0ac --#define XK_hyphen 0x0ad --#define XK_registered 0x0ae --#define XK_macron 0x0af --#define XK_degree 0x0b0 --#define XK_plusminus 0x0b1 --#define XK_twosuperior 0x0b2 --#define XK_threesuperior 0x0b3 --#define XK_acute 0x0b4 --#define XK_mu 0x0b5 --#define XK_paragraph 0x0b6 --#define XK_periodcentered 0x0b7 --#define XK_cedilla 0x0b8 --#define XK_onesuperior 0x0b9 --#define XK_masculine 0x0ba --#define XK_guillemotright 0x0bb /* right angle quotation mark */ --#define XK_onequarter 0x0bc --#define XK_onehalf 0x0bd --#define XK_threequarters 0x0be --#define XK_questiondown 0x0bf --#define XK_Agrave 0x0c0 --#define XK_Aacute 0x0c1 --#define XK_Acircumflex 0x0c2 --#define XK_Atilde 0x0c3 --#define XK_Adiaeresis 0x0c4 --#define XK_Aring 0x0c5 --#define XK_AE 0x0c6 --#define XK_Ccedilla 0x0c7 --#define XK_Egrave 0x0c8 --#define XK_Eacute 0x0c9 --#define XK_Ecircumflex 0x0ca --#define XK_Ediaeresis 0x0cb --#define XK_Igrave 0x0cc --#define XK_Iacute 0x0cd --#define XK_Icircumflex 0x0ce --#define XK_Idiaeresis 0x0cf --#define XK_ETH 0x0d0 --#define XK_Eth 0x0d0 /* deprecated */ --#define XK_Ntilde 0x0d1 --#define XK_Ograve 0x0d2 --#define XK_Oacute 0x0d3 --#define XK_Ocircumflex 0x0d4 --#define XK_Otilde 0x0d5 --#define XK_Odiaeresis 0x0d6 --#define XK_multiply 0x0d7 --#define XK_Ooblique 0x0d8 --#define XK_Ugrave 0x0d9 --#define XK_Uacute 0x0da --#define XK_Ucircumflex 0x0db --#define XK_Udiaeresis 0x0dc --#define XK_Yacute 0x0dd --#define XK_THORN 0x0de --#define XK_Thorn 0x0de /* deprecated */ --#define XK_ssharp 0x0df --#define XK_agrave 0x0e0 --#define XK_aacute 0x0e1 --#define XK_acircumflex 0x0e2 --#define XK_atilde 0x0e3 --#define XK_adiaeresis 0x0e4 --#define XK_aring 0x0e5 --#define XK_ae 0x0e6 --#define XK_ccedilla 0x0e7 --#define XK_egrave 0x0e8 --#define XK_eacute 0x0e9 --#define XK_ecircumflex 0x0ea --#define XK_ediaeresis 0x0eb --#define XK_igrave 0x0ec --#define XK_iacute 0x0ed --#define XK_icircumflex 0x0ee --#define XK_idiaeresis 0x0ef --#define XK_eth 0x0f0 --#define XK_ntilde 0x0f1 --#define XK_ograve 0x0f2 --#define XK_oacute 0x0f3 --#define XK_ocircumflex 0x0f4 --#define XK_otilde 0x0f5 --#define XK_odiaeresis 0x0f6 --#define XK_division 0x0f7 --#define XK_oslash 0x0f8 --#define XK_ugrave 0x0f9 --#define XK_uacute 0x0fa --#define XK_ucircumflex 0x0fb --#define XK_udiaeresis 0x0fc --#define XK_yacute 0x0fd --#define XK_thorn 0x0fe --#define XK_ydiaeresis 0x0ff --#endif /* XK_LATIN1 */ -- --/* -- * Latin 2 -- * Byte 3 = 1 -- */ -- --#ifdef XK_LATIN2 --#define XK_Aogonek 0x1a1 --#define XK_breve 0x1a2 --#define XK_Lstroke 0x1a3 --#define XK_Lcaron 0x1a5 --#define XK_Sacute 0x1a6 --#define XK_Scaron 0x1a9 --#define XK_Scedilla 0x1aa --#define XK_Tcaron 0x1ab --#define XK_Zacute 0x1ac --#define XK_Zcaron 0x1ae --#define XK_Zabovedot 0x1af --#define XK_aogonek 0x1b1 --#define XK_ogonek 0x1b2 --#define XK_lstroke 0x1b3 --#define XK_lcaron 0x1b5 --#define XK_sacute 0x1b6 --#define XK_caron 0x1b7 --#define XK_scaron 0x1b9 --#define XK_scedilla 0x1ba --#define XK_tcaron 0x1bb --#define XK_zacute 0x1bc --#define XK_doubleacute 0x1bd --#define XK_zcaron 0x1be --#define XK_zabovedot 0x1bf --#define XK_Racute 0x1c0 --#define XK_Abreve 0x1c3 --#define XK_Lacute 0x1c5 --#define XK_Cacute 0x1c6 --#define XK_Ccaron 0x1c8 --#define XK_Eogonek 0x1ca --#define XK_Ecaron 0x1cc --#define XK_Dcaron 0x1cf --#define XK_Dstroke 0x1d0 --#define XK_Nacute 0x1d1 --#define XK_Ncaron 0x1d2 --#define XK_Odoubleacute 0x1d5 --#define XK_Rcaron 0x1d8 --#define XK_Uring 0x1d9 --#define XK_Udoubleacute 0x1db --#define XK_Tcedilla 0x1de --#define XK_racute 0x1e0 --#define XK_abreve 0x1e3 --#define XK_lacute 0x1e5 --#define XK_cacute 0x1e6 --#define XK_ccaron 0x1e8 --#define XK_eogonek 0x1ea --#define XK_ecaron 0x1ec --#define XK_dcaron 0x1ef --#define XK_dstroke 0x1f0 --#define XK_nacute 0x1f1 --#define XK_ncaron 0x1f2 --#define XK_odoubleacute 0x1f5 --#define XK_udoubleacute 0x1fb --#define XK_rcaron 0x1f8 --#define XK_uring 0x1f9 --#define XK_tcedilla 0x1fe --#define XK_abovedot 0x1ff --#endif /* XK_LATIN2 */ -- --/* -- * Latin 3 -- * Byte 3 = 2 -- */ -- --#ifdef XK_LATIN3 --#define XK_Hstroke 0x2a1 --#define XK_Hcircumflex 0x2a6 --#define XK_Iabovedot 0x2a9 --#define XK_Gbreve 0x2ab --#define XK_Jcircumflex 0x2ac --#define XK_hstroke 0x2b1 --#define XK_hcircumflex 0x2b6 --#define XK_idotless 0x2b9 --#define XK_gbreve 0x2bb --#define XK_jcircumflex 0x2bc --#define XK_Cabovedot 0x2c5 --#define XK_Ccircumflex 0x2c6 --#define XK_Gabovedot 0x2d5 --#define XK_Gcircumflex 0x2d8 --#define XK_Ubreve 0x2dd --#define XK_Scircumflex 0x2de --#define XK_cabovedot 0x2e5 --#define XK_ccircumflex 0x2e6 --#define XK_gabovedot 0x2f5 --#define XK_gcircumflex 0x2f8 --#define XK_ubreve 0x2fd --#define XK_scircumflex 0x2fe --#endif /* XK_LATIN3 */ -- -- --/* -- * Latin 4 -- * Byte 3 = 3 -- */ -- --#ifdef XK_LATIN4 --#define XK_kra 0x3a2 --#define XK_kappa 0x3a2 /* deprecated */ --#define XK_Rcedilla 0x3a3 --#define XK_Itilde 0x3a5 --#define XK_Lcedilla 0x3a6 --#define XK_Emacron 0x3aa --#define XK_Gcedilla 0x3ab --#define XK_Tslash 0x3ac --#define XK_rcedilla 0x3b3 --#define XK_itilde 0x3b5 --#define XK_lcedilla 0x3b6 --#define XK_emacron 0x3ba --#define XK_gcedilla 0x3bb --#define XK_tslash 0x3bc --#define XK_ENG 0x3bd --#define XK_eng 0x3bf --#define XK_Amacron 0x3c0 --#define XK_Iogonek 0x3c7 --#define XK_Eabovedot 0x3cc --#define XK_Imacron 0x3cf --#define XK_Ncedilla 0x3d1 --#define XK_Omacron 0x3d2 --#define XK_Kcedilla 0x3d3 --#define XK_Uogonek 0x3d9 --#define XK_Utilde 0x3dd --#define XK_Umacron 0x3de --#define XK_amacron 0x3e0 --#define XK_iogonek 0x3e7 --#define XK_eabovedot 0x3ec --#define XK_imacron 0x3ef --#define XK_ncedilla 0x3f1 --#define XK_omacron 0x3f2 --#define XK_kcedilla 0x3f3 --#define XK_uogonek 0x3f9 --#define XK_utilde 0x3fd --#define XK_umacron 0x3fe --#endif /* XK_LATIN4 */ -- --/* -- * Katakana -- * Byte 3 = 4 -- */ -- --#ifdef XK_KATAKANA --#define XK_overline 0x47e --#define XK_kana_fullstop 0x4a1 --#define XK_kana_openingbracket 0x4a2 --#define XK_kana_closingbracket 0x4a3 --#define XK_kana_comma 0x4a4 --#define XK_kana_conjunctive 0x4a5 --#define XK_kana_middledot 0x4a5 /* deprecated */ --#define XK_kana_WO 0x4a6 --#define XK_kana_a 0x4a7 --#define XK_kana_i 0x4a8 --#define XK_kana_u 0x4a9 --#define XK_kana_e 0x4aa --#define XK_kana_o 0x4ab --#define XK_kana_ya 0x4ac --#define XK_kana_yu 0x4ad --#define XK_kana_yo 0x4ae --#define XK_kana_tsu 0x4af --#define XK_kana_tu 0x4af /* deprecated */ --#define XK_prolongedsound 0x4b0 --#define XK_kana_A 0x4b1 --#define XK_kana_I 0x4b2 --#define XK_kana_U 0x4b3 --#define XK_kana_E 0x4b4 --#define XK_kana_O 0x4b5 --#define XK_kana_KA 0x4b6 --#define XK_kana_KI 0x4b7 --#define XK_kana_KU 0x4b8 --#define XK_kana_KE 0x4b9 --#define XK_kana_KO 0x4ba --#define XK_kana_SA 0x4bb --#define XK_kana_SHI 0x4bc --#define XK_kana_SU 0x4bd --#define XK_kana_SE 0x4be --#define XK_kana_SO 0x4bf --#define XK_kana_TA 0x4c0 --#define XK_kana_CHI 0x4c1 --#define XK_kana_TI 0x4c1 /* deprecated */ --#define XK_kana_TSU 0x4c2 --#define XK_kana_TU 0x4c2 /* deprecated */ --#define XK_kana_TE 0x4c3 --#define XK_kana_TO 0x4c4 --#define XK_kana_NA 0x4c5 --#define XK_kana_NI 0x4c6 --#define XK_kana_NU 0x4c7 --#define XK_kana_NE 0x4c8 --#define XK_kana_NO 0x4c9 --#define XK_kana_HA 0x4ca --#define XK_kana_HI 0x4cb --#define XK_kana_FU 0x4cc --#define XK_kana_HU 0x4cc /* deprecated */ --#define XK_kana_HE 0x4cd --#define XK_kana_HO 0x4ce --#define XK_kana_MA 0x4cf --#define XK_kana_MI 0x4d0 --#define XK_kana_MU 0x4d1 --#define XK_kana_ME 0x4d2 --#define XK_kana_MO 0x4d3 --#define XK_kana_YA 0x4d4 --#define XK_kana_YU 0x4d5 --#define XK_kana_YO 0x4d6 --#define XK_kana_RA 0x4d7 --#define XK_kana_RI 0x4d8 --#define XK_kana_RU 0x4d9 --#define XK_kana_RE 0x4da --#define XK_kana_RO 0x4db --#define XK_kana_WA 0x4dc --#define XK_kana_N 0x4dd --#define XK_voicedsound 0x4de --#define XK_semivoicedsound 0x4df --#define XK_kana_switch 0xFF7E /* Alias for mode_switch */ --#endif /* XK_KATAKANA */ -- --/* -- * Arabic -- * Byte 3 = 5 -- */ -- --#ifdef XK_ARABIC --#define XK_Arabic_comma 0x5ac --#define XK_Arabic_semicolon 0x5bb --#define XK_Arabic_question_mark 0x5bf --#define XK_Arabic_hamza 0x5c1 --#define XK_Arabic_maddaonalef 0x5c2 --#define XK_Arabic_hamzaonalef 0x5c3 --#define XK_Arabic_hamzaonwaw 0x5c4 --#define XK_Arabic_hamzaunderalef 0x5c5 --#define XK_Arabic_hamzaonyeh 0x5c6 --#define XK_Arabic_alef 0x5c7 --#define XK_Arabic_beh 0x5c8 --#define XK_Arabic_tehmarbuta 0x5c9 --#define XK_Arabic_teh 0x5ca --#define XK_Arabic_theh 0x5cb --#define XK_Arabic_jeem 0x5cc --#define XK_Arabic_hah 0x5cd --#define XK_Arabic_khah 0x5ce --#define XK_Arabic_dal 0x5cf --#define XK_Arabic_thal 0x5d0 --#define XK_Arabic_ra 0x5d1 --#define XK_Arabic_zain 0x5d2 --#define XK_Arabic_seen 0x5d3 --#define XK_Arabic_sheen 0x5d4 --#define XK_Arabic_sad 0x5d5 --#define XK_Arabic_dad 0x5d6 --#define XK_Arabic_tah 0x5d7 --#define XK_Arabic_zah 0x5d8 --#define XK_Arabic_ain 0x5d9 --#define XK_Arabic_ghain 0x5da --#define XK_Arabic_tatweel 0x5e0 --#define XK_Arabic_feh 0x5e1 --#define XK_Arabic_qaf 0x5e2 --#define XK_Arabic_kaf 0x5e3 --#define XK_Arabic_lam 0x5e4 --#define XK_Arabic_meem 0x5e5 --#define XK_Arabic_noon 0x5e6 --#define XK_Arabic_ha 0x5e7 --#define XK_Arabic_heh 0x5e7 /* deprecated */ --#define XK_Arabic_waw 0x5e8 --#define XK_Arabic_alefmaksura 0x5e9 --#define XK_Arabic_yeh 0x5ea --#define XK_Arabic_fathatan 0x5eb --#define XK_Arabic_dammatan 0x5ec --#define XK_Arabic_kasratan 0x5ed --#define XK_Arabic_fatha 0x5ee --#define XK_Arabic_damma 0x5ef --#define XK_Arabic_kasra 0x5f0 --#define XK_Arabic_shadda 0x5f1 --#define XK_Arabic_sukun 0x5f2 --#define XK_Arabic_switch 0xFF7E /* Alias for mode_switch */ --#endif /* XK_ARABIC */ -- --/* -- * Cyrillic -- * Byte 3 = 6 -- */ --#ifdef XK_CYRILLIC --#define XK_Serbian_dje 0x6a1 --#define XK_Macedonia_gje 0x6a2 --#define XK_Cyrillic_io 0x6a3 --#define XK_Ukrainian_ie 0x6a4 --#define XK_Ukranian_je 0x6a4 /* deprecated */ --#define XK_Macedonia_dse 0x6a5 --#define XK_Ukrainian_i 0x6a6 --#define XK_Ukranian_i 0x6a6 /* deprecated */ --#define XK_Ukrainian_yi 0x6a7 --#define XK_Ukranian_yi 0x6a7 /* deprecated */ --#define XK_Cyrillic_je 0x6a8 --#define XK_Serbian_je 0x6a8 /* deprecated */ --#define XK_Cyrillic_lje 0x6a9 --#define XK_Serbian_lje 0x6a9 /* deprecated */ --#define XK_Cyrillic_nje 0x6aa --#define XK_Serbian_nje 0x6aa /* deprecated */ --#define XK_Serbian_tshe 0x6ab --#define XK_Macedonia_kje 0x6ac --#define XK_Byelorussian_shortu 0x6ae --#define XK_Cyrillic_dzhe 0x6af --#define XK_Serbian_dze 0x6af /* deprecated */ --#define XK_numerosign 0x6b0 --#define XK_Serbian_DJE 0x6b1 --#define XK_Macedonia_GJE 0x6b2 --#define XK_Cyrillic_IO 0x6b3 --#define XK_Ukrainian_IE 0x6b4 --#define XK_Ukranian_JE 0x6b4 /* deprecated */ --#define XK_Macedonia_DSE 0x6b5 --#define XK_Ukrainian_I 0x6b6 --#define XK_Ukranian_I 0x6b6 /* deprecated */ --#define XK_Ukrainian_YI 0x6b7 --#define XK_Ukranian_YI 0x6b7 /* deprecated */ --#define XK_Cyrillic_JE 0x6b8 --#define XK_Serbian_JE 0x6b8 /* deprecated */ --#define XK_Cyrillic_LJE 0x6b9 --#define XK_Serbian_LJE 0x6b9 /* deprecated */ --#define XK_Cyrillic_NJE 0x6ba --#define XK_Serbian_NJE 0x6ba /* deprecated */ --#define XK_Serbian_TSHE 0x6bb --#define XK_Macedonia_KJE 0x6bc --#define XK_Byelorussian_SHORTU 0x6be --#define XK_Cyrillic_DZHE 0x6bf --#define XK_Serbian_DZE 0x6bf /* deprecated */ --#define XK_Cyrillic_yu 0x6c0 --#define XK_Cyrillic_a 0x6c1 --#define XK_Cyrillic_be 0x6c2 --#define XK_Cyrillic_tse 0x6c3 --#define XK_Cyrillic_de 0x6c4 --#define XK_Cyrillic_ie 0x6c5 --#define XK_Cyrillic_ef 0x6c6 --#define XK_Cyrillic_ghe 0x6c7 --#define XK_Cyrillic_ha 0x6c8 --#define XK_Cyrillic_i 0x6c9 --#define XK_Cyrillic_shorti 0x6ca --#define XK_Cyrillic_ka 0x6cb --#define XK_Cyrillic_el 0x6cc --#define XK_Cyrillic_em 0x6cd --#define XK_Cyrillic_en 0x6ce --#define XK_Cyrillic_o 0x6cf --#define XK_Cyrillic_pe 0x6d0 --#define XK_Cyrillic_ya 0x6d1 --#define XK_Cyrillic_er 0x6d2 --#define XK_Cyrillic_es 0x6d3 --#define XK_Cyrillic_te 0x6d4 --#define XK_Cyrillic_u 0x6d5 --#define XK_Cyrillic_zhe 0x6d6 --#define XK_Cyrillic_ve 0x6d7 --#define XK_Cyrillic_softsign 0x6d8 --#define XK_Cyrillic_yeru 0x6d9 --#define XK_Cyrillic_ze 0x6da --#define XK_Cyrillic_sha 0x6db --#define XK_Cyrillic_e 0x6dc --#define XK_Cyrillic_shcha 0x6dd --#define XK_Cyrillic_che 0x6de --#define XK_Cyrillic_hardsign 0x6df --#define XK_Cyrillic_YU 0x6e0 --#define XK_Cyrillic_A 0x6e1 --#define XK_Cyrillic_BE 0x6e2 --#define XK_Cyrillic_TSE 0x6e3 --#define XK_Cyrillic_DE 0x6e4 --#define XK_Cyrillic_IE 0x6e5 --#define XK_Cyrillic_EF 0x6e6 --#define XK_Cyrillic_GHE 0x6e7 --#define XK_Cyrillic_HA 0x6e8 --#define XK_Cyrillic_I 0x6e9 --#define XK_Cyrillic_SHORTI 0x6ea --#define XK_Cyrillic_KA 0x6eb --#define XK_Cyrillic_EL 0x6ec --#define XK_Cyrillic_EM 0x6ed --#define XK_Cyrillic_EN 0x6ee --#define XK_Cyrillic_O 0x6ef --#define XK_Cyrillic_PE 0x6f0 --#define XK_Cyrillic_YA 0x6f1 --#define XK_Cyrillic_ER 0x6f2 --#define XK_Cyrillic_ES 0x6f3 --#define XK_Cyrillic_TE 0x6f4 --#define XK_Cyrillic_U 0x6f5 --#define XK_Cyrillic_ZHE 0x6f6 --#define XK_Cyrillic_VE 0x6f7 --#define XK_Cyrillic_SOFTSIGN 0x6f8 --#define XK_Cyrillic_YERU 0x6f9 --#define XK_Cyrillic_ZE 0x6fa --#define XK_Cyrillic_SHA 0x6fb --#define XK_Cyrillic_E 0x6fc --#define XK_Cyrillic_SHCHA 0x6fd --#define XK_Cyrillic_CHE 0x6fe --#define XK_Cyrillic_HARDSIGN 0x6ff --#endif /* XK_CYRILLIC */ -- --/* -- * Greek -- * Byte 3 = 7 -- */ -- --#ifdef XK_GREEK --#define XK_Greek_ALPHAaccent 0x7a1 --#define XK_Greek_EPSILONaccent 0x7a2 --#define XK_Greek_ETAaccent 0x7a3 --#define XK_Greek_IOTAaccent 0x7a4 --#define XK_Greek_IOTAdieresis 0x7a5 --#define XK_Greek_OMICRONaccent 0x7a7 --#define XK_Greek_UPSILONaccent 0x7a8 --#define XK_Greek_UPSILONdieresis 0x7a9 --#define XK_Greek_OMEGAaccent 0x7ab --#define XK_Greek_accentdieresis 0x7ae --#define XK_Greek_horizbar 0x7af --#define XK_Greek_alphaaccent 0x7b1 --#define XK_Greek_epsilonaccent 0x7b2 --#define XK_Greek_etaaccent 0x7b3 --#define XK_Greek_iotaaccent 0x7b4 --#define XK_Greek_iotadieresis 0x7b5 --#define XK_Greek_iotaaccentdieresis 0x7b6 --#define XK_Greek_omicronaccent 0x7b7 --#define XK_Greek_upsilonaccent 0x7b8 --#define XK_Greek_upsilondieresis 0x7b9 --#define XK_Greek_upsilonaccentdieresis 0x7ba --#define XK_Greek_omegaaccent 0x7bb --#define XK_Greek_ALPHA 0x7c1 --#define XK_Greek_BETA 0x7c2 --#define XK_Greek_GAMMA 0x7c3 --#define XK_Greek_DELTA 0x7c4 --#define XK_Greek_EPSILON 0x7c5 --#define XK_Greek_ZETA 0x7c6 --#define XK_Greek_ETA 0x7c7 --#define XK_Greek_THETA 0x7c8 --#define XK_Greek_IOTA 0x7c9 --#define XK_Greek_KAPPA 0x7ca --#define XK_Greek_LAMDA 0x7cb --#define XK_Greek_LAMBDA 0x7cb --#define XK_Greek_MU 0x7cc --#define XK_Greek_NU 0x7cd --#define XK_Greek_XI 0x7ce --#define XK_Greek_OMICRON 0x7cf --#define XK_Greek_PI 0x7d0 --#define XK_Greek_RHO 0x7d1 --#define XK_Greek_SIGMA 0x7d2 --#define XK_Greek_TAU 0x7d4 --#define XK_Greek_UPSILON 0x7d5 --#define XK_Greek_PHI 0x7d6 --#define XK_Greek_CHI 0x7d7 --#define XK_Greek_PSI 0x7d8 --#define XK_Greek_OMEGA 0x7d9 --#define XK_Greek_alpha 0x7e1 --#define XK_Greek_beta 0x7e2 --#define XK_Greek_gamma 0x7e3 --#define XK_Greek_delta 0x7e4 --#define XK_Greek_epsilon 0x7e5 --#define XK_Greek_zeta 0x7e6 --#define XK_Greek_eta 0x7e7 --#define XK_Greek_theta 0x7e8 --#define XK_Greek_iota 0x7e9 --#define XK_Greek_kappa 0x7ea --#define XK_Greek_lamda 0x7eb --#define XK_Greek_lambda 0x7eb --#define XK_Greek_mu 0x7ec --#define XK_Greek_nu 0x7ed --#define XK_Greek_xi 0x7ee --#define XK_Greek_omicron 0x7ef --#define XK_Greek_pi 0x7f0 --#define XK_Greek_rho 0x7f1 --#define XK_Greek_sigma 0x7f2 --#define XK_Greek_finalsmallsigma 0x7f3 --#define XK_Greek_tau 0x7f4 --#define XK_Greek_upsilon 0x7f5 --#define XK_Greek_phi 0x7f6 --#define XK_Greek_chi 0x7f7 --#define XK_Greek_psi 0x7f8 --#define XK_Greek_omega 0x7f9 --#define XK_Greek_switch 0xFF7E /* Alias for mode_switch */ --#endif /* XK_GREEK */ -- --/* -- * Technical -- * Byte 3 = 8 -- */ -- --#ifdef XK_TECHNICAL --#define XK_leftradical 0x8a1 --#define XK_topleftradical 0x8a2 --#define XK_horizconnector 0x8a3 --#define XK_topintegral 0x8a4 --#define XK_botintegral 0x8a5 --#define XK_vertconnector 0x8a6 --#define XK_topleftsqbracket 0x8a7 --#define XK_botleftsqbracket 0x8a8 --#define XK_toprightsqbracket 0x8a9 --#define XK_botrightsqbracket 0x8aa --#define XK_topleftparens 0x8ab --#define XK_botleftparens 0x8ac --#define XK_toprightparens 0x8ad --#define XK_botrightparens 0x8ae --#define XK_leftmiddlecurlybrace 0x8af --#define XK_rightmiddlecurlybrace 0x8b0 --#define XK_topleftsummation 0x8b1 --#define XK_botleftsummation 0x8b2 --#define XK_topvertsummationconnector 0x8b3 --#define XK_botvertsummationconnector 0x8b4 --#define XK_toprightsummation 0x8b5 --#define XK_botrightsummation 0x8b6 --#define XK_rightmiddlesummation 0x8b7 --#define XK_lessthanequal 0x8bc --#define XK_notequal 0x8bd --#define XK_greaterthanequal 0x8be --#define XK_integral 0x8bf --#define XK_therefore 0x8c0 --#define XK_variation 0x8c1 --#define XK_infinity 0x8c2 --#define XK_nabla 0x8c5 --#define XK_approximate 0x8c8 --#define XK_similarequal 0x8c9 --#define XK_ifonlyif 0x8cd --#define XK_implies 0x8ce --#define XK_identical 0x8cf --#define XK_radical 0x8d6 --#define XK_includedin 0x8da --#define XK_includes 0x8db --#define XK_intersection 0x8dc --#define XK_union 0x8dd --#define XK_logicaland 0x8de --#define XK_logicalor 0x8df --#define XK_partialderivative 0x8ef --#define XK_function 0x8f6 --#define XK_leftarrow 0x8fb --#define XK_uparrow 0x8fc --#define XK_rightarrow 0x8fd --#define XK_downarrow 0x8fe --#endif /* XK_TECHNICAL */ -- --/* -- * Special -- * Byte 3 = 9 -- */ -- --#ifdef XK_SPECIAL --#define XK_blank 0x9df --#define XK_soliddiamond 0x9e0 --#define XK_checkerboard 0x9e1 --#define XK_ht 0x9e2 --#define XK_ff 0x9e3 --#define XK_cr 0x9e4 --#define XK_lf 0x9e5 --#define XK_nl 0x9e8 --#define XK_vt 0x9e9 --#define XK_lowrightcorner 0x9ea --#define XK_uprightcorner 0x9eb --#define XK_upleftcorner 0x9ec --#define XK_lowleftcorner 0x9ed --#define XK_crossinglines 0x9ee --#define XK_horizlinescan1 0x9ef --#define XK_horizlinescan3 0x9f0 --#define XK_horizlinescan5 0x9f1 --#define XK_horizlinescan7 0x9f2 --#define XK_horizlinescan9 0x9f3 --#define XK_leftt 0x9f4 --#define XK_rightt 0x9f5 --#define XK_bott 0x9f6 --#define XK_topt 0x9f7 --#define XK_vertbar 0x9f8 --#endif /* XK_SPECIAL */ -- --/* -- * Publishing -- * Byte 3 = a -- */ -- --#ifdef XK_PUBLISHING --#define XK_emspace 0xaa1 --#define XK_enspace 0xaa2 --#define XK_em3space 0xaa3 --#define XK_em4space 0xaa4 --#define XK_digitspace 0xaa5 --#define XK_punctspace 0xaa6 --#define XK_thinspace 0xaa7 --#define XK_hairspace 0xaa8 --#define XK_emdash 0xaa9 --#define XK_endash 0xaaa --#define XK_signifblank 0xaac --#define XK_ellipsis 0xaae --#define XK_doubbaselinedot 0xaaf --#define XK_onethird 0xab0 --#define XK_twothirds 0xab1 --#define XK_onefifth 0xab2 --#define XK_twofifths 0xab3 --#define XK_threefifths 0xab4 --#define XK_fourfifths 0xab5 --#define XK_onesixth 0xab6 --#define XK_fivesixths 0xab7 --#define XK_careof 0xab8 --#define XK_figdash 0xabb --#define XK_leftanglebracket 0xabc --#define XK_decimalpoint 0xabd --#define XK_rightanglebracket 0xabe --#define XK_marker 0xabf --#define XK_oneeighth 0xac3 --#define XK_threeeighths 0xac4 --#define XK_fiveeighths 0xac5 --#define XK_seveneighths 0xac6 --#define XK_trademark 0xac9 --#define XK_signaturemark 0xaca --#define XK_trademarkincircle 0xacb --#define XK_leftopentriangle 0xacc --#define XK_rightopentriangle 0xacd --#define XK_emopencircle 0xace --#define XK_emopenrectangle 0xacf --#define XK_leftsinglequotemark 0xad0 --#define XK_rightsinglequotemark 0xad1 --#define XK_leftdoublequotemark 0xad2 --#define XK_rightdoublequotemark 0xad3 --#define XK_prescription 0xad4 --#define XK_minutes 0xad6 --#define XK_seconds 0xad7 --#define XK_latincross 0xad9 --#define XK_hexagram 0xada --#define XK_filledrectbullet 0xadb --#define XK_filledlefttribullet 0xadc --#define XK_filledrighttribullet 0xadd --#define XK_emfilledcircle 0xade --#define XK_emfilledrect 0xadf --#define XK_enopencircbullet 0xae0 --#define XK_enopensquarebullet 0xae1 --#define XK_openrectbullet 0xae2 --#define XK_opentribulletup 0xae3 --#define XK_opentribulletdown 0xae4 --#define XK_openstar 0xae5 --#define XK_enfilledcircbullet 0xae6 --#define XK_enfilledsqbullet 0xae7 --#define XK_filledtribulletup 0xae8 --#define XK_filledtribulletdown 0xae9 --#define XK_leftpointer 0xaea --#define XK_rightpointer 0xaeb --#define XK_club 0xaec --#define XK_diamond 0xaed --#define XK_heart 0xaee --#define XK_maltesecross 0xaf0 --#define XK_dagger 0xaf1 --#define XK_doubledagger 0xaf2 --#define XK_checkmark 0xaf3 --#define XK_ballotcross 0xaf4 --#define XK_musicalsharp 0xaf5 --#define XK_musicalflat 0xaf6 --#define XK_malesymbol 0xaf7 --#define XK_femalesymbol 0xaf8 --#define XK_telephone 0xaf9 --#define XK_telephonerecorder 0xafa --#define XK_phonographcopyright 0xafb --#define XK_caret 0xafc --#define XK_singlelowquotemark 0xafd --#define XK_doublelowquotemark 0xafe --#define XK_cursor 0xaff --#endif /* XK_PUBLISHING */ -- --/* -- * APL -- * Byte 3 = b -- */ -- --#ifdef XK_APL --#define XK_leftcaret 0xba3 --#define XK_rightcaret 0xba6 --#define XK_downcaret 0xba8 --#define XK_upcaret 0xba9 --#define XK_overbar 0xbc0 --#define XK_downtack 0xbc2 --#define XK_upshoe 0xbc3 --#define XK_downstile 0xbc4 --#define XK_underbar 0xbc6 --#define XK_jot 0xbca --#define XK_quad 0xbcc --#define XK_uptack 0xbce --#define XK_circle 0xbcf --#define XK_upstile 0xbd3 --#define XK_downshoe 0xbd6 --#define XK_rightshoe 0xbd8 --#define XK_leftshoe 0xbda --#define XK_lefttack 0xbdc --#define XK_righttack 0xbfc --#endif /* XK_APL */ -- --/* -- * Hebrew -- * Byte 3 = c -- */ -- --#ifdef XK_HEBREW --#define XK_hebrew_doublelowline 0xcdf --#define XK_hebrew_aleph 0xce0 --#define XK_hebrew_bet 0xce1 --#define XK_hebrew_beth 0xce1 /* deprecated */ --#define XK_hebrew_gimel 0xce2 --#define XK_hebrew_gimmel 0xce2 /* deprecated */ --#define XK_hebrew_dalet 0xce3 --#define XK_hebrew_daleth 0xce3 /* deprecated */ --#define XK_hebrew_he 0xce4 --#define XK_hebrew_waw 0xce5 --#define XK_hebrew_zain 0xce6 --#define XK_hebrew_zayin 0xce6 /* deprecated */ --#define XK_hebrew_chet 0xce7 --#define XK_hebrew_het 0xce7 /* deprecated */ --#define XK_hebrew_tet 0xce8 --#define XK_hebrew_teth 0xce8 /* deprecated */ --#define XK_hebrew_yod 0xce9 --#define XK_hebrew_finalkaph 0xcea --#define XK_hebrew_kaph 0xceb --#define XK_hebrew_lamed 0xcec --#define XK_hebrew_finalmem 0xced --#define XK_hebrew_mem 0xcee --#define XK_hebrew_finalnun 0xcef --#define XK_hebrew_nun 0xcf0 --#define XK_hebrew_samech 0xcf1 --#define XK_hebrew_samekh 0xcf1 /* deprecated */ --#define XK_hebrew_ayin 0xcf2 --#define XK_hebrew_finalpe 0xcf3 --#define XK_hebrew_pe 0xcf4 --#define XK_hebrew_finalzade 0xcf5 --#define XK_hebrew_finalzadi 0xcf5 /* deprecated */ --#define XK_hebrew_zade 0xcf6 --#define XK_hebrew_zadi 0xcf6 /* deprecated */ --#define XK_hebrew_qoph 0xcf7 --#define XK_hebrew_kuf 0xcf7 /* deprecated */ --#define XK_hebrew_resh 0xcf8 --#define XK_hebrew_shin 0xcf9 --#define XK_hebrew_taw 0xcfa --#define XK_hebrew_taf 0xcfa /* deprecated */ --#define XK_Hebrew_switch 0xFF7E /* Alias for mode_switch */ --#endif /* XK_HEBREW */ -- --/* -- * Thai -- * Byte 3 = d -- */ -- --#ifdef XK_THAI --#define XK_Thai_kokai 0xda1 --#define XK_Thai_khokhai 0xda2 --#define XK_Thai_khokhuat 0xda3 --#define XK_Thai_khokhwai 0xda4 --#define XK_Thai_khokhon 0xda5 --#define XK_Thai_khorakhang 0xda6 --#define XK_Thai_ngongu 0xda7 --#define XK_Thai_chochan 0xda8 --#define XK_Thai_choching 0xda9 --#define XK_Thai_chochang 0xdaa --#define XK_Thai_soso 0xdab --#define XK_Thai_chochoe 0xdac --#define XK_Thai_yoying 0xdad --#define XK_Thai_dochada 0xdae --#define XK_Thai_topatak 0xdaf --#define XK_Thai_thothan 0xdb0 --#define XK_Thai_thonangmontho 0xdb1 --#define XK_Thai_thophuthao 0xdb2 --#define XK_Thai_nonen 0xdb3 --#define XK_Thai_dodek 0xdb4 --#define XK_Thai_totao 0xdb5 --#define XK_Thai_thothung 0xdb6 --#define XK_Thai_thothahan 0xdb7 --#define XK_Thai_thothong 0xdb8 --#define XK_Thai_nonu 0xdb9 --#define XK_Thai_bobaimai 0xdba --#define XK_Thai_popla 0xdbb --#define XK_Thai_phophung 0xdbc --#define XK_Thai_fofa 0xdbd --#define XK_Thai_phophan 0xdbe --#define XK_Thai_fofan 0xdbf --#define XK_Thai_phosamphao 0xdc0 --#define XK_Thai_moma 0xdc1 --#define XK_Thai_yoyak 0xdc2 --#define XK_Thai_rorua 0xdc3 --#define XK_Thai_ru 0xdc4 --#define XK_Thai_loling 0xdc5 --#define XK_Thai_lu 0xdc6 --#define XK_Thai_wowaen 0xdc7 --#define XK_Thai_sosala 0xdc8 --#define XK_Thai_sorusi 0xdc9 --#define XK_Thai_sosua 0xdca --#define XK_Thai_hohip 0xdcb --#define XK_Thai_lochula 0xdcc --#define XK_Thai_oang 0xdcd --#define XK_Thai_honokhuk 0xdce --#define XK_Thai_paiyannoi 0xdcf --#define XK_Thai_saraa 0xdd0 --#define XK_Thai_maihanakat 0xdd1 --#define XK_Thai_saraaa 0xdd2 --#define XK_Thai_saraam 0xdd3 --#define XK_Thai_sarai 0xdd4 --#define XK_Thai_saraii 0xdd5 --#define XK_Thai_saraue 0xdd6 --#define XK_Thai_sarauee 0xdd7 --#define XK_Thai_sarau 0xdd8 --#define XK_Thai_sarauu 0xdd9 --#define XK_Thai_phinthu 0xdda --#define XK_Thai_maihanakat_maitho 0xdde --#define XK_Thai_baht 0xddf --#define XK_Thai_sarae 0xde0 --#define XK_Thai_saraae 0xde1 --#define XK_Thai_sarao 0xde2 --#define XK_Thai_saraaimaimuan 0xde3 --#define XK_Thai_saraaimaimalai 0xde4 --#define XK_Thai_lakkhangyao 0xde5 --#define XK_Thai_maiyamok 0xde6 --#define XK_Thai_maitaikhu 0xde7 --#define XK_Thai_maiek 0xde8 --#define XK_Thai_maitho 0xde9 --#define XK_Thai_maitri 0xdea --#define XK_Thai_maichattawa 0xdeb --#define XK_Thai_thanthakhat 0xdec --#define XK_Thai_nikhahit 0xded --#define XK_Thai_leksun 0xdf0 --#define XK_Thai_leknung 0xdf1 --#define XK_Thai_leksong 0xdf2 --#define XK_Thai_leksam 0xdf3 --#define XK_Thai_leksi 0xdf4 --#define XK_Thai_lekha 0xdf5 --#define XK_Thai_lekhok 0xdf6 --#define XK_Thai_lekchet 0xdf7 --#define XK_Thai_lekpaet 0xdf8 --#define XK_Thai_lekkao 0xdf9 --#endif /* XK_THAI */ -- --/* -- * Korean -- * Byte 3 = e -- */ -- --#ifdef XK_KOREAN -- --#define XK_Hangul 0xff31 /* Hangul start/stop(toggle) */ --#define XK_Hangul_Start 0xff32 /* Hangul start */ --#define XK_Hangul_End 0xff33 /* Hangul end, English start */ --#define XK_Hangul_Hanja 0xff34 /* Start Hangul->Hanja Conversion */ --#define XK_Hangul_Jamo 0xff35 /* Hangul Jamo mode */ --#define XK_Hangul_Romaja 0xff36 /* Hangul Romaja mode */ --#define XK_Hangul_Codeinput 0xff37 /* Hangul code input mode */ --#define XK_Hangul_Jeonja 0xff38 /* Jeonja mode */ --#define XK_Hangul_Banja 0xff39 /* Banja mode */ --#define XK_Hangul_PreHanja 0xff3a /* Pre Hanja conversion */ --#define XK_Hangul_PostHanja 0xff3b /* Post Hanja conversion */ --#define XK_Hangul_SingleCandidate 0xff3c /* Single candidate */ --#define XK_Hangul_MultipleCandidate 0xff3d /* Multiple candidate */ --#define XK_Hangul_PreviousCandidate 0xff3e /* Previous candidate */ --#define XK_Hangul_Special 0xff3f /* Special symbols */ --#define XK_Hangul_switch 0xFF7E /* Alias for mode_switch */ -- --/* Hangul Consonant Characters */ --#define XK_Hangul_Kiyeog 0xea1 --#define XK_Hangul_SsangKiyeog 0xea2 --#define XK_Hangul_KiyeogSios 0xea3 --#define XK_Hangul_Nieun 0xea4 --#define XK_Hangul_NieunJieuj 0xea5 --#define XK_Hangul_NieunHieuh 0xea6 --#define XK_Hangul_Dikeud 0xea7 --#define XK_Hangul_SsangDikeud 0xea8 --#define XK_Hangul_Rieul 0xea9 --#define XK_Hangul_RieulKiyeog 0xeaa --#define XK_Hangul_RieulMieum 0xeab --#define XK_Hangul_RieulPieub 0xeac --#define XK_Hangul_RieulSios 0xead --#define XK_Hangul_RieulTieut 0xeae --#define XK_Hangul_RieulPhieuf 0xeaf --#define XK_Hangul_RieulHieuh 0xeb0 --#define XK_Hangul_Mieum 0xeb1 --#define XK_Hangul_Pieub 0xeb2 --#define XK_Hangul_SsangPieub 0xeb3 --#define XK_Hangul_PieubSios 0xeb4 --#define XK_Hangul_Sios 0xeb5 --#define XK_Hangul_SsangSios 0xeb6 --#define XK_Hangul_Ieung 0xeb7 --#define XK_Hangul_Jieuj 0xeb8 --#define XK_Hangul_SsangJieuj 0xeb9 --#define XK_Hangul_Cieuc 0xeba --#define XK_Hangul_Khieuq 0xebb --#define XK_Hangul_Tieut 0xebc --#define XK_Hangul_Phieuf 0xebd --#define XK_Hangul_Hieuh 0xebe -- --/* Hangul Vowel Characters */ --#define XK_Hangul_A 0xebf --#define XK_Hangul_AE 0xec0 --#define XK_Hangul_YA 0xec1 --#define XK_Hangul_YAE 0xec2 --#define XK_Hangul_EO 0xec3 --#define XK_Hangul_E 0xec4 --#define XK_Hangul_YEO 0xec5 --#define XK_Hangul_YE 0xec6 --#define XK_Hangul_O 0xec7 --#define XK_Hangul_WA 0xec8 --#define XK_Hangul_WAE 0xec9 --#define XK_Hangul_OE 0xeca --#define XK_Hangul_YO 0xecb --#define XK_Hangul_U 0xecc --#define XK_Hangul_WEO 0xecd --#define XK_Hangul_WE 0xece --#define XK_Hangul_WI 0xecf --#define XK_Hangul_YU 0xed0 --#define XK_Hangul_EU 0xed1 --#define XK_Hangul_YI 0xed2 --#define XK_Hangul_I 0xed3 -- --/* Hangul syllable-final (JongSeong) Characters */ --#define XK_Hangul_J_Kiyeog 0xed4 --#define XK_Hangul_J_SsangKiyeog 0xed5 --#define XK_Hangul_J_KiyeogSios 0xed6 --#define XK_Hangul_J_Nieun 0xed7 --#define XK_Hangul_J_NieunJieuj 0xed8 --#define XK_Hangul_J_NieunHieuh 0xed9 --#define XK_Hangul_J_Dikeud 0xeda --#define XK_Hangul_J_Rieul 0xedb --#define XK_Hangul_J_RieulKiyeog 0xedc --#define XK_Hangul_J_RieulMieum 0xedd --#define XK_Hangul_J_RieulPieub 0xede --#define XK_Hangul_J_RieulSios 0xedf --#define XK_Hangul_J_RieulTieut 0xee0 --#define XK_Hangul_J_RieulPhieuf 0xee1 --#define XK_Hangul_J_RieulHieuh 0xee2 --#define XK_Hangul_J_Mieum 0xee3 --#define XK_Hangul_J_Pieub 0xee4 --#define XK_Hangul_J_PieubSios 0xee5 --#define XK_Hangul_J_Sios 0xee6 --#define XK_Hangul_J_SsangSios 0xee7 --#define XK_Hangul_J_Ieung 0xee8 --#define XK_Hangul_J_Jieuj 0xee9 --#define XK_Hangul_J_Cieuc 0xeea --#define XK_Hangul_J_Khieuq 0xeeb --#define XK_Hangul_J_Tieut 0xeec --#define XK_Hangul_J_Phieuf 0xeed --#define XK_Hangul_J_Hieuh 0xeee -- --/* Ancient Hangul Consonant Characters */ --#define XK_Hangul_RieulYeorinHieuh 0xeef --#define XK_Hangul_SunkyeongeumMieum 0xef0 --#define XK_Hangul_SunkyeongeumPieub 0xef1 --#define XK_Hangul_PanSios 0xef2 --#define XK_Hangul_KkogjiDalrinIeung 0xef3 --#define XK_Hangul_SunkyeongeumPhieuf 0xef4 --#define XK_Hangul_YeorinHieuh 0xef5 -- --/* Ancient Hangul Vowel Characters */ --#define XK_Hangul_AraeA 0xef6 --#define XK_Hangul_AraeAE 0xef7 -- --/* Ancient Hangul syllable-final (JongSeong) Characters */ --#define XK_Hangul_J_PanSios 0xef8 --#define XK_Hangul_J_KkogjiDalrinIeung 0xef9 --#define XK_Hangul_J_YeorinHieuh 0xefa -- --/* Korean currency symbol */ --#define XK_Korean_Won 0xeff -- --#endif /* XK_KOREAN */ -- --/* Euro currency symbol */ --#define XK_EuroSign 0x20ac -- --#endif -diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfb.h b/remmina-plugins/vnc/libvncserver/rfb/rfb.h -deleted file mode 100644 -index 7c15bd8..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfb/rfb.h -+++ /dev/null -@@ -1,1182 +0,0 @@ --#ifndef RFB_H --#define RFB_H --/** -- * @defgroup libvncserver_api LibVNCServer API Reference -- * @{ -- */ -- --/** -- * @file rfb.h -- */ -- --/* -- * Copyright (C) 2005 Rohit Kumar , -- * Johannes E. Schindelin -- * Copyright (C) 2002 RealVNC Ltd. -- * OSXvnc Copyright (C) 2001 Dan McGuirk . -- * Original Xvnc code Copyright (C) 1999 AT&T Laboratories Cambridge. -- * All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --#if(defined __cplusplus) --extern "C" --{ --#endif -- --#include --#include --#include --#include -- --#ifdef LIBVNCSERVER_HAVE_SYS_TYPES_H --#include --#endif -- --#ifdef __MINGW32__ --#undef SOCKET --#include --#endif -- --#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD --#include --#if 0 /* debugging */ --#define LOCK(mutex) (rfbLog("%s:%d LOCK(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_lock(&(mutex))) --#define UNLOCK(mutex) (rfbLog("%s:%d UNLOCK(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_unlock(&(mutex))) --#define MUTEX(mutex) pthread_mutex_t (mutex) --#define INIT_MUTEX(mutex) (rfbLog("%s:%d INIT_MUTEX(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)), pthread_mutex_init(&(mutex),NULL)) --#define TINI_MUTEX(mutex) (rfbLog("%s:%d TINI_MUTEX(%s)\n",__FILE__,__LINE__,#mutex), pthread_mutex_destroy(&(mutex))) --#define TSIGNAL(cond) (rfbLog("%s:%d TSIGNAL(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_signal(&(cond))) --#define WAIT(cond,mutex) (rfbLog("%s:%d WAIT(%s,%s)\n",__FILE__,__LINE__,#cond,#mutex), pthread_cond_wait(&(cond),&(mutex))) --#define COND(cond) pthread_cond_t (cond) --#define INIT_COND(cond) (rfbLog("%s:%d INIT_COND(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_init(&(cond),NULL)) --#define TINI_COND(cond) (rfbLog("%s:%d TINI_COND(%s)\n",__FILE__,__LINE__,#cond), pthread_cond_destroy(&(cond))) --#define IF_PTHREADS(x) x --#else --#if !NONETWORK --#define LOCK(mutex) pthread_mutex_lock(&(mutex)); --#define UNLOCK(mutex) pthread_mutex_unlock(&(mutex)); --#endif --#define MUTEX(mutex) pthread_mutex_t (mutex) --#define INIT_MUTEX(mutex) pthread_mutex_init(&(mutex),NULL) --#define TINI_MUTEX(mutex) pthread_mutex_destroy(&(mutex)) --#define TSIGNAL(cond) pthread_cond_signal(&(cond)) --#define WAIT(cond,mutex) pthread_cond_wait(&(cond),&(mutex)) --#define COND(cond) pthread_cond_t (cond) --#define INIT_COND(cond) pthread_cond_init(&(cond),NULL) --#define TINI_COND(cond) pthread_cond_destroy(&(cond)) --#define IF_PTHREADS(x) x --#endif --#else --#define LOCK(mutex) --#define UNLOCK(mutex) --#define MUTEX(mutex) --#define INIT_MUTEX(mutex) --#define TINI_MUTEX(mutex) --#define TSIGNAL(cond) --#define WAIT(cond,mutex) this_is_unsupported --#define COND(cond) --#define INIT_COND(cond) --#define TINI_COND(cond) --#define IF_PTHREADS(x) --#endif -- --/* end of stuff for autoconf */ -- --/* if you use pthreads, but don't define LIBVNCSERVER_HAVE_LIBPTHREAD, the structs -- get all mixed up. So this gives a linker error reminding you to compile -- the library and your application (at least the parts including rfb.h) -- with the same support for pthreads. */ --#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD --#ifdef LIBVNCSERVER_HAVE_LIBZ --#define rfbInitServer rfbInitServerWithPthreadsAndZRLE --#else --#define rfbInitServer rfbInitServerWithPthreadsButWithoutZRLE --#endif --#else --#ifdef LIBVNCSERVER_HAVE_LIBZ --#define rfbInitServer rfbInitServerWithoutPthreadsButWithZRLE --#else --#define rfbInitServer rfbInitServerWithoutPthreadsAndZRLE --#endif --#endif -- --struct _rfbClientRec; --struct _rfbScreenInfo; --struct rfbCursor; -- --enum rfbNewClientAction { -- RFB_CLIENT_ACCEPT, -- RFB_CLIENT_ON_HOLD, -- RFB_CLIENT_REFUSE --}; -- --enum rfbSocketState { -- RFB_SOCKET_INIT, -- RFB_SOCKET_READY, -- RFB_SOCKET_SHUTDOWN --}; -- --typedef void (*rfbKbdAddEventProcPtr) (rfbBool down, rfbKeySym keySym, struct _rfbClientRec* cl); --typedef void (*rfbKbdReleaseAllKeysProcPtr) (struct _rfbClientRec* cl); --typedef void (*rfbPtrAddEventProcPtr) (int buttonMask, int x, int y, struct _rfbClientRec* cl); --typedef void (*rfbSetXCutTextProcPtr) (char* str,int len, struct _rfbClientRec* cl); --typedef struct rfbCursor* (*rfbGetCursorProcPtr) (struct _rfbClientRec* pScreen); --typedef rfbBool (*rfbSetTranslateFunctionProcPtr)(struct _rfbClientRec* cl); --typedef rfbBool (*rfbPasswordCheckProcPtr)(struct _rfbClientRec* cl,const char* encryptedPassWord,int len); --typedef enum rfbNewClientAction (*rfbNewClientHookPtr)(struct _rfbClientRec* cl); --typedef void (*rfbDisplayHookPtr)(struct _rfbClientRec* cl); --typedef void (*rfbDisplayFinishedHookPtr)(struct _rfbClientRec* cl, int result); --/** support the capability to view the caps/num/scroll states of the X server */ --typedef int (*rfbGetKeyboardLedStateHookPtr)(struct _rfbScreenInfo* screen); --typedef rfbBool (*rfbXvpHookPtr)(struct _rfbClientRec* cl, uint8_t, uint8_t); --/** -- * If x==1 and y==1 then set the whole display -- * else find the window underneath x and y and set the framebuffer to the dimensions -- * of that window -- */ --typedef void (*rfbSetSingleWindowProcPtr) (struct _rfbClientRec* cl, int x, int y); --/** -- * Status determines if the X11 server permits input from the local user -- * status==0 or 1 -- */ --typedef void (*rfbSetServerInputProcPtr) (struct _rfbClientRec* cl, int status); --/** -- * Permit the server to allow or deny filetransfers. This is defaulted to deny -- * It is called when a client initiates a connection to determine if it is permitted. -- */ --typedef int (*rfbFileTransferPermitted) (struct _rfbClientRec* cl); --/** Handle the textchat messages */ --typedef void (*rfbSetTextChat) (struct _rfbClientRec* cl, int length, char *string); -- --typedef struct { -- uint32_t count; -- rfbBool is16; /**< is the data format short? */ -- union { -- uint8_t* bytes; -- uint16_t* shorts; -- } data; /**< there have to be count*3 entries */ --} rfbColourMap; -- --/** -- * Security handling (RFB protocol version 3.7) -- */ -- --typedef struct _rfbSecurity { -- uint8_t type; -- void (*handler)(struct _rfbClientRec* cl); -- struct _rfbSecurity* next; --} rfbSecurityHandler; -- --/** -- * Protocol extension handling. -- */ -- --typedef struct _rfbProtocolExtension { -- /** returns FALSE if extension should be deactivated for client. -- if newClient == NULL, it is always deactivated. */ -- rfbBool (*newClient)(struct _rfbClientRec* client, void** data); -- /** returns FALSE if extension should be deactivated for client. -- if init == NULL, it stays activated. */ -- rfbBool (*init)(struct _rfbClientRec* client, void* data); -- /** if pseudoEncodings is not NULL, it contains a 0 terminated -- list of the pseudo encodings handled by this extension. */ -- int *pseudoEncodings; -- /** returns TRUE if that pseudo encoding is handled by the extension. -- encodingNumber==0 means "reset encodings". */ -- rfbBool (*enablePseudoEncoding)(struct _rfbClientRec* client, -- void** data, int encodingNumber); -- /** returns TRUE if message was handled */ -- rfbBool (*handleMessage)(struct _rfbClientRec* client, -- void* data, -- const rfbClientToServerMsg* message); -- void (*close)(struct _rfbClientRec* client, void* data); -- void (*usage)(void); -- /** processArguments returns the number of handled arguments */ -- int (*processArgument)(int argc, char *argv[]); -- struct _rfbProtocolExtension* next; --} rfbProtocolExtension; -- --typedef struct _rfbExtensionData { -- rfbProtocolExtension* extension; -- void* data; -- struct _rfbExtensionData* next; --} rfbExtensionData; -- --/** -- * Per-screen (framebuffer) structure. There can be as many as you wish, -- * each serving different clients. However, you have to call -- * rfbProcessEvents for each of these. -- */ -- --typedef struct _rfbScreenInfo --{ -- /** this structure has children that are scaled versions of this screen */ -- struct _rfbScreenInfo *scaledScreenNext; -- int scaledScreenRefCount; -- -- int width; -- int paddedWidthInBytes; -- int height; -- int depth; -- int bitsPerPixel; -- int sizeInBytes; -- -- rfbPixel blackPixel; -- rfbPixel whitePixel; -- -- /** -- * some screen specific data can be put into a struct where screenData -- * points to. You need this if you have more than one screen at the -- * same time while using the same functions. -- */ -- void* screenData; -- -- /* additions by libvncserver */ -- -- rfbPixelFormat serverFormat; -- rfbColourMap colourMap; /**< set this if rfbServerFormat.trueColour==FALSE */ -- const char* desktopName; -- char thisHost[255]; -- -- rfbBool autoPort; -- int port; -- SOCKET listenSock; -- int maxSock; -- int maxFd; --#ifdef __MINGW32__ -- struct fd_set allFds; --#else -- fd_set allFds; --#endif -- -- enum rfbSocketState socketState; -- SOCKET inetdSock; -- rfbBool inetdInitDone; -- -- int udpPort; -- SOCKET udpSock; -- struct _rfbClientRec* udpClient; -- rfbBool udpSockConnected; -- struct sockaddr_in udpRemoteAddr; -- -- int maxClientWait; -- -- /* http stuff */ -- rfbBool httpInitDone; -- rfbBool httpEnableProxyConnect; -- int httpPort; -- char* httpDir; -- SOCKET httpListenSock; -- SOCKET httpSock; -- -- rfbPasswordCheckProcPtr passwordCheck; -- void* authPasswdData; -- /** If rfbAuthPasswdData is given a list, this is the first -- view only password. */ -- int authPasswdFirstViewOnly; -- -- /** send only this many rectangles in one update */ -- int maxRectsPerUpdate; -- /** this is the amount of milliseconds to wait at least before sending -- * an update. */ -- int deferUpdateTime; --#ifdef TODELETE -- char* screen; --#endif -- rfbBool alwaysShared; -- rfbBool neverShared; -- rfbBool dontDisconnect; -- struct _rfbClientRec* clientHead; -- struct _rfbClientRec* pointerClient; /**< "Mutex" for pointer events */ -- -- -- /* cursor */ -- int cursorX, cursorY,underCursorBufferLen; -- char* underCursorBuffer; -- rfbBool dontConvertRichCursorToXCursor; -- struct rfbCursor* cursor; -- -- /** -- * the frameBuffer has to be supplied by the serving process. -- * The buffer will not be freed by -- */ -- char* frameBuffer; -- rfbKbdAddEventProcPtr kbdAddEvent; -- rfbKbdReleaseAllKeysProcPtr kbdReleaseAllKeys; -- rfbPtrAddEventProcPtr ptrAddEvent; -- rfbSetXCutTextProcPtr setXCutText; -- rfbGetCursorProcPtr getCursorPtr; -- rfbSetTranslateFunctionProcPtr setTranslateFunction; -- rfbSetSingleWindowProcPtr setSingleWindow; -- rfbSetServerInputProcPtr setServerInput; -- rfbFileTransferPermitted getFileTransferPermission; -- rfbSetTextChat setTextChat; -- -- /** newClientHook is called just after a new client is created */ -- rfbNewClientHookPtr newClientHook; -- /** displayHook is called just before a frame buffer update */ -- rfbDisplayHookPtr displayHook; -- -- /** These hooks are called to pass keyboard state back to the client */ -- rfbGetKeyboardLedStateHookPtr getKeyboardLedStateHook; -- --#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD -- MUTEX(cursorMutex); -- rfbBool backgroundLoop; --#endif -- -- /** if TRUE, an ignoring signal handler is installed for SIGPIPE */ -- rfbBool ignoreSIGPIPE; -- -- /** if not zero, only a slice of this height is processed every time -- * an update should be sent. This should make working on a slow -- * link more interactive. */ -- int progressiveSliceHeight; -- -- in_addr_t listenInterface; -- int deferPtrUpdateTime; -- -- /** handle as many input events as possible (default off) */ -- rfbBool handleEventsEagerly; -- -- /** rfbEncodingServerIdentity */ -- char *versionString; -- -- /** What does the server tell the new clients which version it supports */ -- int protocolMajorVersion; -- int protocolMinorVersion; -- -- /** command line authorization of file transfers */ -- rfbBool permitFileTransfer; -- -- /** displayFinishedHook is called just after a frame buffer update */ -- rfbDisplayFinishedHookPtr displayFinishedHook; -- /** xvpHook is called to handle an xvp client message */ -- rfbXvpHookPtr xvpHook; --} rfbScreenInfo, *rfbScreenInfoPtr; -- -- --/** -- * rfbTranslateFnType is the type of translation functions. -- */ -- --typedef void (*rfbTranslateFnType)(char *table, rfbPixelFormat *in, -- rfbPixelFormat *out, -- char *iptr, char *optr, -- int bytesBetweenInputLines, -- int width, int height); -- -- --/* region stuff */ -- --struct sraRegion; --typedef struct sraRegion* sraRegionPtr; -- --/* -- * Per-client structure. -- */ -- --typedef void (*ClientGoneHookPtr)(struct _rfbClientRec* cl); -- --typedef struct _rfbFileTransferData { -- int fd; -- int compressionEnabled; -- int fileSize; -- int numPackets; -- int receiving; -- int sending; --} rfbFileTransferData; -- -- --typedef struct _rfbStatList { -- uint32_t type; -- uint32_t sentCount; -- uint32_t bytesSent; -- uint32_t bytesSentIfRaw; -- uint32_t rcvdCount; -- uint32_t bytesRcvd; -- uint32_t bytesRcvdIfRaw; -- struct _rfbStatList *Next; --} rfbStatList; -- --typedef struct _rfbClientRec { -- -- /** back pointer to the screen */ -- rfbScreenInfoPtr screen; -- -- /** points to a scaled version of the screen buffer in cl->scaledScreenList */ -- rfbScreenInfoPtr scaledScreen; -- /** how did the client tell us it wanted the screen changed? Ultra style or palm style? */ -- rfbBool PalmVNC; -- -- -- /** private data. You should put any application client specific data -- * into a struct and let clientData point to it. Don't forget to -- * free the struct via clientGoneHook! -- * -- * This is useful if the IO functions have to behave client specific. -- */ -- void* clientData; -- ClientGoneHookPtr clientGoneHook; -- -- SOCKET sock; -- char *host; -- -- /* RFB protocol minor version number */ -- int protocolMajorVersion; -- int protocolMinorVersion; -- --#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD -- pthread_t client_thread; --#endif -- /** Possible client states: */ -- enum { -- RFB_PROTOCOL_VERSION, /**< establishing protocol version */ -- RFB_SECURITY_TYPE, /**< negotiating security (RFB v.3.7) */ -- RFB_AUTHENTICATION, /**< authenticating */ -- RFB_INITIALISATION, /**< sending initialisation messages */ -- RFB_NORMAL /**< normal protocol messages */ -- } state; -- -- rfbBool reverseConnection; -- rfbBool onHold; -- rfbBool readyForSetColourMapEntries; -- rfbBool useCopyRect; -- int preferredEncoding; -- int correMaxWidth, correMaxHeight; -- -- rfbBool viewOnly; -- -- /* The following member is only used during VNC authentication */ -- uint8_t authChallenge[CHALLENGESIZE]; -- -- /* The following members represent the update needed to get the client's -- framebuffer from its present state to the current state of our -- framebuffer. -- -- If the client does not accept CopyRect encoding then the update is -- simply represented as the region of the screen which has been modified -- (modifiedRegion). -- -- If the client does accept CopyRect encoding, then the update consists of -- two parts. First we have a single copy from one region of the screen to -- another (the destination of the copy is copyRegion), and second we have -- the region of the screen which has been modified in some other way -- (modifiedRegion). -- -- Although the copy is of a single region, this region may have many -- rectangles. When sending an update, the copyRegion is always sent -- before the modifiedRegion. This is because the modifiedRegion may -- overlap parts of the screen which are in the source of the copy. -- -- In fact during normal processing, the modifiedRegion may even overlap -- the destination copyRegion. Just before an update is sent we remove -- from the copyRegion anything in the modifiedRegion. */ -- -- sraRegionPtr copyRegion; /**< the destination region of the copy */ -- int copyDX, copyDY; /**< the translation by which the copy happens */ -- -- sraRegionPtr modifiedRegion; -- -- /** As part of the FramebufferUpdateRequest, a client can express interest -- in a subrectangle of the whole framebuffer. This is stored in the -- requestedRegion member. In the normal case this is the whole -- framebuffer if the client is ready, empty if it's not. */ -- -- sraRegionPtr requestedRegion; -- -- /** The following member represents the state of the "deferred update" timer -- - when the framebuffer is modified and the client is ready, in most -- cases it is more efficient to defer sending the update by a few -- milliseconds so that several changes to the framebuffer can be combined -- into a single update. */ -- -- struct timeval startDeferring; -- struct timeval startPtrDeferring; -- int lastPtrX; -- int lastPtrY; -- int lastPtrButtons; -- -- /** translateFn points to the translation function which is used to copy -- and translate a rectangle from the framebuffer to an output buffer. */ -- -- rfbTranslateFnType translateFn; -- char *translateLookupTable; -- rfbPixelFormat format; -- -- /** -- * UPDATE_BUF_SIZE must be big enough to send at least one whole line of the -- * framebuffer. So for a max screen width of say 2K with 32-bit pixels this -- * means 8K minimum. -- */ -- --#define UPDATE_BUF_SIZE 30000 -- -- char updateBuf[UPDATE_BUF_SIZE]; -- int ublen; -- -- /* statistics */ -- struct _rfbStatList *statEncList; -- struct _rfbStatList *statMsgList; -- int rawBytesEquivalent; -- int bytesSent; -- --#ifdef LIBVNCSERVER_HAVE_LIBZ -- /* zlib encoding -- necessary compression state info per client */ -- -- struct z_stream_s compStream; -- rfbBool compStreamInited; -- uint32_t zlibCompressLevel; -- /** the quality level is also used by ZYWRLE */ -- int tightQualityLevel; -- --#ifdef LIBVNCSERVER_HAVE_LIBJPEG -- /* tight encoding -- preserve zlib streams' state for each client */ -- z_stream zsStruct[4]; -- rfbBool zsActive[4]; -- int zsLevel[4]; -- int tightCompressLevel; --#endif --#endif -- -- /* Ultra Encoding support */ -- rfbBool compStreamInitedLZO; -- char *lzoWrkMem; -- -- rfbFileTransferData fileTransfer; -- -- int lastKeyboardLedState; /**< keep track of last value so we can send *change* events */ -- rfbBool enableSupportedMessages; /**< client supports SupportedMessages encoding */ -- rfbBool enableSupportedEncodings; /**< client supports SupportedEncodings encoding */ -- rfbBool enableServerIdentity; /**< client supports ServerIdentity encoding */ -- rfbBool enableKeyboardLedState; /**< client supports KeyboardState encoding */ -- rfbBool enableLastRectEncoding; /**< client supports LastRect encoding */ -- rfbBool enableCursorShapeUpdates; /**< client supports cursor shape updates */ -- rfbBool enableCursorPosUpdates; /**< client supports cursor position updates */ -- rfbBool useRichCursorEncoding; /**< rfbEncodingRichCursor is preferred */ -- rfbBool cursorWasChanged; /**< cursor shape update should be sent */ -- rfbBool cursorWasMoved; /**< cursor position update should be sent */ -- int cursorX,cursorY; /**< the coordinates of the cursor, -- if enableCursorShapeUpdates = FALSE */ -- -- rfbBool useNewFBSize; /**< client supports NewFBSize encoding */ -- rfbBool newFBSizePending; /**< framebuffer size was changed */ -- -- struct _rfbClientRec *prev; -- struct _rfbClientRec *next; -- --#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD -- /** whenever a client is referenced, the refCount has to be incremented -- and afterwards decremented, so that the client is not cleaned up -- while being referenced. -- Use the functions rfbIncrClientRef(cl) and rfbDecrClientRef(cl); -- */ -- int refCount; -- MUTEX(refCountMutex); -- COND(deleteCond); -- -- MUTEX(outputMutex); -- MUTEX(updateMutex); -- COND(updateCond); --#endif -- --#ifdef LIBVNCSERVER_HAVE_LIBZ -- void* zrleData; -- int zywrleLevel; -- int zywrleBuf[rfbZRLETileWidth * rfbZRLETileHeight]; --#endif -- -- /** if progressive updating is on, this variable holds the current -- * y coordinate of the progressive slice. */ -- int progressiveSliceY; -- -- rfbExtensionData* extensions; -- -- /** for threaded zrle */ -- char *zrleBeforeBuf; -- void *paletteHelper; -- -- /** for thread safety for rfbSendFBUpdate() */ --#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD --#define LIBVNCSERVER_SEND_MUTEX -- MUTEX(sendMutex); --#endif -- -- /* buffers to hold pixel data before and after encoding. -- per-client for thread safety */ -- char *beforeEncBuf; -- int beforeEncBufSize; -- char *afterEncBuf; -- int afterEncBufSize; -- int afterEncBufLen; --} rfbClientRec, *rfbClientPtr; -- --/** -- * This macro is used to test whether there is a framebuffer update needing to -- * be sent to the client. -- */ -- --#define FB_UPDATE_PENDING(cl) \ -- (((cl)->enableCursorShapeUpdates && (cl)->cursorWasChanged) || \ -- (((cl)->enableCursorShapeUpdates == FALSE && \ -- ((cl)->cursorX != (cl)->screen->cursorX || \ -- (cl)->cursorY != (cl)->screen->cursorY))) || \ -- ((cl)->useNewFBSize && (cl)->newFBSizePending) || \ -- ((cl)->enableCursorPosUpdates && (cl)->cursorWasMoved) || \ -- !sraRgnEmpty((cl)->copyRegion) || !sraRgnEmpty((cl)->modifiedRegion)) -- --/* -- * Macros for endian swapping. -- */ -- --#define Swap16(s) ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) -- --#define Swap24(l) ((((l) & 0xff) << 16) | (((l) >> 16) & 0xff) | \ -- (((l) & 0x00ff00))) -- --#define Swap32(l) (((l) >> 24) | \ -- (((l) & 0x00ff0000) >> 8) | \ -- (((l) & 0x0000ff00) << 8) | \ -- ((l) << 24)) -- -- --extern char rfbEndianTest; -- --#define Swap16IfLE(s) (rfbEndianTest ? Swap16(s) : (s)) --#define Swap24IfLE(l) (rfbEndianTest ? Swap24(l) : (l)) --#define Swap32IfLE(l) (rfbEndianTest ? Swap32(l) : (l)) -- --/* UltraVNC uses some windows structures unmodified, so the viewer expects LittleEndian Data */ --#define Swap16IfBE(s) (rfbEndianTest ? (s) : Swap16(s)) --#define Swap24IfBE(l) (rfbEndianTest ? (l) : Swap24(l)) --#define Swap32IfBE(l) (rfbEndianTest ? (l) : Swap32(l)) -- --/* sockets.c */ -- --extern int rfbMaxClientWait; -- --extern void rfbInitSockets(rfbScreenInfoPtr rfbScreen); --extern void rfbShutdownSockets(rfbScreenInfoPtr rfbScreen); --extern void rfbDisconnectUDPSock(rfbScreenInfoPtr rfbScreen); --extern void rfbCloseClient(rfbClientPtr cl); --extern int rfbReadExact(rfbClientPtr cl, char *buf, int len); --extern int rfbReadExactTimeout(rfbClientPtr cl, char *buf, int len,int timeout); --extern int rfbWriteExact(rfbClientPtr cl, const char *buf, int len); --extern int rfbCheckFds(rfbScreenInfoPtr rfbScreen,long usec); --extern int rfbConnect(rfbScreenInfoPtr rfbScreen, char* host, int port); --extern int rfbConnectToTcpAddr(char* host, int port); --extern int rfbListenOnTCPPort(int port, in_addr_t iface); --extern int rfbListenOnUDPPort(int port, in_addr_t iface); --extern int rfbStringToAddr(char* string,in_addr_t* addr); --extern rfbBool rfbSetNonBlocking(int sock); -- --/* rfbserver.c */ -- --/* Routines to iterate over the client list in a thread-safe way. -- Only a single iterator can be in use at a time process-wide. */ --typedef struct rfbClientIterator *rfbClientIteratorPtr; -- --extern void rfbClientListInit(rfbScreenInfoPtr rfbScreen); --extern rfbClientIteratorPtr rfbGetClientIterator(rfbScreenInfoPtr rfbScreen); --extern rfbClientPtr rfbClientIteratorNext(rfbClientIteratorPtr iterator); --extern void rfbReleaseClientIterator(rfbClientIteratorPtr iterator); --extern void rfbIncrClientRef(rfbClientPtr cl); --extern void rfbDecrClientRef(rfbClientPtr cl); -- --extern void rfbNewClientConnection(rfbScreenInfoPtr rfbScreen,int sock); --extern rfbClientPtr rfbNewClient(rfbScreenInfoPtr rfbScreen,int sock); --extern rfbClientPtr rfbNewUDPClient(rfbScreenInfoPtr rfbScreen); --extern rfbClientPtr rfbReverseConnection(rfbScreenInfoPtr rfbScreen,char *host, int port); --extern void rfbClientConnectionGone(rfbClientPtr cl); --extern void rfbProcessClientMessage(rfbClientPtr cl); --extern void rfbClientConnFailed(rfbClientPtr cl, char *reason); --extern void rfbNewUDPConnection(rfbScreenInfoPtr rfbScreen,int sock); --extern void rfbProcessUDPInput(rfbScreenInfoPtr rfbScreen); --extern rfbBool rfbSendFramebufferUpdate(rfbClientPtr cl, sraRegionPtr updateRegion); --extern rfbBool rfbSendRectEncodingRaw(rfbClientPtr cl, int x,int y,int w,int h); --extern rfbBool rfbSendUpdateBuf(rfbClientPtr cl); --extern void rfbSendServerCutText(rfbScreenInfoPtr rfbScreen,char *str, int len); --extern rfbBool rfbSendCopyRegion(rfbClientPtr cl,sraRegionPtr reg,int dx,int dy); --extern rfbBool rfbSendLastRectMarker(rfbClientPtr cl); --extern rfbBool rfbSendNewFBSize(rfbClientPtr cl, int w, int h); --extern rfbBool rfbSendSetColourMapEntries(rfbClientPtr cl, int firstColour, int nColours); --extern void rfbSendBell(rfbScreenInfoPtr rfbScreen); -- --extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length); --extern rfbBool rfbSendFileTransferChunk(rfbClientPtr cl); --extern rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer); --extern rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, char *buffer); --extern char *rfbProcessFileTransferReadBuffer(rfbClientPtr cl, uint32_t length); --extern rfbBool rfbProcessFileTransfer(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length); -- --void rfbGotXCutText(rfbScreenInfoPtr rfbScreen, char *str, int len); -- --/* translate.c */ -- --extern rfbBool rfbEconomicTranslate; -- --extern void rfbTranslateNone(char *table, rfbPixelFormat *in, -- rfbPixelFormat *out, -- char *iptr, char *optr, -- int bytesBetweenInputLines, -- int width, int height); --extern rfbBool rfbSetTranslateFunction(rfbClientPtr cl); --extern rfbBool rfbSetClientColourMap(rfbClientPtr cl, int firstColour, int nColours); --extern void rfbSetClientColourMaps(rfbScreenInfoPtr rfbScreen, int firstColour, int nColours); -- --/* httpd.c */ -- --extern void rfbHttpInitSockets(rfbScreenInfoPtr rfbScreen); --extern void rfbHttpShutdownSockets(rfbScreenInfoPtr rfbScreen); --extern void rfbHttpCheckFds(rfbScreenInfoPtr rfbScreen); -- -- -- --/* auth.c */ -- --extern void rfbAuthNewClient(rfbClientPtr cl); --extern void rfbProcessClientSecurityType(rfbClientPtr cl); --extern void rfbAuthProcessClientMessage(rfbClientPtr cl); --extern void rfbRegisterSecurityHandler(rfbSecurityHandler* handler); --extern void rfbUnregisterSecurityHandler(rfbSecurityHandler* handler); -- --/* rre.c */ -- --extern rfbBool rfbSendRectEncodingRRE(rfbClientPtr cl, int x,int y,int w,int h); -- -- --/* corre.c */ -- --extern rfbBool rfbSendRectEncodingCoRRE(rfbClientPtr cl, int x,int y,int w,int h); -- -- --/* hextile.c */ -- --extern rfbBool rfbSendRectEncodingHextile(rfbClientPtr cl, int x, int y, int w, -- int h); -- --/* ultra.c */ -- --/* Set maximum ultra rectangle size in pixels. Always allow at least -- * two scan lines. -- */ --#define ULTRA_MAX_RECT_SIZE (128*256) --#define ULTRA_MAX_SIZE(min) ((( min * 2 ) > ULTRA_MAX_RECT_SIZE ) ? \ -- ( min * 2 ) : ULTRA_MAX_RECT_SIZE ) -- --extern rfbBool rfbSendRectEncodingUltra(rfbClientPtr cl, int x,int y,int w,int h); -- -- --#ifdef LIBVNCSERVER_HAVE_LIBZ --/* zlib.c */ -- --/** Minimum zlib rectangle size in bytes. Anything smaller will -- * not compress well due to overhead. -- */ --#define VNC_ENCODE_ZLIB_MIN_COMP_SIZE (17) -- --/* Set maximum zlib rectangle size in pixels. Always allow at least -- * two scan lines. -- */ --#define ZLIB_MAX_RECT_SIZE (128*256) --#define ZLIB_MAX_SIZE(min) ((( min * 2 ) > ZLIB_MAX_RECT_SIZE ) ? \ -- ( min * 2 ) : ZLIB_MAX_RECT_SIZE ) -- --extern rfbBool rfbSendRectEncodingZlib(rfbClientPtr cl, int x, int y, int w, -- int h); -- --#ifdef LIBVNCSERVER_HAVE_LIBJPEG --/* tight.c */ -- --#define TIGHT_DEFAULT_COMPRESSION 6 -- --extern rfbBool rfbTightDisableGradient; -- --extern int rfbNumCodedRectsTight(rfbClientPtr cl, int x,int y,int w,int h); --extern rfbBool rfbSendRectEncodingTight(rfbClientPtr cl, int x,int y,int w,int h); -- --#endif --#endif -- -- --/* cursor.c */ -- --typedef struct rfbCursor { -- /** set this to true if LibVNCServer has to free this cursor */ -- rfbBool cleanup, cleanupSource, cleanupMask, cleanupRichSource; -- unsigned char *source; /**< points to bits */ -- unsigned char *mask; /**< points to bits */ -- unsigned short width, height, xhot, yhot; /**< metrics */ -- unsigned short foreRed, foreGreen, foreBlue; /**< device-independent colour */ -- unsigned short backRed, backGreen, backBlue; /**< device-independent colour */ -- unsigned char *richSource; /**< source bytes for a rich cursor */ -- unsigned char *alphaSource; /**< source for alpha blending info */ -- rfbBool alphaPreMultiplied; /**< if richSource already has alpha applied */ --} rfbCursor, *rfbCursorPtr; --extern unsigned char rfbReverseByte[0x100]; -- --extern rfbBool rfbSendCursorShape(rfbClientPtr cl/*, rfbScreenInfoPtr pScreen*/); --extern rfbBool rfbSendCursorPos(rfbClientPtr cl); --extern void rfbConvertLSBCursorBitmapOrMask(int width,int height,unsigned char* bitmap); --extern rfbCursorPtr rfbMakeXCursor(int width,int height,char* cursorString,char* maskString); --extern char* rfbMakeMaskForXCursor(int width,int height,char* cursorString); --extern char* rfbMakeMaskFromAlphaSource(int width,int height,unsigned char* alphaSource); --extern void rfbMakeXCursorFromRichCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor); --extern void rfbMakeRichCursorFromXCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr cursor); --extern void rfbFreeCursor(rfbCursorPtr cursor); --extern void rfbSetCursor(rfbScreenInfoPtr rfbScreen,rfbCursorPtr c); -- --/** cursor handling for the pointer */ --extern void rfbDefaultPtrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl); -- --/* zrle.c */ --#ifdef LIBVNCSERVER_HAVE_LIBZ --extern rfbBool rfbSendRectEncodingZRLE(rfbClientPtr cl, int x, int y, int w,int h); --#endif -- --/* stats.c */ -- --extern void rfbResetStats(rfbClientPtr cl); --extern void rfbPrintStats(rfbClientPtr cl); -- --/* font.c */ -- --typedef struct rfbFontData { -- unsigned char* data; -- /** -- metaData is a 256*5 array: -- for each character -- (offset,width,height,x,y) -- */ -- int* metaData; --} rfbFontData,* rfbFontDataPtr; -- --int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,rfbPixel colour); --void rfbDrawString(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,rfbPixel colour); --/** if colour==backColour, background is transparent */ --int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,unsigned char c,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour); --void rfbDrawStringWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font,int x,int y,const char* string,int x1,int y1,int x2,int y2,rfbPixel colour,rfbPixel backColour); --int rfbWidthOfString(rfbFontDataPtr font,const char* string); --int rfbWidthOfChar(rfbFontDataPtr font,unsigned char c); --void rfbFontBBox(rfbFontDataPtr font,unsigned char c,int* x1,int* y1,int* x2,int* y2); --/** this returns the smallest box enclosing any character of font. */ --void rfbWholeFontBBox(rfbFontDataPtr font,int *x1, int *y1, int *x2, int *y2); -- --/** dynamically load a linux console font (4096 bytes, 256 glyphs a 8x16 */ --rfbFontDataPtr rfbLoadConsoleFont(char *filename); --/** free a dynamically loaded font */ --void rfbFreeFont(rfbFontDataPtr font); -- --/* draw.c */ -- --void rfbFillRect(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col); --void rfbDrawPixel(rfbScreenInfoPtr s,int x,int y,rfbPixel col); --void rfbDrawLine(rfbScreenInfoPtr s,int x1,int y1,int x2,int y2,rfbPixel col); -- --/* selbox.c */ -- --/** this opens a modal select box. list is an array of strings, the end marked -- with a NULL. -- It returns the index in the list or -1 if cancelled or something else -- wasn't kosher. */ --typedef void (*SelectionChangedHookPtr)(int _index); --extern int rfbSelectBox(rfbScreenInfoPtr rfbScreen, -- rfbFontDataPtr font, char** list, -- int x1, int y1, int x2, int y2, -- rfbPixel foreColour, rfbPixel backColour, -- int border,SelectionChangedHookPtr selChangedHook); -- --/* cargs.c */ -- --extern void rfbUsage(void); --extern void rfbPurgeArguments(int* argc,int* position,int count,char *argv[]); --extern rfbBool rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[]); --extern rfbBool rfbProcessSizeArguments(int* width,int* height,int* bpp,int* argc, char *argv[]); -- --/* main.c */ -- --extern void rfbLogEnable(int enabled); --typedef void (*rfbLogProc)(const char *format, ...); --extern rfbLogProc rfbLog, rfbErr; --extern void rfbLogPerror(const char *str); -- --void rfbScheduleCopyRect(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2,int dx,int dy); --void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy); -- --void rfbDoCopyRect(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2,int dx,int dy); --void rfbDoCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy); -- --void rfbMarkRectAsModified(rfbScreenInfoPtr rfbScreen,int x1,int y1,int x2,int y2); --void rfbMarkRegionAsModified(rfbScreenInfoPtr rfbScreen,sraRegionPtr modRegion); --void rfbDoNothingWithClient(rfbClientPtr cl); --enum rfbNewClientAction defaultNewClientHook(rfbClientPtr cl); --void rfbRegisterProtocolExtension(rfbProtocolExtension* extension); --void rfbUnregisterProtocolExtension(rfbProtocolExtension* extension); --struct _rfbProtocolExtension* rfbGetExtensionIterator(); --void rfbReleaseExtensionIterator(); --rfbBool rfbEnableExtension(rfbClientPtr cl, rfbProtocolExtension* extension, -- void* data); --rfbBool rfbDisableExtension(rfbClientPtr cl, rfbProtocolExtension* extension); --void* rfbGetExtensionClientData(rfbClientPtr cl, rfbProtocolExtension* extension); -- --/** to check against plain passwords */ --rfbBool rfbCheckPasswordByList(rfbClientPtr cl,const char* response,int len); -- --/* functions to make a vnc server */ --extern rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv, -- int width,int height,int bitsPerSample,int samplesPerPixel, -- int bytesPerPixel); --extern void rfbInitServer(rfbScreenInfoPtr rfbScreen); --extern void rfbShutdownServer(rfbScreenInfoPtr rfbScreen,rfbBool disconnectClients); --extern void rfbNewFramebuffer(rfbScreenInfoPtr rfbScreen,char *framebuffer, -- int width,int height, int bitsPerSample,int samplesPerPixel, -- int bytesPerPixel); -- --extern void rfbScreenCleanup(rfbScreenInfoPtr screenInfo); --extern void rfbSetServerVersionIdentity(rfbScreenInfoPtr screen, char *fmt, ...); -- --/* functions to accept/refuse a client that has been put on hold -- by a NewClientHookPtr function. Must not be called in other -- situations. */ --extern void rfbStartOnHoldClient(rfbClientPtr cl); --extern void rfbRefuseOnHoldClient(rfbClientPtr cl); -- --/* call one of these two functions to service the vnc clients. -- usec are the microseconds the select on the fds waits. -- if you are using the event loop, set this to some value > 0, so the -- server doesn't get a high load just by listening. -- rfbProcessEvents() returns TRUE if an update was pending. */ -- --extern void rfbRunEventLoop(rfbScreenInfoPtr screenInfo, long usec, rfbBool runInBackground); --extern rfbBool rfbProcessEvents(rfbScreenInfoPtr screenInfo,long usec); --extern rfbBool rfbIsActive(rfbScreenInfoPtr screenInfo); -- --/* TightVNC file transfer extension */ --void rfbRegisterTightVNCFileTransferExtension(); --void rfbUnregisterTightVNCFileTransferExtension(); -- --/* Statistics */ --extern char *messageNameServer2Client(uint32_t type, char *buf, int len); --extern char *messageNameClient2Server(uint32_t type, char *buf, int len); --extern char *encodingName(uint32_t enc, char *buf, int len); -- --extern rfbStatList *rfbStatLookupEncoding(rfbClientPtr cl, uint32_t type); --extern rfbStatList *rfbStatLookupMessage(rfbClientPtr cl, uint32_t type); -- --/* Each call to rfbStatRecord* adds one to the rect count for that type */ --extern void rfbStatRecordEncodingSent(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); --extern void rfbStatRecordEncodingSentAdd(rfbClientPtr cl, uint32_t type, int byteCount); /* Specifically for tight encoding */ --extern void rfbStatRecordEncodingRcvd(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); --extern void rfbStatRecordMessageSent(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); --extern void rfbStatRecordMessageRcvd(rfbClientPtr cl, uint32_t type, int byteCount, int byteIfRaw); --extern void rfbResetStats(rfbClientPtr cl); --extern void rfbPrintStats(rfbClientPtr cl); -- --extern int rfbStatGetSentBytes(rfbClientPtr cl); --extern int rfbStatGetSentBytesIfRaw(rfbClientPtr cl); --extern int rfbStatGetRcvdBytes(rfbClientPtr cl); --extern int rfbStatGetRcvdBytesIfRaw(rfbClientPtr cl); --extern int rfbStatGetMessageCountSent(rfbClientPtr cl, uint32_t type); --extern int rfbStatGetMessageCountRcvd(rfbClientPtr cl, uint32_t type); --extern int rfbStatGetEncodingCountSent(rfbClientPtr cl, uint32_t type); --extern int rfbStatGetEncodingCountRcvd(rfbClientPtr cl, uint32_t type); -- --/** Set which version you want to advertise 3.3, 3.6, 3.7 and 3.8 are currently supported*/ --extern void rfbSetProtocolVersion(rfbScreenInfoPtr rfbScreen, int major_, int minor_); -- --/** send a TextChat message to a client */ --extern rfbBool rfbSendTextChatMessage(rfbClientPtr cl, uint32_t length, char *buffer); -- -- -- -- --#if(defined __cplusplus) --} --#endif -- --/** -- * @} -- */ -- -- --/** -- @page libvncserver_doc LibVNCServer Documentation -- @section create_server Creating a server instance -- To make a server, you just have to initialise a server structure using the -- function rfbGetScreen(), like -- @code -- rfbScreenInfoPtr screen = -- rfbGetScreen(argc,argv,screenwidth,screenheight,8,3,bpp); -- @endcode -- where byte per pixel should be 1, 2 or 4. If performance doesn't matter, -- you may try bpp=3 (internally one cannot use native data types in this -- case; if you want to use this, look at pnmshow24.c). -- -- You then can set hooks and io functions (see @ref making_it_interactive) or other -- options (see @ref server_options). -- -- And you allocate the frame buffer like this: -- @code -- screen->frameBuffer = (char*)malloc(screenwidth*screenheight*bpp); -- @endcode -- After that, you initialize the server, like -- @code -- rfbInitServer(screen); -- @endcode -- You can use a blocking event loop, a background (pthread based) event loop, -- or implement your own using the rfbProcessEvents() function. -- -- @subsection server_options Optional Server Features -- -- These options have to be set between rfbGetScreen() and rfbInitServer(). -- -- If you already have a socket to talk to, just set rfbScreenInfo::inetdSock -- (originally this is for inetd handling, but why not use it for your purpose?). -- -- To also start an HTTP server (running on port 5800+display_number), you have -- to set rfbScreenInfo::httpDir to a directory containing vncviewer.jar and -- index.vnc (like the included "classes" directory). -- -- @section making_it_interactive Making it interactive -- -- Whenever you draw something, you have to call -- @code -- rfbMarkRectAsModified(screen,x1,y1,x2,y2). -- @endcode -- This tells LibVNCServer to send updates to all connected clients. -- -- There exist the following IO functions as members of rfbScreen: -- rfbScreenInfo::kbdAddEvent(), rfbScreenInfo::kbdReleaseAllKeys(), rfbScreenInfo::ptrAddEvent() and rfbScreenInfo::setXCutText() -- -- rfbScreenInfo::kbdAddEvent() -- is called when a key is pressed. -- rfbScreenInfo::kbdReleaseAllKeys() -- is not called at all (maybe in the future). -- rfbScreenInfo::ptrAddEvent() -- is called when the mouse moves or a button is pressed. -- WARNING: if you want to have proper cursor handling, call -- rfbDefaultPtrAddEvent() -- in your own function. This sets the coordinates of the cursor. -- rfbScreenInfo::setXCutText() -- is called when the selection changes. -- -- There are only two hooks: -- rfbScreenInfo::newClientHook() -- is called when a new client has connected. -- rfbScreenInfo::displayHook() -- is called just before a frame buffer update is sent. -- -- You can also override the following methods: -- rfbScreenInfo::getCursorPtr() -- This could be used to make an animated cursor (if you really want ...) -- rfbScreenInfo::setTranslateFunction() -- If you insist on colour maps or something more obscure, you have to -- implement this. Default is a trueColour mapping. -- -- @section cursor_handling Cursor handling -- -- The screen holds a pointer -- rfbScreenInfo::cursor -- to the current cursor. Whenever you set it, remember that any dynamically -- created cursor (like return value from rfbMakeXCursor()) is not free'd! -- -- The rfbCursor structure consists mainly of a mask and a source. The rfbCursor::mask -- describes, which pixels are drawn for the cursor (a cursor needn't be -- rectangular). The rfbCursor::source describes, which colour those pixels should have. -- -- The standard is an XCursor: a cursor with a foreground and a background -- colour (stored in backRed,backGreen,backBlue and the same for foreground -- in a range from 0-0xffff). Therefore, the arrays "mask" and "source" -- contain pixels as single bits stored in bytes in MSB order. The rows are -- padded, such that each row begins with a new byte (i.e. a 10x4 -- cursor's mask has 2x4 bytes, because 2 bytes are needed to hold 10 bits). -- -- It is however very easy to make a cursor like this: -- @code -- char* cur=" " -- " xx " -- " x " -- " "; -- char* mask="xxxx" -- "xxxx" -- "xxxx" -- "xxx "; -- rfbCursorPtr c=rfbMakeXCursor(4,4,cur,mask); -- @endcode -- You can even set rfbCursor::mask to NULL in this call and LibVNCServer will calculate -- a mask for you (dynamically, so you have to free it yourself). -- -- There is also an array named rfbCursor::richSource for colourful cursors. They have -- the same format as the frameBuffer (i.e. if the server is 32 bit, -- a 10x4 cursor has 4x10x4 bytes). -- -- @section screen_client_difference What is the difference between rfbScreenInfoPtr and rfbClientPtr? -- -- The rfbScreenInfoPtr is a pointer to a rfbScreenInfo structure, which -- holds information about the server, like pixel format, io functions, -- frame buffer etc. The rfbClientPtr is a pointer to an rfbClientRec structure, which holds -- information about a client, like pixel format, socket of the -- connection, etc. A server can have several clients, but needn't have any. So, if you -- have a server and three clients are connected, you have one instance -- of a rfbScreenInfo and three instances of rfbClientRec's. -- -- The rfbClientRec structure holds a member rfbClientRec::screen which points to the server. -- So, to access the server from the client structure, you use client->screen. -- -- To access all clients from a server be sure to use the provided iterator -- rfbGetClientIterator() -- with -- rfbClientIteratorNext() -- and -- rfbReleaseClientIterator() -- to prevent thread clashes. -- -- @section example_code Example Code -- -- There are two documented examples included: -- - example.c, a shared scribble sheet -- - pnmshow.c, a program to show PNMs (pictures) over the net. -- -- The examples are not too well documented, but easy straight forward and a -- good starting point. -- -- Try example.c: it outputs on which port it listens (default: 5900), so it is -- display 0. To view, call @code vncviewer :0 @endcode -- You should see a sheet with a gradient and "Hello World!" written on it. Try -- to paint something. Note that everytime you click, there is some bigger blot, -- whereas when you drag the mouse while clicked you draw a line. The size of the -- blot depends on the mouse button you click. Open a second vncviewer with -- the same parameters and watch it as you paint in the other window. This also -- works over internet. You just have to know either the name or the IP of your -- machine. Then it is @code vncviewer machine.where.example.runs.com:0 @endcode -- or similar for the remote client. Now you are ready to type something. Be sure -- that your mouse sits still, because everytime the mouse moves, the cursor is -- reset to the position of the pointer! If you are done with that demo, press -- the down or up arrows. If your viewer supports it, then the dimensions of the -- sheet change. Just press Escape in the viewer. Note that the server still -- runs, even if you closed both windows. When you reconnect now, everything you -- painted and wrote is still there. You can press "Page Up" for a blank page. -- -- The demo pnmshow.c is much simpler: you either provide a filename as argument -- or pipe a file through stdin. Note that the file has to be a raw pnm/ppm file, -- i.e. a truecolour graphics. Only the Escape key is implemented. This may be -- the best starting point if you want to learn how to use LibVNCServer. You -- are confronted with the fact that the bytes per pixel can only be 8, 16 or 32. --*/ -- --#endif -diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbclient.h b/remmina-plugins/vnc/libvncserver/rfb/rfbclient.h -deleted file mode 100644 -index 9b8f3c3..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfb/rfbclient.h -+++ /dev/null -@@ -1,431 +0,0 @@ --#ifndef RFBCLIENT_H --#define RFBCLIENT_H -- --/** -- * @defgroup libvncclient_api LibVNCClient API Reference -- * @{ -- */ -- --/* -- * Copyright (C) 2000, 2001 Const Kaplinsky. All Rights Reserved. -- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/** -- * @file rfbclient.h -- */ -- --#include --#include --#include --#include --#include --#include --#include --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS --#include --#endif -- --#define rfbClientSwap16IfLE(s) \ -- (*(char *)&client->endianTest ? ((((s) & 0xff) << 8) | (((s) >> 8) & 0xff)) : (s)) -- --#define rfbClientSwap32IfLE(l) \ -- (*(char *)&client->endianTest ? ((((l) & 0xff000000) >> 24) | \ -- (((l) & 0x00ff0000) >> 8) | \ -- (((l) & 0x0000ff00) << 8) | \ -- (((l) & 0x000000ff) << 24)) : (l)) -- --#define rfbClientSwap64IfLE(l) \ -- (*(char *)&client->endianTest ? ((((l) & 0xff00000000000000ULL) >> 56) | \ -- (((l) & 0x00ff000000000000ULL) >> 40) | \ -- (((l) & 0x0000ff0000000000ULL) >> 24) | \ -- (((l) & 0x000000ff00000000ULL) >> 8) | \ -- (((l) & 0x00000000ff000000ULL) << 8) | \ -- (((l) & 0x0000000000ff0000ULL) << 24) | \ -- (((l) & 0x000000000000ff00ULL) << 40) | \ -- (((l) & 0x00000000000000ffULL) << 56)) : (l)) -- --#define FLASH_PORT_OFFSET 5400 --#define LISTEN_PORT_OFFSET 5500 --#define TUNNEL_PORT_OFFSET 5500 --#define SERVER_PORT_OFFSET 5900 -- --#define DEFAULT_SSH_CMD "/usr/bin/ssh" --#define DEFAULT_TUNNEL_CMD \ -- (DEFAULT_SSH_CMD " -f -L %L:localhost:%R %H sleep 20") --#define DEFAULT_VIA_CMD \ -- (DEFAULT_SSH_CMD " -f -L %L:%H:%R %G sleep 20") -- --#if(defined __cplusplus) --extern "C" --{ --#endif -- --/** vncrec */ -- --typedef struct { -- FILE* file; -- struct timeval tv; -- rfbBool readTimestamp; -- rfbBool doNotSleep; --} rfbVNCRec; -- --/** client data */ -- --typedef struct rfbClientData { -- void* tag; -- void* data; -- struct rfbClientData* next; --} rfbClientData; -- --/** app data (belongs into rfbClient?) */ -- --typedef struct { -- rfbBool shareDesktop; -- rfbBool viewOnly; -- -- const char* encodingsString; -- -- rfbBool useBGR233; -- int nColours; -- rfbBool forceOwnCmap; -- rfbBool forceTrueColour; -- int requestedDepth; -- -- int compressLevel; -- int qualityLevel; -- rfbBool enableJPEG; -- rfbBool useRemoteCursor; -- rfbBool palmVNC; /**< use palmvnc specific SetScale (vs ultravnc) */ -- int scaleSetting; /**< 0 means no scale set, else 1/scaleSetting */ --} AppData; -- --/** For GetCredentialProc callback function to return */ --typedef union _rfbCredential --{ -- /** X509 (VeNCrypt) */ -- struct -- { -- char *x509CACertFile; -- char *x509CACrlFile; -- char *x509ClientCertFile; -- char *x509ClientKeyFile; -- } x509Credential; -- /** Plain (VeNCrypt), MSLogon (UltraVNC) */ -- struct -- { -- char *username; -- char *password; -- } userCredential; --} rfbCredential; -- --#define rfbCredentialTypeX509 1 --#define rfbCredentialTypeUser 2 -- --struct _rfbClient; -- --typedef void (*HandleTextChatProc)(struct _rfbClient* client, int value, char *text); --typedef void (*HandleXvpMsgProc)(struct _rfbClient* client, uint8_t version, uint8_t opcode); --typedef void (*HandleKeyboardLedStateProc)(struct _rfbClient* client, int value, int pad); --typedef rfbBool (*HandleCursorPosProc)(struct _rfbClient* client, int x, int y); --typedef void (*SoftCursorLockAreaProc)(struct _rfbClient* client, int x, int y, int w, int h); --typedef void (*SoftCursorUnlockScreenProc)(struct _rfbClient* client); --typedef void (*GotFrameBufferUpdateProc)(struct _rfbClient* client, int x, int y, int w, int h); --typedef void (*FinishedFrameBufferUpdateProc)(struct _rfbClient* client); --typedef char* (*GetPasswordProc)(struct _rfbClient* client); --typedef rfbCredential* (*GetCredentialProc)(struct _rfbClient* client, int credentialType); --typedef rfbBool (*MallocFrameBufferProc)(struct _rfbClient* client); --typedef void (*GotXCutTextProc)(struct _rfbClient* client, const char *text, int textlen); --typedef void (*BellProc)(struct _rfbClient* client); -- --typedef void (*GotCursorShapeProc)(struct _rfbClient* client, int xhot, int yhot, int width, int height, int bytesPerPixel); --typedef void (*GotCopyRectProc)(struct _rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y); -- --typedef struct _rfbClient { -- uint8_t* frameBuffer; -- int width, height; -- -- int endianTest; -- -- AppData appData; -- -- const char* programName; -- char* serverHost; -- int serverPort; /**< if -1, then use file recorded by vncrec */ -- rfbBool listenSpecified; -- int listenPort, flashPort; -- -- struct { -- int x, y, w, h; -- } updateRect; -- -- /** Note that the CoRRE encoding uses this buffer and assumes it is big enough -- to hold 255 * 255 * 32 bits -> 260100 bytes. 640*480 = 307200 bytes. -- Hextile also assumes it is big enough to hold 16 * 16 * 32 bits. -- Tight encoding assumes BUFFER_SIZE is at least 16384 bytes. */ -- --#define RFB_BUFFER_SIZE (640*480) -- char buffer[RFB_BUFFER_SIZE]; -- -- /* rfbproto.c */ -- -- int sock; -- rfbBool canUseCoRRE; -- rfbBool canUseHextile; -- char *desktopName; -- rfbPixelFormat format; -- rfbServerInitMsg si; -- -- /* sockets.c */ --#define RFB_BUF_SIZE 8192 -- char buf[RFB_BUF_SIZE]; -- char *bufoutptr; -- int buffered; -- -- /* The zlib encoding requires expansion/decompression/deflation of the -- compressed data in the "buffer" above into another, result buffer. -- However, the size of the result buffer can be determined precisely -- based on the bitsPerPixel, height and width of the rectangle. We -- allocate this buffer one time to be the full size of the buffer. */ -- -- /* Ultra Encoding uses this buffer too */ -- -- int ultra_buffer_size; -- char *ultra_buffer; -- -- int raw_buffer_size; -- char *raw_buffer; -- --#ifdef LIBVNCSERVER_HAVE_LIBZ -- z_stream decompStream; -- rfbBool decompStreamInited; --#endif -- -- --#ifdef LIBVNCSERVER_HAVE_LIBZ -- /* -- * Variables for the ``tight'' encoding implementation. -- */ -- -- /** Separate buffer for compressed data. */ --#define ZLIB_BUFFER_SIZE 30000 -- char zlib_buffer[ZLIB_BUFFER_SIZE]; -- -- /* Four independent compression streams for zlib library. */ -- z_stream zlibStream[4]; -- rfbBool zlibStreamActive[4]; -- -- /* Filter stuff. Should be initialized by filter initialization code. */ -- rfbBool cutZeros; -- int rectWidth, rectColors; -- char tightPalette[256*4]; -- uint8_t tightPrevRow[2048*3*sizeof(uint16_t)]; -- --#ifdef LIBVNCSERVER_HAVE_LIBJPEG -- /** JPEG decoder state. */ -- rfbBool jpegError; -- -- struct jpeg_source_mgr* jpegSrcManager; -- void* jpegBufferPtr; -- size_t jpegBufferLen; -- --#endif --#endif -- -- -- /* cursor.c */ -- uint8_t *rcSource, *rcMask; -- -- /** private data pointer */ -- rfbClientData* clientData; -- -- rfbVNCRec* vncRec; -- -- /* Keyboard State support (is 'Caps Lock' set on the remote display???) */ -- int KeyboardLedStateEnabled; -- int CurrentKeyboardLedState; -- -- int canHandleNewFBSize; -- -- /* hooks */ -- HandleTextChatProc HandleTextChat; -- HandleKeyboardLedStateProc HandleKeyboardLedState; -- HandleCursorPosProc HandleCursorPos; -- SoftCursorLockAreaProc SoftCursorLockArea; -- SoftCursorUnlockScreenProc SoftCursorUnlockScreen; -- GotFrameBufferUpdateProc GotFrameBufferUpdate; -- /** the pointer returned by GetPassword will be freed after use! */ -- GetPasswordProc GetPassword; -- MallocFrameBufferProc MallocFrameBuffer; -- GotXCutTextProc GotXCutText; -- BellProc Bell; -- -- GotCursorShapeProc GotCursorShape; -- GotCopyRectProc GotCopyRect; -- -- /** Which messages are supported by the server -- * This is a *guess* for most servers. -- * (If we can even detect the type of server) -- * -- * If the server supports the "rfbEncodingSupportedMessages" -- * then this will be updated when the encoding is received to -- * accurately reflect the servers capabilities. -- */ -- rfbSupportedMessages supportedMessages; -- -- /** negotiated protocol version */ -- int major, minor; -- -- /** The selected security types */ -- uint32_t authScheme, subAuthScheme; -- --#ifdef LIBVNCSERVER_WITH_CLIENT_TLS -- /** The TLS session for Anonymous TLS and VeNCrypt */ -- gnutls_session_t tlsSession; --#endif -- -- /** To support security types that requires user input (except VNC password -- * authentication), for example VeNCrypt and MSLogon, this callback function -- * must be set before the authentication. Otherwise, it implicates that the -- * caller application does not support it and related security types should -- * be bypassed. -- */ -- GetCredentialProc GetCredential; -- -- /** The 0-terminated security types supported by the client. -- * Set by function SetClientAuthSchemes() */ -- uint32_t *clientAuthSchemes; -- -- /** When the server is a repeater, this specifies the final destination */ -- char *destHost; -- int destPort; -- -- /** the QoS IP DSCP for this client */ -- int QoS_DSCP; -- -- /** hook to handle xvp server messages */ -- HandleXvpMsgProc HandleXvpMsg; -- -- /* listen.c */ -- int listenSock; -- -- FinishedFrameBufferUpdateProc FinishedFrameBufferUpdate; --} rfbClient; -- --/* cursor.c */ -- --extern rfbBool HandleCursorShape(rfbClient* client,int xhot, int yhot, int width, int height, uint32_t enc); -- --/* listen.c */ -- --extern void listenForIncomingConnections(rfbClient* viewer); --extern int listenForIncomingConnectionsNoFork(rfbClient* viewer, int usec_timeout); -- --/* rfbproto.c */ -- --extern rfbBool rfbEnableClientLogging; --typedef void (*rfbClientLogProc)(const char *format, ...); --extern rfbClientLogProc rfbClientLog,rfbClientErr; --extern rfbBool ConnectToRFBServer(rfbClient* client,const char *hostname, int port); --extern rfbBool ConnectToRFBRepeater(rfbClient* client,const char *repeaterHost, int repeaterPort, const char *destHost, int destPort); --extern void SetClientAuthSchemes(rfbClient* client,const uint32_t *authSchemes, int size); --extern rfbBool InitialiseRFBConnection(rfbClient* client); --extern rfbBool SetFormatAndEncodings(rfbClient* client); --extern rfbBool SendIncrementalFramebufferUpdateRequest(rfbClient* client); --extern rfbBool SendFramebufferUpdateRequest(rfbClient* client, -- int x, int y, int w, int h, -- rfbBool incremental); --extern rfbBool SendScaleSetting(rfbClient* client,int scaleSetting); --extern rfbBool SendPointerEvent(rfbClient* client,int x, int y, int buttonMask); --extern rfbBool SendKeyEvent(rfbClient* client,uint32_t key, rfbBool down); --extern rfbBool SendClientCutText(rfbClient* client,char *str, int len); --extern rfbBool HandleRFBServerMessage(rfbClient* client); -- --extern rfbBool TextChatSend(rfbClient* client, char *text); --extern rfbBool TextChatOpen(rfbClient* client); --extern rfbBool TextChatClose(rfbClient* client); --extern rfbBool TextChatFinish(rfbClient* client); --extern rfbBool PermitServerInput(rfbClient* client, int enabled); --extern rfbBool SendXvpMsg(rfbClient* client, uint8_t version, uint8_t code); -- --extern void PrintPixelFormat(rfbPixelFormat *format); -- --extern rfbBool SupportsClient2Server(rfbClient* client, int messageType); --extern rfbBool SupportsServer2Client(rfbClient* client, int messageType); -- --/* client data */ -- --void rfbClientSetClientData(rfbClient* client, void* tag, void* data); --void* rfbClientGetClientData(rfbClient* client, void* tag); -- --/* protocol extensions */ -- --typedef struct _rfbClientProtocolExtension { -- int* encodings; -- /** returns TRUE if the encoding was handled */ -- rfbBool (*handleEncoding)(rfbClient* cl, -- rfbFramebufferUpdateRectHeader* rect); -- /** returns TRUE if it handled the message */ -- rfbBool (*handleMessage)(rfbClient* cl, -- rfbServerToClientMsg* message); -- struct _rfbClientProtocolExtension* next; --} rfbClientProtocolExtension; -- --void rfbClientRegisterExtension(rfbClientProtocolExtension* e); -- --/* sockets.c */ -- --extern rfbBool errorMessageOnReadFailure; -- --extern rfbBool ReadFromRFBServer(rfbClient* client, char *out, unsigned int n); --extern rfbBool WriteToRFBServer(rfbClient* client, char *buf, int n); --extern int FindFreeTcpPort(void); --extern int ListenAtTcpPort(int port); --extern int ConnectClientToTcpAddr(unsigned int host, int port); --extern int ConnectClientToTcpAddr6(const char *hostname, int port); --extern int ConnectClientToUnixSock(const char *sockFile); --extern int AcceptTcpConnection(int listenSock); --extern rfbBool SetNonBlocking(int sock); --extern rfbBool SetDSCP(int sock, int dscp); -- --extern rfbBool StringToIPAddr(const char *str, unsigned int *addr); --extern rfbBool SameMachine(int sock); --extern int WaitForMessage(rfbClient* client,unsigned int usecs); -- --/* vncviewer.c */ --rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,int bytesPerPixel); --rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv); --/** rfbClientCleanup() does not touch client->frameBuffer */ --void rfbClientCleanup(rfbClient* client); -- --#if(defined __cplusplus) --} --#endif -- --/** -- * @} -- */ -- --/** -- @page libvncclient_doc LibVNCClient Documentation -- @section example_code Example Code -- See SDLvncviewer.c for a rather complete client example. --*/ -- --#endif -diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h b/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h -deleted file mode 100644 -index 4b28217..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h -+++ /dev/null -@@ -1,95 +0,0 @@ --#ifndef _RFB_RFBCONFIG_H --/* #undef _RFB_RFBCONFIG_H */ -- --/* rfb/rfbconfig.h. Generated automatically by cmake. */ -- --/* Enable 24 bit per pixel in native framebuffer */ --#define LIBVNCSERVER_ALLOW24BPP 1 -- --/* work around when write() returns ENOENT but does not mean it */ --/* #undef LIBVNCSERVER_ENOENT_WORKAROUND */ -- --/* Define to 1 if you have the header file. */ --#define LIBVNCSERVER_HAVE_FCNTL_H 1 -- --/* Define to 1 if you have the `gettimeofday' function. */ --#define LIBVNCSERVER_HAVE_GETTIMEOFDAY 1 -- --/* Define to 1 if you have the `jpeg' library (-ljpeg). */ --#define LIBVNCSERVER_HAVE_LIBJPEG 1 -- --/* Define to 1 if you have the `pthread' library (-lpthread). */ --#define LIBVNCSERVER_HAVE_LIBPTHREAD 1 -- --/* Define to 1 if you have the `z' library (-lz). */ --#define LIBVNCSERVER_HAVE_LIBZ 1 -- --/* Define to 1 if you have the header file. */ --#define LIBVNCSERVER_HAVE_NETINET_IN_H 1 -- --/* Define to 1 if you have the header file. */ --#define LIBVNCSERVER_HAVE_SYS_SOCKET_H 1 -- --/* Define to 1 if you have the header file. */ --#define LIBVNCSERVER_HAVE_SYS_STAT_H 1 -- --/* Define to 1 if you have the header file. */ --#define LIBVNCSERVER_HAVE_SYS_TIME_H 1 -- --/* Define to 1 if you have the header file. */ --#define LIBVNCSERVER_HAVE_SYS_TYPES_H 1 -- --/* Define to 1 if you have that is POSIX.1 compatible. */ --#define LIBVNCSERVER_HAVE_SYS_WAIT_H 1 -- --/* Define to 1 if you have the header file. */ --#define LIBVNCSERVER_HAVE_UNISTD_H 1 -- --/* Need a typedef for in_addr_t */ --/* #undef LIBVNCSERVER_NEED_INADDR_T */ -- --/* Define to the full name and version of this package. */ --#define LIBVNCSERVER_PACKAGE_STRING " " -- --/* Define to the version of this package. */ --#define LIBVNCSERVER_PACKAGE_VERSION "" -- --/* Define to 1 if libgcrypt is present */ --#define LIBVNCSERVER_WITH_CLIENT_GCRYPT 1 -- --/* Define to 1 if GnuTLS is present */ --#define LIBVNCSERVER_WITH_CLIENT_TLS 1 -- --/* Define to 1 if your processor stores words with the most significant byte -- first (like Motorola and SPARC, unlike Intel and VAX). */ --/* #undef LIBVNCSERVER_WORDS_BIGENDIAN */ -- --/* Define to empty if `const' does not conform to ANSI C. */ --/* #undef const */ -- --/* Define to `__inline__' or `__inline' if that's what the C compiler -- calls it, or to nothing if 'inline' is not supported under any name. */ --//#ifndef __cplusplus --/* #undef inline */ --//#endif -- --/* Define to `int' if does not define. */ --#define HAVE_LIBVNCSERVER_PID_T 1 --#ifndef HAVE_LIBVNCSERVER_PID_T --typedef int pid_t; --#endif -- --/* The type for size_t */ --#define HAVE_LIBVNCSERVER_SIZE_T 1 --#ifndef HAVE_LIBVNCSERVER_SIZE_T --typedef int size_t; --#endif -- --/* The type for socklen */ --#define HAVE_LIBVNCSERVER_SOCKLEN_T 1 --#ifndef HAVE_LIBVNCSERVER_SOCKLEN_T --typedef int socklen_t; --#endif -- --/* once: _RFB_RFBCONFIG_H */ --#endif -diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h.cmake b/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h.cmake -deleted file mode 100644 -index de898fc..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfb/rfbconfig.h.cmake -+++ /dev/null -@@ -1,95 +0,0 @@ --#ifndef _RFB_RFBCONFIG_H --#cmakedefine _RFB_RFBCONFIG_H 1 -- --/* rfb/rfbconfig.h. Generated automatically by cmake. */ -- --/* Enable 24 bit per pixel in native framebuffer */ --#cmakedefine LIBVNCSERVER_ALLOW24BPP 1 -- --/* work around when write() returns ENOENT but does not mean it */ --#cmakedefine LIBVNCSERVER_ENOENT_WORKAROUND 1 -- --/* Define to 1 if you have the header file. */ --#cmakedefine LIBVNCSERVER_HAVE_FCNTL_H 1 -- --/* Define to 1 if you have the `gettimeofday' function. */ --#cmakedefine LIBVNCSERVER_HAVE_GETTIMEOFDAY 1 -- --/* Define to 1 if you have the `jpeg' library (-ljpeg). */ --#cmakedefine LIBVNCSERVER_HAVE_LIBJPEG 1 -- --/* Define to 1 if you have the `pthread' library (-lpthread). */ --#cmakedefine LIBVNCSERVER_HAVE_LIBPTHREAD 1 -- --/* Define to 1 if you have the `z' library (-lz). */ --#cmakedefine LIBVNCSERVER_HAVE_LIBZ 1 -- --/* Define to 1 if you have the header file. */ --#cmakedefine LIBVNCSERVER_HAVE_NETINET_IN_H 1 -- --/* Define to 1 if you have the header file. */ --#cmakedefine LIBVNCSERVER_HAVE_SYS_SOCKET_H 1 -- --/* Define to 1 if you have the header file. */ --#cmakedefine LIBVNCSERVER_HAVE_SYS_STAT_H 1 -- --/* Define to 1 if you have the header file. */ --#cmakedefine LIBVNCSERVER_HAVE_SYS_TIME_H 1 -- --/* Define to 1 if you have the header file. */ --#cmakedefine LIBVNCSERVER_HAVE_SYS_TYPES_H 1 -- --/* Define to 1 if you have that is POSIX.1 compatible. */ --#cmakedefine LIBVNCSERVER_HAVE_SYS_WAIT_H 1 -- --/* Define to 1 if you have the header file. */ --#cmakedefine LIBVNCSERVER_HAVE_UNISTD_H 1 -- --/* Need a typedef for in_addr_t */ --#cmakedefine LIBVNCSERVER_NEED_INADDR_T 1 -- --/* Define to the full name and version of this package. */ --#define LIBVNCSERVER_PACKAGE_STRING "@FULL_PACKAGE_NAME@ @PACKAGE_VERSION@" -- --/* Define to the version of this package. */ --#define LIBVNCSERVER_PACKAGE_VERSION "@PACKAGE_VERSION@" -- --/* Define to 1 if libgcrypt is present */ --#cmakedefine LIBVNCSERVER_WITH_CLIENT_GCRYPT 1 -- --/* Define to 1 if GnuTLS is present */ --#cmakedefine LIBVNCSERVER_WITH_CLIENT_TLS 1 -- --/* Define to 1 if your processor stores words with the most significant byte -- first (like Motorola and SPARC, unlike Intel and VAX). */ --#cmakedefine LIBVNCSERVER_WORDS_BIGENDIAN 1 -- --/* Define to empty if `const' does not conform to ANSI C. */ --//#cmakedefine const @CMAKE_CONST@ -- --/* Define to `__inline__' or `__inline' if that's what the C compiler -- calls it, or to nothing if 'inline' is not supported under any name. */ --//#ifndef __cplusplus --//#cmakedefine inline @CMAKE_INLINE@ --//#endif -- --/* Define to `int' if does not define. */ --#cmakedefine HAVE_LIBVNCSERVER_PID_T 1 --#ifndef HAVE_LIBVNCSERVER_PID_T --typedef int pid_t; --#endif -- --/* The type for size_t */ --#cmakedefine HAVE_LIBVNCSERVER_SIZE_T 1 --#ifndef HAVE_LIBVNCSERVER_SIZE_T --typedef int size_t; --#endif -- --/* The type for socklen */ --#cmakedefine HAVE_LIBVNCSERVER_SOCKLEN_T 1 --#ifndef HAVE_LIBVNCSERVER_SOCKLEN_T --typedef int socklen_t; --#endif -- --/* once: _RFB_RFBCONFIG_H */ --#endif -diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbint.h.cmake b/remmina-plugins/vnc/libvncserver/rfb/rfbint.h.cmake -deleted file mode 100644 -index 17de6cd..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfb/rfbint.h.cmake -+++ /dev/null -@@ -1,4 +0,0 @@ --#ifndef _RFB_RFBINT_H --#define _RFB_RFBINT_H 1 --/* empty ... */ --#endif -diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbproto.h b/remmina-plugins/vnc/libvncserver/rfb/rfbproto.h -deleted file mode 100644 -index 73d200a..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfb/rfbproto.h -+++ /dev/null -@@ -1,1431 +0,0 @@ --#ifndef RFBPROTO_H --#define RFBPROTO_H -- --/** -- @mainpage -- @li @ref libvncserver_api -- @li @ref libvncserver_doc -- -- -- @li @ref libvncclient_api -- @li @ref libvncclient_doc -- --*/ -- --/* -- * Copyright (C) 2005 Rohit Kumar, Johannes E. Schindelin -- * Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved. -- * Copyright (C) 2000 Tridia Corporation. All Rights Reserved. -- * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved. -- * -- * This is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published by -- * the Free Software Foundation; either version 2 of the License, or -- * (at your option) any later version. -- * -- * This software is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with this software; if not, write to the Free Software -- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, -- * USA. -- */ -- --/* -- * rfbproto.h - header file for the RFB protocol version 3.3 -- * -- * Uses types CARD for an n-bit unsigned integer, INT for an n-bit signed -- * integer (for n = 8, 16 and 32). -- * -- * All multiple byte integers are in big endian (network) order (most -- * significant byte first). Unless noted otherwise there is no special -- * alignment of protocol structures. -- * -- * -- * Once the initial handshaking is done, all messages start with a type byte, -- * (usually) followed by message-specific data. The order of definitions in -- * this file is as follows: -- * -- * (1) Structures used in several types of message. -- * (2) Structures used in the initial handshaking. -- * (3) Message types. -- * (4) Encoding types. -- * (5) For each message type, the form of the data following the type byte. -- * Sometimes this is defined by a single structure but the more complex -- * messages have to be explained by comments. -- */ -- -- --#if defined(WIN32) && !defined(__MINGW32__) --#define LIBVNCSERVER_WORDS_BIGENDIAN --#define rfbBool int --#include --#include --#undef SOCKET --#define SOCKET int --#else --#include --#include --#endif -- --#ifdef LIBVNCSERVER_HAVE_LIBZ --#include --#ifdef __CHECKER__ --#undef Z_NULL --#define Z_NULL NULL --#endif --#endif -- --/* some autotool versions do not properly prefix -- WORDS_BIGENDIAN, so do that manually */ --#ifdef WORDS_BIGENDIAN --#define LIBVNCSERVER_WORDS_BIGENDIAN --#endif -- --/* MS compilers don't have strncasecmp */ --#ifdef _MSC_VER --#define strncasecmp _strnicmp --#endif -- --#if !defined(WIN32) || defined(__MINGW32__) --#define max(a,b) (((a)>(b))?(a):(b)) --#ifdef LIBVNCSERVER_HAVE_SYS_TIME_H --#include --#endif --#ifdef LIBVNCSERVER_HAVE_NETINET_IN_H --#include --#endif --#define SOCKET int --typedef int8_t rfbBool; --#undef FALSE --#define FALSE 0 --#undef TRUE --#define TRUE -1 --#endif -- --typedef uint32_t rfbKeySym; --typedef uint32_t rfbPixel; -- --#ifdef LIBVNCSERVER_NEED_INADDR_T --typedef uint32_t in_addr_t; --#endif -- --#ifndef INADDR_NONE --#define INADDR_NONE ((in_addr_t) 0xffffffff) --#endif -- --#define MAX_ENCODINGS 21 -- --/***************************************************************************** -- * -- * Structures used in several messages -- * -- *****************************************************************************/ -- --/*----------------------------------------------------------------------------- -- * Structure used to specify a rectangle. This structure is a multiple of 4 -- * bytes so that it can be interspersed with 32-bit pixel data without -- * affecting alignment. -- */ -- --typedef struct { -- uint16_t x; -- uint16_t y; -- uint16_t w; -- uint16_t h; --} rfbRectangle; -- --#define sz_rfbRectangle 8 -- -- --/*----------------------------------------------------------------------------- -- * Structure used to specify pixel format. -- */ -- --typedef struct { -- -- uint8_t bitsPerPixel; /* 8,16,32 only */ -- -- uint8_t depth; /* 8 to 32 */ -- -- uint8_t bigEndian; /* True if multi-byte pixels are interpreted -- as big endian, or if single-bit-per-pixel -- has most significant bit of the byte -- corresponding to first (leftmost) pixel. Of -- course this is meaningless for 8 bits/pix */ -- -- uint8_t trueColour; /* If false then we need a "colour map" to -- convert pixels to RGB. If true, xxxMax and -- xxxShift specify bits used for red, green -- and blue */ -- -- /* the following fields are only meaningful if trueColour is true */ -- -- uint16_t redMax; /* maximum red value (= 2^n - 1 where n is the -- number of bits used for red). Note this -- value is always in big endian order. */ -- -- uint16_t greenMax; /* similar for green */ -- -- uint16_t blueMax; /* and blue */ -- -- uint8_t redShift; /* number of shifts needed to get the red -- value in a pixel to the least significant -- bit. To find the red value from a given -- pixel, do the following: -- 1) Swap pixel value according to bigEndian -- (e.g. if bigEndian is false and host byte -- order is big endian, then swap). -- 2) Shift right by redShift. -- 3) AND with redMax (in host byte order). -- 4) You now have the red value between 0 and -- redMax. */ -- -- uint8_t greenShift; /* similar for green */ -- -- uint8_t blueShift; /* and blue */ -- -- uint8_t pad1; -- uint16_t pad2; -- --} rfbPixelFormat; -- --#define sz_rfbPixelFormat 16 -- --/* UltraVNC: Color settings values */ --#define rfbPFFullColors 0 --#define rfbPF256Colors 1 --#define rfbPF64Colors 2 --#define rfbPF8Colors 3 --#define rfbPF8GreyColors 4 --#define rfbPF4GreyColors 5 --#define rfbPF2GreyColors 6 -- -- --/***************************************************************************** -- * -- * Initial handshaking messages -- * -- *****************************************************************************/ -- --/*----------------------------------------------------------------------------- -- * Protocol Version -- * -- * The server always sends 12 bytes to start which identifies the latest RFB -- * protocol version number which it supports. These bytes are interpreted -- * as a string of 12 ASCII characters in the format "RFB xxx.yyy\n" where -- * xxx and yyy are the major and minor version numbers (for version 3.3 -- * this is "RFB 003.003\n"). -- * -- * The client then replies with a similar 12-byte message giving the version -- * number of the protocol which should actually be used (which may be different -- * to that quoted by the server). -- * -- * It is intended that both clients and servers may provide some level of -- * backwards compatibility by this mechanism. Servers in particular should -- * attempt to provide backwards compatibility, and even forwards compatibility -- * to some extent. For example if a client demands version 3.1 of the -- * protocol, a 3.0 server can probably assume that by ignoring requests for -- * encoding types it doesn't understand, everything will still work OK. This -- * will probably not be the case for changes in the major version number. -- * -- * The format string below can be used in sprintf or sscanf to generate or -- * decode the version string respectively. -- */ -- --#define rfbProtocolVersionFormat "RFB %03d.%03d\n" --#define rfbProtocolMajorVersion 3 --#define rfbProtocolMinorVersion 8 --/* UltraVNC Viewer examines rfbProtocolMinorVersion number (4, and 6) -- * to identify if the server supports File Transfer -- */ -- --typedef char rfbProtocolVersionMsg[13]; /* allow extra byte for null */ -- --#define sz_rfbProtocolVersionMsg 12 -- --/* -- * Negotiation of the security type (protocol version 3.7) -- * -- * Once the protocol version has been decided, the server either sends a list -- * of supported security types, or informs the client about an error (when the -- * number of security types is 0). Security type rfbSecTypeTight is used to -- * enable TightVNC-specific protocol extensions. The value rfbSecTypeVncAuth -- * stands for classic VNC authentication. -- * -- * The client selects a particular security type from the list provided by the -- * server. -- */ -- --#define rfbSecTypeInvalid 0 --#define rfbSecTypeNone 1 --#define rfbSecTypeVncAuth 2 -- -- --/*----------------------------------------------------------------------------- -- * Authentication -- * -- * Once the protocol version has been decided, the server then sends a 32-bit -- * word indicating whether any authentication is needed on the connection. -- * The value of this word determines the authentication scheme in use. For -- * version 3.0 of the protocol this may have one of the following values: -- */ -- --#define rfbConnFailed 0 --#define rfbNoAuth 1 --#define rfbVncAuth 2 -- --#define rfbRA2 5 --#define rfbRA2ne 6 --#define rfbSSPI 7 --#define rfbSSPIne 8 --#define rfbTight 16 --#define rfbUltra 17 --#define rfbTLS 18 --#define rfbVeNCrypt 19 --#define rfbARD 30 --#define rfbMSLogon 0xfffffffa -- --#define rfbVeNCryptPlain 256 --#define rfbVeNCryptTLSNone 257 --#define rfbVeNCryptTLSVNC 258 --#define rfbVeNCryptTLSPlain 259 --#define rfbVeNCryptX509None 260 --#define rfbVeNCryptX509VNC 261 --#define rfbVeNCryptX509Plain 262 --#define rfbVeNCryptX509SASL 263 --#define rfbVeNCryptTLSSASL 264 -- --/* -- * rfbConnFailed: For some reason the connection failed (e.g. the server -- * cannot support the desired protocol version). This is -- * followed by a string describing the reason (where a -- * string is specified as a 32-bit length followed by that -- * many ASCII characters). -- * -- * rfbNoAuth: No authentication is needed. -- * -- * rfbVncAuth: The VNC authentication scheme is to be used. A 16-byte -- * challenge follows, which the client encrypts as -- * appropriate using the password and sends the resulting -- * 16-byte response. If the response is correct, the -- * server sends the 32-bit word rfbVncAuthOK. If a simple -- * failure happens, the server sends rfbVncAuthFailed and -- * closes the connection. If the server decides that too -- * many failures have occurred, it sends rfbVncAuthTooMany -- * and closes the connection. In the latter case, the -- * server should not allow an immediate reconnection by -- * the client. -- */ -- --#define rfbVncAuthOK 0 --#define rfbVncAuthFailed 1 --#define rfbVncAuthTooMany 2 -- -- --/*----------------------------------------------------------------------------- -- * Client Initialisation Message -- * -- * Once the client and server are sure that they're happy to talk to one -- * another, the client sends an initialisation message. At present this -- * message only consists of a boolean indicating whether the server should try -- * to share the desktop by leaving other clients connected, or give exclusive -- * access to this client by disconnecting all other clients. -- */ -- --typedef struct { -- uint8_t shared; --} rfbClientInitMsg; -- --#define sz_rfbClientInitMsg 1 -- -- --/*----------------------------------------------------------------------------- -- * Server Initialisation Message -- * -- * After the client initialisation message, the server sends one of its own. -- * This tells the client the width and height of the server's framebuffer, -- * its pixel format and the name associated with the desktop. -- */ -- --typedef struct { -- uint16_t framebufferWidth; -- uint16_t framebufferHeight; -- rfbPixelFormat format; /* the server's preferred pixel format */ -- uint32_t nameLength; -- /* followed by char name[nameLength] */ --} rfbServerInitMsg; -- --#define sz_rfbServerInitMsg (8 + sz_rfbPixelFormat) -- -- --/* -- * Following the server initialisation message it's up to the client to send -- * whichever protocol messages it wants. Typically it will send a -- * SetPixelFormat message and a SetEncodings message, followed by a -- * FramebufferUpdateRequest. From then on the server will send -- * FramebufferUpdate messages in response to the client's -- * FramebufferUpdateRequest messages. The client should send -- * FramebufferUpdateRequest messages with incremental set to true when it has -- * finished processing one FramebufferUpdate and is ready to process another. -- * With a fast client, the rate at which FramebufferUpdateRequests are sent -- * should be regulated to avoid hogging the network. -- */ -- -- -- --/***************************************************************************** -- * -- * Message types -- * -- *****************************************************************************/ -- --/* server -> client */ -- --#define rfbFramebufferUpdate 0 --#define rfbSetColourMapEntries 1 --#define rfbBell 2 --#define rfbServerCutText 3 --/* Modif sf@2002 */ --#define rfbResizeFrameBuffer 4 --#define rfbPalmVNCReSizeFrameBuffer 0xF -- --/* client -> server */ -- --#define rfbSetPixelFormat 0 --#define rfbFixColourMapEntries 1 /* not currently supported */ --#define rfbSetEncodings 2 --#define rfbFramebufferUpdateRequest 3 --#define rfbKeyEvent 4 --#define rfbPointerEvent 5 --#define rfbClientCutText 6 --/* Modif sf@2002 - actually bidirectionnal */ --#define rfbFileTransfer 7 --/* Modif sf@2002 */ --#define rfbSetScale 8 --/* Modif rdv@2002 */ --#define rfbSetServerInput 9 --/* Modif rdv@2002 */ --#define rfbSetSW 10 --/* Modif sf@2002 - TextChat - Bidirectionnal */ --#define rfbTextChat 11 --/* Modif cs@2005 */ --/* PalmVNC 1.4 & 2.0 SetScale Factor message */ --#define rfbPalmVNCSetScaleFactor 0xF --/* Xvp message - bidirectional */ --#define rfbXvp 250 -- -- -- -- --/***************************************************************************** -- * -- * Encoding types -- * -- *****************************************************************************/ -- --#define rfbEncodingRaw 0 --#define rfbEncodingCopyRect 1 --#define rfbEncodingRRE 2 --#define rfbEncodingCoRRE 4 --#define rfbEncodingHextile 5 --#define rfbEncodingZlib 6 --#define rfbEncodingTight 7 --#define rfbEncodingZlibHex 8 --#define rfbEncodingUltra 9 --#define rfbEncodingZRLE 16 --#define rfbEncodingZYWRLE 17 -- --/* Cache & XOR-Zlib - rdv@2002 */ --#define rfbEncodingCache 0xFFFF0000 --#define rfbEncodingCacheEnable 0xFFFF0001 --#define rfbEncodingXOR_Zlib 0xFFFF0002 --#define rfbEncodingXORMonoColor_Zlib 0xFFFF0003 --#define rfbEncodingXORMultiColor_Zlib 0xFFFF0004 --#define rfbEncodingSolidColor 0xFFFF0005 --#define rfbEncodingXOREnable 0xFFFF0006 --#define rfbEncodingCacheZip 0xFFFF0007 --#define rfbEncodingSolMonoZip 0xFFFF0008 --#define rfbEncodingUltraZip 0xFFFF0009 -- --/* Xvp pseudo-encoding */ --#define rfbEncodingXvp 0xFFFFFECB -- --/* -- * Special encoding numbers: -- * 0xFFFFFF00 .. 0xFFFFFF0F -- encoding-specific compression levels; -- * 0xFFFFFF10 .. 0xFFFFFF1F -- mouse cursor shape data; -- * 0xFFFFFF20 .. 0xFFFFFF2F -- various protocol extensions; -- * 0xFFFFFF30 .. 0xFFFFFFDF -- not allocated yet; -- * 0xFFFFFFE0 .. 0xFFFFFFEF -- quality level for JPEG compressor; -- * 0xFFFFFFF0 .. 0xFFFFFFFF -- cross-encoding compression levels. -- */ -- --#define rfbEncodingCompressLevel0 0xFFFFFF00 --#define rfbEncodingCompressLevel1 0xFFFFFF01 --#define rfbEncodingCompressLevel2 0xFFFFFF02 --#define rfbEncodingCompressLevel3 0xFFFFFF03 --#define rfbEncodingCompressLevel4 0xFFFFFF04 --#define rfbEncodingCompressLevel5 0xFFFFFF05 --#define rfbEncodingCompressLevel6 0xFFFFFF06 --#define rfbEncodingCompressLevel7 0xFFFFFF07 --#define rfbEncodingCompressLevel8 0xFFFFFF08 --#define rfbEncodingCompressLevel9 0xFFFFFF09 -- --#define rfbEncodingXCursor 0xFFFFFF10 --#define rfbEncodingRichCursor 0xFFFFFF11 --#define rfbEncodingPointerPos 0xFFFFFF18 -- --#define rfbEncodingLastRect 0xFFFFFF20 --#define rfbEncodingNewFBSize 0xFFFFFF21 -- --#define rfbEncodingQualityLevel0 0xFFFFFFE0 --#define rfbEncodingQualityLevel1 0xFFFFFFE1 --#define rfbEncodingQualityLevel2 0xFFFFFFE2 --#define rfbEncodingQualityLevel3 0xFFFFFFE3 --#define rfbEncodingQualityLevel4 0xFFFFFFE4 --#define rfbEncodingQualityLevel5 0xFFFFFFE5 --#define rfbEncodingQualityLevel6 0xFFFFFFE6 --#define rfbEncodingQualityLevel7 0xFFFFFFE7 --#define rfbEncodingQualityLevel8 0xFFFFFFE8 --#define rfbEncodingQualityLevel9 0xFFFFFFE9 -- -- --/* LibVNCServer additions. We claim 0xFFFE0000 - 0xFFFE00FF */ --#define rfbEncodingKeyboardLedState 0xFFFE0000 --#define rfbEncodingSupportedMessages 0xFFFE0001 --#define rfbEncodingSupportedEncodings 0xFFFE0002 --#define rfbEncodingServerIdentity 0xFFFE0003 -- -- --/***************************************************************************** -- * -- * Server -> client message definitions -- * -- *****************************************************************************/ -- -- --/*----------------------------------------------------------------------------- -- * FramebufferUpdate - a block of rectangles to be copied to the framebuffer. -- * -- * This message consists of a header giving the number of rectangles of pixel -- * data followed by the rectangles themselves. The header is padded so that -- * together with the type byte it is an exact multiple of 4 bytes (to help -- * with alignment of 32-bit pixels): -- */ -- --typedef struct { -- uint8_t type; /* always rfbFramebufferUpdate */ -- uint8_t pad; -- uint16_t nRects; -- /* followed by nRects rectangles */ --} rfbFramebufferUpdateMsg; -- --#define sz_rfbFramebufferUpdateMsg 4 -- --/* -- * Each rectangle of pixel data consists of a header describing the position -- * and size of the rectangle and a type word describing the encoding of the -- * pixel data, followed finally by the pixel data. Note that if the client has -- * not sent a SetEncodings message then it will only receive raw pixel data. -- * Also note again that this structure is a multiple of 4 bytes. -- */ -- --typedef struct { -- rfbRectangle r; -- uint32_t encoding; /* one of the encoding types rfbEncoding... */ --} rfbFramebufferUpdateRectHeader; -- --#define sz_rfbFramebufferUpdateRectHeader (sz_rfbRectangle + 4) -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * Supported Messages Encoding. This encoding does not contain any pixel data. -- * Instead, it contains 2 sets of bitflags. These bitflags indicate what messages -- * are supported by the server. -- * rect->w contains byte count -- */ -- --typedef struct { -- uint8_t client2server[32]; /* maximum of 256 message types (256/8)=32 */ -- uint8_t server2client[32]; /* maximum of 256 message types (256/8)=32 */ --} rfbSupportedMessages; -- --#define sz_rfbSupportedMessages 64 -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * Supported Encodings Encoding. This encoding does not contain any pixel data. -- * Instead, it contains a list of (uint32_t) Encodings supported by this server. -- * rect->w contains byte count -- * rect->h contains encoding count -- */ -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * Server Identity Encoding. This encoding does not contain any pixel data. -- * Instead, it contains a text string containing information about the server. -- * ie: "x11vnc: 0.8.1 lastmod: 2006-04-25 (libvncserver 0.9pre)\0" -- * rect->w contains byte count -- */ -- -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * Raw Encoding. Pixels are sent in top-to-bottom scanline order, -- * left-to-right within a scanline with no padding in between. -- */ -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * KeyboardLedState Encoding. The X coordinate contains the Locked Modifiers -- * so that a remote troubleshooter can identify that the users 'Caps Lock' -- * is set... (It helps a *lot* when the users are untrained) -- */ --#define rfbKeyboardMaskShift 1 --#define rfbKeyboardMaskCapsLock 2 --#define rfbKeyboardMaskControl 4 --#define rfbKeyboardMaskAlt 8 --#define rfbKeyboardMaskMeta 16 --#define rfbKeyboardMaskSuper 32 --#define rfbKeyboardMaskHyper 64 --#define rfbKeyboardMaskNumLock 128 --#define rfbKeyboardMaskScrollLock 256 --#define rfbKeyboardMaskAltGraph 512 -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * CopyRect Encoding. The pixels are specified simply by the x and y position -- * of the source rectangle. -- */ -- --typedef struct { -- uint16_t srcX; -- uint16_t srcY; --} rfbCopyRect; -- --#define sz_rfbCopyRect 4 -- -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * RRE - Rise-and-Run-length Encoding. We have an rfbRREHeader structure -- * giving the number of subrectangles following. Finally the data follows in -- * the form [...] where each is -- * []. -- */ -- --typedef struct { -- uint32_t nSubrects; --} rfbRREHeader; -- --#define sz_rfbRREHeader 4 -- -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * CoRRE - Compact RRE Encoding. We have an rfbRREHeader structure giving -- * the number of subrectangles following. Finally the data follows in the form -- * [...] where each is -- * []. This means that -- * the whole rectangle must be at most 255x255 pixels. -- */ -- --typedef struct { -- uint8_t x; -- uint8_t y; -- uint8_t w; -- uint8_t h; --} rfbCoRRERectangle; -- --#define sz_rfbCoRRERectangle 4 -- -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * Hextile Encoding. The rectangle is divided up into "tiles" of 16x16 pixels, -- * starting at the top left going in left-to-right, top-to-bottom order. If -- * the width of the rectangle is not an exact multiple of 16 then the width of -- * the last tile in each row will be correspondingly smaller. Similarly if the -- * height is not an exact multiple of 16 then the height of each tile in the -- * final row will also be smaller. Each tile begins with a "subencoding" type -- * byte, which is a mask made up of a number of bits. If the Raw bit is set -- * then the other bits are irrelevant; w*h pixel values follow (where w and h -- * are the width and height of the tile). Otherwise the tile is encoded in a -- * similar way to RRE, except that the position and size of each subrectangle -- * can be specified in just two bytes. The other bits in the mask are as -- * follows: -- * -- * BackgroundSpecified - if set, a pixel value follows which specifies -- * the background colour for this tile. The first non-raw tile in a -- * rectangle must have this bit set. If this bit isn't set then the -- * background is the same as the last tile. -- * -- * ForegroundSpecified - if set, a pixel value follows which specifies -- * the foreground colour to be used for all subrectangles in this tile. -- * If this bit is set then the SubrectsColoured bit must be zero. -- * -- * AnySubrects - if set, a single byte follows giving the number of -- * subrectangles following. If not set, there are no subrectangles (i.e. -- * the whole tile is just solid background colour). -- * -- * SubrectsColoured - if set then each subrectangle is preceded by a pixel -- * value giving the colour of that subrectangle. If not set, all -- * subrectangles are the same colour, the foreground colour; if the -- * ForegroundSpecified bit wasn't set then the foreground is the same as -- * the last tile. -- * -- * The position and size of each subrectangle is specified in two bytes. The -- * Pack macros below can be used to generate the two bytes from x, y, w, h, -- * and the Extract macros can be used to extract the x, y, w, h values from -- * the two bytes. -- */ -- --#define rfbHextileRaw (1 << 0) --#define rfbHextileBackgroundSpecified (1 << 1) --#define rfbHextileForegroundSpecified (1 << 2) --#define rfbHextileAnySubrects (1 << 3) --#define rfbHextileSubrectsColoured (1 << 4) -- --#define rfbHextilePackXY(x,y) (((x) << 4) | (y)) --#define rfbHextilePackWH(w,h) ((((w)-1) << 4) | ((h)-1)) --#define rfbHextileExtractX(byte) ((byte) >> 4) --#define rfbHextileExtractY(byte) ((byte) & 0xf) --#define rfbHextileExtractW(byte) (((byte) >> 4) + 1) --#define rfbHextileExtractH(byte) (((byte) & 0xf) + 1) -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * zlib - zlib compressed Encoding. We have an rfbZlibHeader structure -- * giving the number of bytes following. Finally the data follows is -- * zlib compressed version of the raw pixel data as negotiated. -- * (NOTE: also used by Ultra Encoding) -- */ -- --typedef struct { -- uint32_t nBytes; --} rfbZlibHeader; -- --#define sz_rfbZlibHeader 4 -- --#ifdef LIBVNCSERVER_HAVE_LIBZ -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * Tight Encoding. -- * -- *-- The first byte of each Tight-encoded rectangle is a "compression control -- * byte". Its format is as follows (bit 0 is the least significant one): -- * -- * bit 0: if 1, then compression stream 0 should be reset; -- * bit 1: if 1, then compression stream 1 should be reset; -- * bit 2: if 1, then compression stream 2 should be reset; -- * bit 3: if 1, then compression stream 3 should be reset; -- * bits 7-4: if 1000 (0x08), then the compression type is "fill", -- * if 1001 (0x09), then the compression type is "jpeg", -- * if 0xxx, then the compression type is "basic", -- * values greater than 1001 are not valid. -- * -- * If the compression type is "basic", then bits 6..4 of the -- * compression control byte (those xxx in 0xxx) specify the following: -- * -- * bits 5-4: decimal representation is the index of a particular zlib -- * stream which should be used for decompressing the data; -- * bit 6: if 1, then a "filter id" byte is following this byte. -- * -- *-- The data that follows after the compression control byte described -- * above depends on the compression type ("fill", "jpeg" or "basic"). -- * -- *-- If the compression type is "fill", then the only pixel value follows, in -- * client pixel format (see NOTE 1). This value applies to all pixels of the -- * rectangle. -- * -- *-- If the compression type is "jpeg", the following data stream looks like -- * this: -- * -- * 1..3 bytes: data size (N) in compact representation; -- * N bytes: JPEG image. -- * -- * Data size is compactly represented in one, two or three bytes, according -- * to the following scheme: -- * -- * 0xxxxxxx (for values 0..127) -- * 1xxxxxxx 0yyyyyyy (for values 128..16383) -- * 1xxxxxxx 1yyyyyyy zzzzzzzz (for values 16384..4194303) -- * -- * Here each character denotes one bit, xxxxxxx are the least significant 7 -- * bits of the value (bits 0-6), yyyyyyy are bits 7-13, and zzzzzzzz are the -- * most significant 8 bits (bits 14-21). For example, decimal value 10000 -- * should be represented as two bytes: binary 10010000 01001110, or -- * hexadecimal 90 4E. -- * -- *-- If the compression type is "basic" and bit 6 of the compression control -- * byte was set to 1, then the next (second) byte specifies "filter id" which -- * tells the decoder what filter type was used by the encoder to pre-process -- * pixel data before the compression. The "filter id" byte can be one of the -- * following: -- * -- * 0: no filter ("copy" filter); -- * 1: "palette" filter; -- * 2: "gradient" filter. -- * -- *-- If bit 6 of the compression control byte is set to 0 (no "filter id" -- * byte), or if the filter id is 0, then raw pixel values in the client -- * format (see NOTE 1) will be compressed. See below details on the -- * compression. -- * -- *-- The "gradient" filter pre-processes pixel data with a simple algorithm -- * which converts each color component to a difference between a "predicted" -- * intensity and the actual intensity. Such a technique does not affect -- * uncompressed data size, but helps to compress photo-like images better. -- * Pseudo-code for converting intensities to differences is the following: -- * -- * P[i,j] := V[i-1,j] + V[i,j-1] - V[i-1,j-1]; -- * if (P[i,j] < 0) then P[i,j] := 0; -- * if (P[i,j] > MAX) then P[i,j] := MAX; -- * D[i,j] := V[i,j] - P[i,j]; -- * -- * Here V[i,j] is the intensity of a color component for a pixel at -- * coordinates (i,j). MAX is the maximum value of intensity for a color -- * component. -- * -- *-- The "palette" filter converts true-color pixel data to indexed colors -- * and a palette which can consist of 2..256 colors. If the number of colors -- * is 2, then each pixel is encoded in 1 bit, otherwise 8 bits is used to -- * encode one pixel. 1-bit encoding is performed such way that the most -- * significant bits correspond to the leftmost pixels, and each raw of pixels -- * is aligned to the byte boundary. When "palette" filter is used, the -- * palette is sent before the pixel data. The palette begins with an unsigned -- * byte which value is the number of colors in the palette minus 1 (i.e. 1 -- * means 2 colors, 255 means 256 colors in the palette). Then follows the -- * palette itself which consist of pixel values in client pixel format (see -- * NOTE 1). -- * -- *-- The pixel data is compressed using the zlib library. But if the data -- * size after applying the filter but before the compression is less then 12, -- * then the data is sent as is, uncompressed. Four separate zlib streams -- * (0..3) can be used and the decoder should read the actual stream id from -- * the compression control byte (see NOTE 2). -- * -- * If the compression is not used, then the pixel data is sent as is, -- * otherwise the data stream looks like this: -- * -- * 1..3 bytes: data size (N) in compact representation; -- * N bytes: zlib-compressed data. -- * -- * Data size is compactly represented in one, two or three bytes, just like -- * in the "jpeg" compression method (see above). -- * -- *-- NOTE 1. If the color depth is 24, and all three color components are -- * 8-bit wide, then one pixel in Tight encoding is always represented by -- * three bytes, where the first byte is red component, the second byte is -- * green component, and the third byte is blue component of the pixel color -- * value. This applies to colors in palettes as well. -- * -- *-- NOTE 2. The decoder must reset compression streams' states before -- * decoding the rectangle, if some of bits 0,1,2,3 in the compression control -- * byte are set to 1. Note that the decoder must reset zlib streams even if -- * the compression type is "fill" or "jpeg". -- * -- *-- NOTE 3. The "gradient" filter and "jpeg" compression may be used only -- * when bits-per-pixel value is either 16 or 32, not 8. -- * -- *-- NOTE 4. The width of any Tight-encoded rectangle cannot exceed 2048 -- * pixels. If a rectangle is wider, it must be split into several rectangles -- * and each one should be encoded separately. -- * -- */ -- --#define rfbTightExplicitFilter 0x04 --#define rfbTightFill 0x08 --#define rfbTightJpeg 0x09 --#define rfbTightMaxSubencoding 0x09 -- --/* Filters to improve compression efficiency */ --#define rfbTightFilterCopy 0x00 --#define rfbTightFilterPalette 0x01 --#define rfbTightFilterGradient 0x02 -- --#endif -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * XCursor encoding. This is a special encoding used to transmit X-style -- * cursor shapes from server to clients. Note that for this encoding, -- * coordinates in rfbFramebufferUpdateRectHeader structure hold hotspot -- * position (r.x, r.y) and cursor size (r.w, r.h). If (w * h != 0), two RGB -- * samples are sent after header in the rfbXCursorColors structure. They -- * denote foreground and background colors of the cursor. If a client -- * supports only black-and-white cursors, it should ignore these colors and -- * assume that foreground is black and background is white. Next, two bitmaps -- * (1 bits per pixel) follow: first one with actual data (value 0 denotes -- * background color, value 1 denotes foreground color), second one with -- * transparency data (bits with zero value mean that these pixels are -- * transparent). Both bitmaps represent cursor data in a byte stream, from -- * left to right, from top to bottom, and each row is byte-aligned. Most -- * significant bits correspond to leftmost pixels. The number of bytes in -- * each row can be calculated as ((w + 7) / 8). If (w * h == 0), cursor -- * should be hidden (or default local cursor should be set by the client). -- */ -- --typedef struct { -- uint8_t foreRed; -- uint8_t foreGreen; -- uint8_t foreBlue; -- uint8_t backRed; -- uint8_t backGreen; -- uint8_t backBlue; --} rfbXCursorColors; -- --#define sz_rfbXCursorColors 6 -- -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * RichCursor encoding. This is a special encoding used to transmit cursor -- * shapes from server to clients. It is similar to the XCursor encoding but -- * uses client pixel format instead of two RGB colors to represent cursor -- * image. For this encoding, coordinates in rfbFramebufferUpdateRectHeader -- * structure hold hotspot position (r.x, r.y) and cursor size (r.w, r.h). -- * After header, two pixmaps follow: first one with cursor image in current -- * client pixel format (like in raw encoding), second with transparency data -- * (1 bit per pixel, exactly the same format as used for transparency bitmap -- * in the XCursor encoding). If (w * h == 0), cursor should be hidden (or -- * default local cursor should be set by the client). -- */ -- -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * ZRLE - encoding combining Zlib compression, tiling, palettisation and -- * run-length encoding. -- */ -- --typedef struct { -- uint32_t length; --} rfbZRLEHeader; -- --#define sz_rfbZRLEHeader 4 -- --#define rfbZRLETileWidth 64 --#define rfbZRLETileHeight 64 -- -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * ZLIBHEX - zlib compressed Hextile Encoding. Essentially, this is the -- * hextile encoding with zlib compression on the tiles that can not be -- * efficiently encoded with one of the other hextile subencodings. The -- * new zlib subencoding uses two bytes to specify the length of the -- * compressed tile and then the compressed data follows. As with the -- * raw sub-encoding, the zlib subencoding invalidates the other -- * values, if they are also set. -- */ -- --#define rfbHextileZlibRaw (1 << 5) --#define rfbHextileZlibHex (1 << 6) --#define rfbHextileZlibMono (1 << 7) -- -- --/*----------------------------------------------------------------------------- -- * SetColourMapEntries - these messages are only sent if the pixel -- * format uses a "colour map" (i.e. trueColour false) and the client has not -- * fixed the entire colour map using FixColourMapEntries. In addition they -- * will only start being sent after the client has sent its first -- * FramebufferUpdateRequest. So if the client always tells the server to use -- * trueColour then it never needs to process this type of message. -- */ -- --typedef struct { -- uint8_t type; /* always rfbSetColourMapEntries */ -- uint8_t pad; -- uint16_t firstColour; -- uint16_t nColours; -- -- /* Followed by nColours * 3 * uint16_t -- r1, g1, b1, r2, g2, b2, r3, g3, b3, ..., rn, bn, gn */ -- --} rfbSetColourMapEntriesMsg; -- --#define sz_rfbSetColourMapEntriesMsg 6 -- -- -- --/*----------------------------------------------------------------------------- -- * Bell - ring a bell on the client if it has one. -- */ -- --typedef struct { -- uint8_t type; /* always rfbBell */ --} rfbBellMsg; -- --#define sz_rfbBellMsg 1 -- -- -- --/*----------------------------------------------------------------------------- -- * ServerCutText - the server has new text in its cut buffer. -- */ -- --typedef struct { -- uint8_t type; /* always rfbServerCutText */ -- uint8_t pad1; -- uint16_t pad2; -- uint32_t length; -- /* followed by char text[length] */ --} rfbServerCutTextMsg; -- --#define sz_rfbServerCutTextMsg 8 -- -- --/*----------------------------------------------------------------------------- -- * // Modif sf@2002 -- * FileTransferMsg - The client sends FileTransfer message. -- * Bidirectional message - Files can be sent from client to server & vice versa -- */ -- --typedef struct _rfbFileTransferMsg { -- uint8_t type; /* always rfbFileTransfer */ -- uint8_t contentType; /* See defines below */ -- uint8_t contentParam;/* Other possible content classification (Dir or File name, etc..) */ -- uint8_t pad; /* It appears that UltraVNC *forgot* to Swap16IfLE(contentParam) */ -- uint32_t size; /* FileSize or packet index or error or other */ --/* uint32_t sizeH; Additional 32Bits params to handle big values. Only for V2 (we want backward compatibility between all V1 versions) */ -- uint32_t length; -- /* followed by data char text[length] */ --} rfbFileTransferMsg; -- --#define sz_rfbFileTransferMsg 12 -- --#define rfbFileTransferVersion 2 /* v1 is the old FT version ( <= 1.0.0 RC18 versions) */ -- --/* FileTransfer Content types and Params defines */ --#define rfbDirContentRequest 1 /* Client asks for the content of a given Server directory */ --#define rfbDirPacket 2 /* Full directory name or full file name. */ -- /* Null content means end of Directory */ --#define rfbFileTransferRequest 3 /* Client asks the server for the transfer of a given file */ --#define rfbFileHeader 4 /* First packet of a file transfer, containing file's features */ --#define rfbFilePacket 5 /* One chunk of the file */ --#define rfbEndOfFile 6 /* End of file transfer (the file has been received or error) */ --#define rfbAbortFileTransfer 7 /* The file transfer must be aborted, whatever the state */ --#define rfbFileTransferOffer 8 /* The client offers to send a file to the server */ --#define rfbFileAcceptHeader 9 /* The server accepts or rejects the file */ --#define rfbCommand 10 /* The Client sends a simple command (File Delete, Dir create etc...) */ --#define rfbCommandReturn 11 /* The Client receives the server's answer about a simple command */ --#define rfbFileChecksums 12 /* The zipped checksums of the destination file (Delta Transfer) */ --#define rfbFileTransferAccess 14 /* Request FileTransfer authorization */ -- -- /* rfbDirContentRequest client Request - content params */ --#define rfbRDirContent 1 /* Request a Server Directory contents */ --#define rfbRDrivesList 2 /* Request the server's drives list */ --#define rfbRDirRecursiveList 3 /* Request a server directory content recursive sorted list */ --#define rfbRDirRecursiveSize 4 /* Request a server directory content recursive size */ -- -- /* rfbDirPacket & rfbCommandReturn server Answer - content params */ --#define rfbADirectory 1 /* Reception of a directory name */ --#define rfbAFile 2 /* Reception of a file name */ --#define rfbADrivesList 3 /* Reception of a list of drives */ --#define rfbADirCreate 4 /* Response to a create dir command */ --#define rfbADirDelete 5 /* Response to a delete dir command */ --#define rfbAFileCreate 6 /* Response to a create file command */ --#define rfbAFileDelete 7 /* Response to a delete file command */ --#define rfbAFileRename 8 /* Response to a rename file command */ --#define rfbADirRename 9 /* Response to a rename dir command */ --#define rfbADirRecursiveListItem 10 --#define rfbADirRecursiveSize 11 -- -- /* rfbCommand Command - content params */ --#define rfbCDirCreate 1 /* Request the server to create the given directory */ --#define rfbCDirDelete 2 /* Request the server to delete the given directory */ --#define rfbCFileCreate 3 /* Request the server to create the given file */ --#define rfbCFileDelete 4 /* Request the server to delete the given file */ --#define rfbCFileRename 5 /* Request the server to rename the given file */ --#define rfbCDirRename 6 /* Request the server to rename the given directory */ -- -- /* Errors - content params or "size" field */ --#define rfbRErrorUnknownCmd 1 /* Unknown FileTransfer command. */ --#define rfbRErrorCmd 0xFFFFFFFF/* Error when a command fails on remote side (ret in "size" field) */ -- --#define sz_rfbBlockSize 8192 /* Size of a File Transfer packet (before compression) */ --#define rfbZipDirectoryPrefix "!UVNCDIR-\0" /* Transfered directory are zipped in a file with this prefix. Must end with "-" */ --#define sz_rfbZipDirectoryPrefix 9 --#define rfbDirPrefix "[ " --#define rfbDirSuffix " ]" -- -- -- --/*----------------------------------------------------------------------------- -- * Modif sf@2002 -- * TextChatMsg - Utilized to order the TextChat mode on server or client -- * Bidirectional message -- */ -- --typedef struct _rfbTextChatMsg { -- uint8_t type; /* always rfbTextChat */ -- uint8_t pad1; /* Could be used later as an additionnal param */ -- uint16_t pad2; /* Could be used later as text offset, for instance */ -- uint32_t length; /* Specific values for Open, close, finished (-1, -2, -3) */ -- /* followed by char text[length] */ --} rfbTextChatMsg; -- --#define sz_rfbTextChatMsg 8 -- --#define rfbTextMaxSize 4096 --#define rfbTextChatOpen 0xFFFFFFFF --#define rfbTextChatClose 0xFFFFFFFE --#define rfbTextChatFinished 0xFFFFFFFD -- -- --/*----------------------------------------------------------------------------- -- * Xvp Message -- * Bidirectional message -- * A server which supports the xvp extension declares this by sending a message -- * with an Xvp_INIT xvp-message-code when it receives a request from the client -- * to use the xvp Pseudo-encoding. The server must specify in this message the -- * highest xvp-extension-version it supports: the client may assume that the -- * server supports all versions from 1 up to this value. The client is then -- * free to use any supported version. Currently, only version 1 is defined. -- * -- * A server which subsequently receives an xvp Client Message requesting an -- * operation which it is unable to perform, informs the client of this by -- * sending a message with an Xvp_FAIL xvp-message-code, and the same -- * xvp-extension-version as included in the client's operation request. -- * -- * A client supporting the xvp extension sends this to request that the server -- * initiate a clean shutdown, clean reboot or abrupt reset of the system whose -- * framebuffer the client is displaying. -- */ -- -- --typedef struct { -- uint8_t type; /* always rfbXvp */ -- uint8_t pad; -- uint8_t version; /* xvp extension version */ -- uint8_t code; /* xvp message code */ --} rfbXvpMsg; -- --#define sz_rfbXvpMsg (4) -- --/* server message codes */ --#define rfbXvp_Fail 0 --#define rfbXvp_Init 1 --/* client message codes */ --#define rfbXvp_Shutdown 2 --#define rfbXvp_Reboot 3 --#define rfbXvp_Reset 4 -- -- --/*----------------------------------------------------------------------------- -- * Modif sf@2002 -- * ResizeFrameBuffer - The Client must change the size of its framebuffer -- */ -- --typedef struct _rfbResizeFrameBufferMsg { -- uint8_t type; /* always rfbResizeFrameBuffer */ -- uint8_t pad1; -- uint16_t framebufferWidth; /* FrameBuffer width */ -- uint16_t framebufferHeigth; /* FrameBuffer height */ --} rfbResizeFrameBufferMsg; -- --#define sz_rfbResizeFrameBufferMsg 6 -- -- --/*----------------------------------------------------------------------------- -- * Copyright (C) 2001 Harakan Software -- * PalmVNC 1.4 & 2.? ResizeFrameBuffer message -- * ReSizeFrameBuffer - tell the RFB client to alter its framebuffer, either -- * due to a resize of the server desktop or a client-requested scaling factor. -- * The pixel format remains unchanged. -- */ -- --typedef struct { -- uint8_t type; /* always rfbReSizeFrameBuffer */ -- uint8_t pad1; -- uint16_t desktop_w; /* Desktop width */ -- uint16_t desktop_h; /* Desktop height */ -- uint16_t buffer_w; /* FrameBuffer width */ -- uint16_t buffer_h; /* Framebuffer height */ -- uint16_t pad2; -- --} rfbPalmVNCReSizeFrameBufferMsg; -- --#define sz_rfbPalmVNCReSizeFrameBufferMsg (12) -- -- -- -- --/*----------------------------------------------------------------------------- -- * Union of all server->client messages. -- */ -- --typedef union { -- uint8_t type; -- rfbFramebufferUpdateMsg fu; -- rfbSetColourMapEntriesMsg scme; -- rfbBellMsg b; -- rfbServerCutTextMsg sct; -- rfbResizeFrameBufferMsg rsfb; -- rfbPalmVNCReSizeFrameBufferMsg prsfb; -- rfbFileTransferMsg ft; -- rfbTextChatMsg tc; -- rfbXvpMsg xvp; --} rfbServerToClientMsg; -- -- -- --/*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- * RDV Cache Encoding. -- * special is not used at this point, can be used to reset cache or other specials -- * just put it to make sure we don't have to change the encoding again. -- */ -- --typedef struct { -- uint16_t special; --} rfbCacheRect; -- --#define sz_rfbCacheRect 2 -- -- -- -- --/***************************************************************************** -- * -- * Message definitions (client -> server) -- * -- *****************************************************************************/ -- -- --/*----------------------------------------------------------------------------- -- * SetPixelFormat - tell the RFB server the format in which the client wants -- * pixels sent. -- */ -- --typedef struct { -- uint8_t type; /* always rfbSetPixelFormat */ -- uint8_t pad1; -- uint16_t pad2; -- rfbPixelFormat format; --} rfbSetPixelFormatMsg; -- --#define sz_rfbSetPixelFormatMsg (sz_rfbPixelFormat + 4) -- -- --/*----------------------------------------------------------------------------- -- * FixColourMapEntries - when the pixel format uses a "colour map", fix -- * read-only colour map entries. -- * -- * ***************** NOT CURRENTLY SUPPORTED ***************** -- */ -- --typedef struct { -- uint8_t type; /* always rfbFixColourMapEntries */ -- uint8_t pad; -- uint16_t firstColour; -- uint16_t nColours; -- -- /* Followed by nColours * 3 * uint16_t -- r1, g1, b1, r2, g2, b2, r3, g3, b3, ..., rn, bn, gn */ -- --} rfbFixColourMapEntriesMsg; -- --#define sz_rfbFixColourMapEntriesMsg 6 -- -- --/*----------------------------------------------------------------------------- -- * SetEncodings - tell the RFB server which encoding types we accept. Put them -- * in order of preference, if we have any. We may always receive raw -- * encoding, even if we don't specify it here. -- */ -- --typedef struct { -- uint8_t type; /* always rfbSetEncodings */ -- uint8_t pad; -- uint16_t nEncodings; -- /* followed by nEncodings * uint32_t encoding types */ --} rfbSetEncodingsMsg; -- --#define sz_rfbSetEncodingsMsg 4 -- -- --/*----------------------------------------------------------------------------- -- * FramebufferUpdateRequest - request for a framebuffer update. If incremental -- * is true then the client just wants the changes since the last update. If -- * false then it wants the whole of the specified rectangle. -- */ -- --typedef struct { -- uint8_t type; /* always rfbFramebufferUpdateRequest */ -- uint8_t incremental; -- uint16_t x; -- uint16_t y; -- uint16_t w; -- uint16_t h; --} rfbFramebufferUpdateRequestMsg; -- --#define sz_rfbFramebufferUpdateRequestMsg 10 -- -- --/*----------------------------------------------------------------------------- -- * KeyEvent - key press or release -- * -- * Keys are specified using the "keysym" values defined by the X Window System. -- * For most ordinary keys, the keysym is the same as the corresponding ASCII -- * value. Other common keys are: -- * -- * BackSpace 0xff08 -- * Tab 0xff09 -- * Return or Enter 0xff0d -- * Escape 0xff1b -- * Insert 0xff63 -- * Delete 0xffff -- * Home 0xff50 -- * End 0xff57 -- * Page Up 0xff55 -- * Page Down 0xff56 -- * Left 0xff51 -- * Up 0xff52 -- * Right 0xff53 -- * Down 0xff54 -- * F1 0xffbe -- * F2 0xffbf -- * ... ... -- * F12 0xffc9 -- * Shift 0xffe1 -- * Control 0xffe3 -- * Meta 0xffe7 -- * Alt 0xffe9 -- */ -- --typedef struct { -- uint8_t type; /* always rfbKeyEvent */ -- uint8_t down; /* true if down (press), false if up */ -- uint16_t pad; -- uint32_t key; /* key is specified as an X keysym */ --} rfbKeyEventMsg; -- --#define sz_rfbKeyEventMsg 8 -- -- --/*----------------------------------------------------------------------------- -- * PointerEvent - mouse/pen move and/or button press. -- */ -- --typedef struct { -- uint8_t type; /* always rfbPointerEvent */ -- uint8_t buttonMask; /* bits 0-7 are buttons 1-8, 0=up, 1=down */ -- uint16_t x; -- uint16_t y; --} rfbPointerEventMsg; -- --#define rfbButton1Mask 1 --#define rfbButton2Mask 2 --#define rfbButton3Mask 4 --#define rfbButton4Mask 8 --#define rfbButton5Mask 16 --/* RealVNC 335 method */ --#define rfbWheelUpMask rfbButton4Mask --#define rfbWheelDownMask rfbButton5Mask -- --#define sz_rfbPointerEventMsg 6 -- -- -- --/*----------------------------------------------------------------------------- -- * ClientCutText - the client has new text in its cut buffer. -- */ -- --typedef struct { -- uint8_t type; /* always rfbClientCutText */ -- uint8_t pad1; -- uint16_t pad2; -- uint32_t length; -- /* followed by char text[length] */ --} rfbClientCutTextMsg; -- --#define sz_rfbClientCutTextMsg 8 -- -- -- --/*----------------------------------------------------------------------------- -- * sf@2002 - Set Server Scale -- * SetServerScale - Server must change the scale of the client buffer. -- */ -- --typedef struct _rfbSetScaleMsg { -- uint8_t type; /* always rfbSetScale */ -- uint8_t scale; /* Scale value 1server messages. -- */ -- --typedef union { -- uint8_t type; -- rfbSetPixelFormatMsg spf; -- rfbFixColourMapEntriesMsg fcme; -- rfbSetEncodingsMsg se; -- rfbFramebufferUpdateRequestMsg fur; -- rfbKeyEventMsg ke; -- rfbPointerEventMsg pe; -- rfbClientCutTextMsg cct; -- rfbSetScaleMsg ssc; -- rfbPalmVNCSetScaleFactorMsg pssf; -- rfbSetServerInputMsg sim; -- rfbFileTransferMsg ft; -- rfbSetSWMsg sw; -- rfbTextChatMsg tc; -- rfbXvpMsg xvp; --} rfbClientToServerMsg; -- --/* -- * vncauth.h - describes the functions provided by the vncauth library. -- */ -- --#define MAXPWLEN 8 --#define CHALLENGESIZE 16 -- --extern int rfbEncryptAndStorePasswd(char *passwd, char *fname); --extern char *rfbDecryptPasswdFromFile(char *fname); --extern void rfbRandomBytes(unsigned char *bytes); --extern void rfbEncryptBytes(unsigned char *bytes, char *passwd); -- -- --#endif -diff --git a/remmina-plugins/vnc/libvncserver/rfb/rfbregion.h b/remmina-plugins/vnc/libvncserver/rfb/rfbregion.h -deleted file mode 100644 -index 53da667..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfb/rfbregion.h -+++ /dev/null -@@ -1,65 +0,0 @@ --#ifndef SRAREGION_H --#define SRAREGION_H -- --/* -=- SRA - Simple Region Algorithm -- * A simple rectangular region implementation. -- * Copyright (c) 2001 James "Wez" Weatherall, Johannes E. Schindelin -- */ -- --/* -=- sraRect */ -- --typedef struct _rect { -- int x1; -- int y1; -- int x2; -- int y2; --} sraRect; -- --typedef struct sraRegion sraRegion; -- --/* -=- Region manipulation functions */ -- --extern sraRegion *sraRgnCreate(); --extern sraRegion *sraRgnCreateRect(int x1, int y1, int x2, int y2); --extern sraRegion *sraRgnCreateRgn(const sraRegion *src); -- --extern void sraRgnDestroy(sraRegion *rgn); --extern void sraRgnMakeEmpty(sraRegion *rgn); --extern rfbBool sraRgnAnd(sraRegion *dst, const sraRegion *src); --extern void sraRgnOr(sraRegion *dst, const sraRegion *src); --extern rfbBool sraRgnSubtract(sraRegion *dst, const sraRegion *src); -- --extern void sraRgnOffset(sraRegion *dst, int dx, int dy); -- --extern rfbBool sraRgnPopRect(sraRegion *region, sraRect *rect, -- unsigned long flags); -- --extern unsigned long sraRgnCountRects(const sraRegion *rgn); --extern rfbBool sraRgnEmpty(const sraRegion *rgn); -- --extern sraRegion *sraRgnBBox(const sraRegion *src); -- --/* -=- rectangle iterator */ -- --typedef struct sraRectangleIterator { -- rfbBool reverseX,reverseY; -- int ptrSize,ptrPos; -- struct sraSpan** sPtrs; --} sraRectangleIterator; -- --extern sraRectangleIterator *sraRgnGetIterator(sraRegion *s); --extern sraRectangleIterator *sraRgnGetReverseIterator(sraRegion *s,rfbBool reverseX,rfbBool reverseY); --extern rfbBool sraRgnIteratorNext(sraRectangleIterator *i,sraRect *r); --extern void sraRgnReleaseIterator(sraRectangleIterator *i); -- --void sraRgnPrint(const sraRegion *s); -- --/* -=- Rectangle clipper (for speed) */ -- --extern rfbBool sraClipRect(int *x, int *y, int *w, int *h, -- int cx, int cy, int cw, int ch); -- --extern rfbBool sraClipRect2(int *x, int *y, int *x2, int *y2, -- int cx, int cy, int cx2, int cy2); -- --#endif -diff --git a/remmina-plugins/vnc/libvncserver/rfbconfig.h.in b/remmina-plugins/vnc/libvncserver/rfbconfig.h.in -deleted file mode 100644 -index cdd322b..0000000 ---- a/remmina-plugins/vnc/libvncserver/rfbconfig.h.in -+++ /dev/null -@@ -1,420 +0,0 @@ --/* rfbconfig.h.in. Generated from configure.ac by autoheader. */ -- --/* Define if building universal (internal helper macro) */ --#undef AC_APPLE_UNIVERSAL_BUILD -- --/* Enable 24 bit per pixel in native framebuffer */ --#undef ALLOW24BPP -- --/* work around when write() returns ENOENT but does not mean it */ --#undef ENOENT_WORKAROUND -- --/* Use ffmpeg (for vnc2mpg) */ --#undef FFMPEG -- --/* Define to 1 if you have the header file. */ --#undef HAVE_ARPA_INET_H -- --/* Avahi/mDNS client build environment present */ --#undef HAVE_AVAHI -- --/* Define to 1 if you have the `crypt' function. */ --#undef HAVE_CRYPT -- --/* Define to 1 if you have the header file. */ --#undef HAVE_DLFCN_H -- --/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ --#undef HAVE_DOPRNT -- --/* DPMS extension build environment present */ --#undef HAVE_DPMS -- --/* FBPM extension build environment present */ --#undef HAVE_FBPM -- --/* Define to 1 if you have the header file. */ --#undef HAVE_FCNTL_H -- --/* Define to 1 if you have the `fork' function. */ --#undef HAVE_FORK -- --/* Define to 1 if you have the `ftime' function. */ --#undef HAVE_FTIME -- --/* Define to 1 if you have the `geteuid' function. */ --#undef HAVE_GETEUID -- --/* Define to 1 if you have the `gethostbyname' function. */ --#undef HAVE_GETHOSTBYNAME -- --/* Define to 1 if you have the `gethostname' function. */ --#undef HAVE_GETHOSTNAME -- --/* Define to 1 if you have the `getpwnam' function. */ --#undef HAVE_GETPWNAM -- --/* Define to 1 if you have the `getpwuid' function. */ --#undef HAVE_GETPWUID -- --/* Define to 1 if you have the `getspnam' function. */ --#undef HAVE_GETSPNAM -- --/* Define to 1 if you have the `gettimeofday' function. */ --#undef HAVE_GETTIMEOFDAY -- --/* Define to 1 if you have the `getuid' function. */ --#undef HAVE_GETUID -- --/* Define to 1 if you have the `grantpt' function. */ --#undef HAVE_GRANTPT -- --/* Define to 1 if you have the `inet_ntoa' function. */ --#undef HAVE_INET_NTOA -- --/* Define to 1 if you have the `initgroups' function. */ --#undef HAVE_INITGROUPS -- --/* Define to 1 if you have the header file. */ --#undef HAVE_INTTYPES_H -- --/* IRIX XReadDisplay available */ --#undef HAVE_IRIX_XREADDISPLAY -- --/* libcrypt library present */ --#undef HAVE_LIBCRYPT -- --/* openssl libcrypto library present */ --#undef HAVE_LIBCRYPTO -- --/* Define to 1 if you have the `cygipc' library (-lcygipc). */ --#undef HAVE_LIBCYGIPC -- --/* Define to 1 if you have the `jpeg' library (-ljpeg). */ --#undef HAVE_LIBJPEG -- --/* Define to 1 if you have the `nsl' library (-lnsl). */ --#undef HAVE_LIBNSL -- --/* Define to 1 if you have the `pthread' library (-lpthread). */ --#undef HAVE_LIBPTHREAD -- --/* Define to 1 if you have the `socket' library (-lsocket). */ --#undef HAVE_LIBSOCKET -- --/* openssl libssl library present */ --#undef HAVE_LIBSSL -- --/* XDAMAGE extension build environment present */ --#undef HAVE_LIBXDAMAGE -- --/* XFIXES extension build environment present */ --#undef HAVE_LIBXFIXES -- --/* XINERAMA extension build environment present */ --#undef HAVE_LIBXINERAMA -- --/* XRANDR extension build environment present */ --#undef HAVE_LIBXRANDR -- --/* DEC-XTRAP extension build environment present */ --#undef HAVE_LIBXTRAP -- --/* Define to 1 if you have the `z' library (-lz). */ --#undef HAVE_LIBZ -- --/* linux fb device build environment present */ --#undef HAVE_LINUX_FB_H -- --/* linux/input.h present */ --#undef HAVE_LINUX_INPUT_H -- --/* linux uinput device build environment present */ --#undef HAVE_LINUX_UINPUT_H -- --/* video4linux build environment present */ --#undef HAVE_LINUX_VIDEODEV_H -- --/* build MacOS X native display support */ --#undef HAVE_MACOSX_NATIVE_DISPLAY -- --/* MacOS X OpenGL present */ --#undef HAVE_MACOSX_OPENGL_H -- --/* Define to 1 if you have the `memmove' function. */ --#undef HAVE_MEMMOVE -- --/* Define to 1 if you have the header file. */ --#undef HAVE_MEMORY_H -- --/* Define to 1 if you have the `memset' function. */ --#undef HAVE_MEMSET -- --/* Define to 1 if you have the `mkfifo' function. */ --#undef HAVE_MKFIFO -- --/* Define to 1 if you have the `mmap' function. */ --#undef HAVE_MMAP -- --/* Define to 1 if you have the header file. */ --#undef HAVE_NETDB_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_NETINET_IN_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_PWD_H -- --/* RECORD extension build environment present */ --#undef HAVE_RECORD -- --/* Define to 1 if you have the `select' function. */ --#undef HAVE_SELECT -- --/* Define to 1 if you have the `setegid' function. */ --#undef HAVE_SETEGID -- --/* Define to 1 if you have the `seteuid' function. */ --#undef HAVE_SETEUID -- --/* Define to 1 if you have the `setgid' function. */ --#undef HAVE_SETGID -- --/* Define to 1 if you have the `setpgrp' function. */ --#undef HAVE_SETPGRP -- --/* Define to 1 if you have the `setsid' function. */ --#undef HAVE_SETSID -- --/* Define to 1 if you have the `setuid' function. */ --#undef HAVE_SETUID -- --/* Define to 1 if you have the `setutxent' function. */ --#undef HAVE_SETUTXENT -- --/* Define to 1 if you have the `shmat' function. */ --#undef HAVE_SHMAT -- --/* Define to 1 if you have the `socket' function. */ --#undef HAVE_SOCKET -- --/* Solaris XReadScreen available */ --#undef HAVE_SOLARIS_XREADSCREEN -- --/* Define to 1 if `stat' has the bug that it succeeds when given the -- zero-length file name argument. */ --#undef HAVE_STAT_EMPTY_STRING_BUG -- --/* Define to 1 if you have the header file. */ --#undef HAVE_STDINT_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_STDLIB_H -- --/* Define to 1 if you have the `strchr' function. */ --#undef HAVE_STRCHR -- --/* Define to 1 if you have the `strcspn' function. */ --#undef HAVE_STRCSPN -- --/* Define to 1 if you have the `strdup' function. */ --#undef HAVE_STRDUP -- --/* Define to 1 if you have the `strerror' function. */ --#undef HAVE_STRERROR -- --/* Define to 1 if you have the `strftime' function. */ --#undef HAVE_STRFTIME -- --/* Define to 1 if you have the header file. */ --#undef HAVE_STRINGS_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_STRING_H -- --/* Define to 1 if you have the `strstr' function. */ --#undef HAVE_STRSTR -- --/* Define to 1 if you have the header file. */ --#undef HAVE_SYSLOG_H -- --/* Use the system libvncserver build environment for x11vnc. */ --#undef HAVE_SYSTEM_LIBVNCSERVER -- --/* Define to 1 if you have the header file. */ --#undef HAVE_SYS_IOCTL_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_SYS_SOCKET_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_SYS_STAT_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_SYS_STROPTS_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_SYS_TIMEB_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_SYS_TIME_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_SYS_TYPES_H -- --/* Define to 1 if you have that is POSIX.1 compatible. */ --#undef HAVE_SYS_WAIT_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_TERMIOS_H -- --/* Define to 1 if compiler supports __thread */ --#undef HAVE_TLS -- --/* Define to 1 if you have the header file. */ --#undef HAVE_UNISTD_H -- --/* Define to 1 if you have the header file. */ --#undef HAVE_UTMPX_H -- --/* Define to 1 if you have the `vfork' function. */ --#undef HAVE_VFORK -- --/* Define to 1 if you have the header file. */ --#undef HAVE_VFORK_H -- --/* Define to 1 if you have the `vprintf' function. */ --#undef HAVE_VPRINTF -- --/* Define to 1 if you have the `waitpid' function. */ --#undef HAVE_WAITPID -- --/* Define to 1 if `fork' works. */ --#undef HAVE_WORKING_FORK -- --/* Define to 1 if `vfork' works. */ --#undef HAVE_WORKING_VFORK -- --/* Define to 1 if you have the header file. */ --#undef HAVE_WS2TCPIP_H -- --/* X11 build environment present */ --#undef HAVE_X11 -- --/* open ssl X509_print_ex_fp available */ --#undef HAVE_X509_PRINT_EX_FP -- --/* XKEYBOARD extension build environment present */ --#undef HAVE_XKEYBOARD -- --/* MIT-SHM extension build environment present */ --#undef HAVE_XSHM -- --/* XTEST extension build environment present */ --#undef HAVE_XTEST -- --/* XTEST extension has XTestGrabControl */ --#undef HAVE_XTESTGRABCONTROL -- --/* Enable IPv6 support */ --#undef IPv6 -- --/* Define to 1 if `lstat' dereferences a symlink specified with a trailing -- slash. */ --#undef LSTAT_FOLLOWS_SLASHED_SYMLINK -- --/* Need a typedef for in_addr_t */ --#undef NEED_INADDR_T -- --/* Define to 1 if your C compiler doesn't accept -c and -o together. */ --#undef NO_MINUS_C_MINUS_O -- --/* Name of package */ --#undef PACKAGE -- --/* Define to the address where bug reports for this package should be sent. */ --#undef PACKAGE_BUGREPORT -- --/* Define to the full name of this package. */ --#undef PACKAGE_NAME -- --/* Define to the full name and version of this package. */ --#undef PACKAGE_STRING -- --/* Define to the one symbol short name of this package. */ --#undef PACKAGE_TARNAME -- --/* Define to the home page for this package. */ --#undef PACKAGE_URL -- --/* Define to the version of this package. */ --#undef PACKAGE_VERSION -- --/* The number of bytes in type char */ --#undef SIZEOF_CHAR -- --/* The number of bytes in type int */ --#undef SIZEOF_INT -- --/* The number of bytes in type long */ --#undef SIZEOF_LONG -- --/* The number of bytes in type short */ --#undef SIZEOF_SHORT -- --/* The number of bytes in type void* */ --#undef SIZEOF_VOIDP -- --/* Define to 1 if you have the ANSI C header files. */ --#undef STDC_HEADERS -- --/* Define to 1 if you can safely include both and . */ --#undef TIME_WITH_SYS_TIME -- --/* Version number of package */ --#undef VERSION -- --/* Enable support for libgcrypt in libvncclient */ --#undef WITH_CLIENT_GCRYPT -- --/* Enable support for gnutls in libvncclient */ --#undef WITH_CLIENT_TLS -- --/* Disable TightVNCFileTransfer protocol */ --#undef WITH_TIGHTVNC_FILETRANSFER -- --/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most -- significant byte first (like Motorola and SPARC, unlike Intel). */ --#if defined AC_APPLE_UNIVERSAL_BUILD --# if defined __BIG_ENDIAN__ --# define WORDS_BIGENDIAN 1 --# endif --#else --# ifndef WORDS_BIGENDIAN --# undef WORDS_BIGENDIAN --# endif --#endif -- --/* Define to 1 if the X Window System is missing or not being used. */ --#undef X_DISPLAY_MISSING -- --/* Define to empty if `const' does not conform to ANSI C. */ --#undef const -- --/* Define to `__inline__' or `__inline' if that's what the C compiler -- calls it, or to nothing if 'inline' is not supported under any name. */ --#ifndef __cplusplus --#undef inline --#endif -- --/* Define to `int' if does not define. */ --#undef pid_t -- --/* Define to `unsigned int' if does not define. */ --#undef size_t -- --/* The type for socklen */ --#undef socklen_t -- --/* Define as `fork' if `vfork' does not work. */ --#undef vfork diff --git a/remmina-1.0.0-some-more-clipboard-fixes.patch b/remmina-1.0.0-some-more-clipboard-fixes.patch deleted file mode 100644 index acac772..0000000 --- a/remmina-1.0.0-some-more-clipboard-fixes.patch +++ /dev/null @@ -1,180 +0,0 @@ -From 84327f81995b4efe56503b94216e35eb9e99f243 Mon Sep 17 00:00:00 2001 -From: Jean-Louis Dupond -Date: Thu, 3 May 2012 15:25:02 +0200 -Subject: [PATCH] Some more clipboard fixes - ---- - remmina-plugins/rdp/rdp_cliprdr.c | 68 ++++++++++++++++++++++--------------- - remmina-plugins/rdp/rdp_plugin.c | 9 +++-- - remmina-plugins/rdp/rdp_plugin.h | 2 +- - 3 files changed, 48 insertions(+), 31 deletions(-) - -diff --git a/remmina-plugins/rdp/rdp_cliprdr.c b/remmina-plugins/rdp/rdp_cliprdr.c -index b9b37ad..1424ac9 100644 ---- a/remmina-plugins/rdp/rdp_cliprdr.c -+++ b/remmina-plugins/rdp/rdp_cliprdr.c -@@ -204,7 +204,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - g_printf("GetData: Requested Format: %#X\n", format); - rfContext* rfi = GET_DATA(gp); - GtkClipboard* clipboard; -- uint8* inbuf = NULL; -+ uint8* inbuf = (uint8*)""; - uint8* outbuf = NULL; - GdkPixbuf *image = NULL; - -@@ -225,6 +225,8 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - - if (format == CB_FORMAT_TEXT || format == CB_FORMAT_HTML || format == CB_FORMAT_UNICODETEXT) - { -+ if (inbuf == NULL) -+ inbuf = (uint8*)""; - inbuf = lf2crlf(inbuf, size); - if (format == CB_FORMAT_TEXT) - { -@@ -243,6 +245,7 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - uniconv = freerdp_uniconv_new(); - outbuf = (uint8*) freerdp_uniconv_out(uniconv, (char*) inbuf, &out_size); - freerdp_uniconv_free(uniconv); -+ g_free(inbuf); - *size = out_size + 2; - } - } -@@ -253,11 +256,13 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - if (format == CB_FORMAT_PNG) - { - gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "png", NULL, NULL); -+ outbuf = (uint8*) xmalloc(buffersize); - memcpy(outbuf, data, buffersize); - } - if (format == CB_FORMAT_JPEG) - { - gdk_pixbuf_save_to_buffer(image, &data, &buffersize, "jpeg", NULL, NULL); -+ outbuf = (uint8*) xmalloc(buffersize); - memcpy(outbuf, data, buffersize); - } - if (format == CB_FORMAT_DIB) -@@ -268,13 +273,9 @@ uint8* remmina_rdp_cliprdr_get_data(RemminaProtocolWidget* gp, uint32 format, in - outbuf = (uint8*) xmalloc(*size); - memcpy(outbuf, data + 14, *size); - } -+ g_object_unref(image); - } - -- if (inbuf) -- g_free(inbuf); -- if (G_IS_OBJECT(image)) -- g_object_unref(image); -- - if (!outbuf) - outbuf = (uint8*)""; - -@@ -357,7 +358,10 @@ void remmina_rdp_cliprdr_parse_response_event(RemminaProtocolWidget* gp, RDP_EVE - if (clipboard) - { - if (text || img) -- rfi->clipboard_wait = TRUE; -+ { -+ rfi->clipboard_wait = 2; -+ g_printf("Setting Clipboard Wait\n"); -+ } - if (text) - { - gtk_clipboard_set_text(clipboard, (gchar*)data, size); -@@ -404,31 +408,39 @@ void remmina_handle_channel_event(RemminaProtocolWidget* gp, RDP_EVENT* event) - for (i = 0; i < format_list_event->num_formats; i++) - { - g_printf("Format: 0x%X\n", format_list_event->formats[i]); -- if (format_list_event->formats[i] == CB_FORMAT_UNICODETEXT) -- { -- format = CB_FORMAT_UNICODETEXT; -- break; -- } -- if (format_list_event->formats[i] == CB_FORMAT_DIB) -- { -- format = CB_FORMAT_DIB; -- break; -- } -- if (format_list_event->formats[i] == CB_FORMAT_JPEG) -+ } -+ -+ for (i = 0; i < format_list_event->num_formats; i++) -+ { -+ g_printf("Format: 0x%X\n", format_list_event->formats[i]); -+ if (format_list_event->formats[i] > format) - { -- format = CB_FORMAT_JPEG; -- break; -+ g_printf("Format 0x%X is bigger!\n", format_list_event->formats[i]); -+ if (format_list_event->formats[i] == CB_FORMAT_UNICODETEXT) -+ { -+ format = CB_FORMAT_UNICODETEXT; -+ } -+ if (format_list_event->formats[i] == CB_FORMAT_DIB) -+ { -+ format = CB_FORMAT_DIB; -+ } -+ if (format_list_event->formats[i] == CB_FORMAT_JPEG) -+ { -+ format = CB_FORMAT_JPEG; -+ } -+ if (format_list_event->formats[i] == CB_FORMAT_PNG) -+ { -+ format = CB_FORMAT_PNG; -+ } -+ if (format_list_event->formats[i] == CB_FORMAT_TEXT) -+ { -+ format = CB_FORMAT_TEXT; -+ } - } -- if (format_list_event->formats[i] == CB_FORMAT_PNG) -+ else - { -- format = CB_FORMAT_PNG; -- break; -+ g_printf("Format 0x%X is smaller!\n", format_list_event->formats[i]); - } -- if (format_list_event->formats[i] == CB_FORMAT_TEXT) -- { -- format = CB_FORMAT_TEXT; -- break; -- } - } - rfi->requested_format = format; - -diff --git a/remmina-plugins/rdp/rdp_plugin.c b/remmina-plugins/rdp/rdp_plugin.c -index fd0fe08..3c7fc0a 100644 ---- a/remmina-plugins/rdp/rdp_plugin.c -+++ b/remmina-plugins/rdp/rdp_plugin.c -@@ -158,9 +158,14 @@ boolean rf_check_fds(RemminaProtocolWidget* gp) - event->mouse_event.x, event->mouse_event.y); - break; - case REMMINA_RDP_EVENT_TYPE_CLIPBOARD: -- if (!rfi->clipboard_wait) -+ if (rfi->clipboard_wait <= 0) -+ { - remmina_rdp_cliprdr_send_format_list_event(gp); -- rfi->clipboard_wait = FALSE; -+ g_printf("Clipboard Wait ON\n"); -+ rfi->clipboard_wait = 0; -+ } -+ g_printf("Setting Clipboard Wait To FALSE\n"); -+ rfi->clipboard_wait--; - break; - } - -diff --git a/remmina-plugins/rdp/rdp_plugin.h b/remmina-plugins/rdp/rdp_plugin.h -index 1931384..ff66906 100644 ---- a/remmina-plugins/rdp/rdp_plugin.h -+++ b/remmina-plugins/rdp/rdp_plugin.h -@@ -134,7 +134,7 @@ struct rf_context - GAsyncQueue* event_queue; - gint event_pipe[2]; - -- gboolean clipboard_wait; -+ gint clipboard_wait; - uint32 requested_format; - }; - --- -1.7.10 - diff --git a/remmina-1.0.0-trayicon-patch b/remmina-1.0.0-trayicon-patch deleted file mode 100644 index d940dbd..0000000 --- a/remmina-1.0.0-trayicon-patch +++ /dev/null @@ -1,53 +0,0 @@ -From cb0b209b775e08b0529786d18079437a58398621 Mon Sep 17 00:00:00 2001 -From: Rex Tsai -Date: Wed, 7 Mar 2012 16:44:01 +0800 -Subject: [PATCH] Add --icon/-i option, contributed by Whoopie. fixed #14 - -Signed-off-by: Rex Tsai ---- - remmina/src/remmina.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/remmina/src/remmina.c b/remmina/src/remmina.c -index 2a9c74b..c121880 100644 ---- a/remmina/src/remmina.c -+++ b/remmina/src/remmina.c -@@ -55,6 +55,7 @@ - static gboolean remmina_option_quit; - static gchar *remmina_option_server; - static gchar *remmina_option_protocol; -+static gboolean remmina_option_icon; - - static GOptionEntry remmina_options[] = - { -@@ -68,6 +69,7 @@ - { "quit", 'q', 0, G_OPTION_ARG_NONE, &remmina_option_quit, "Quit the application", NULL }, - { "server", 's', 0, G_OPTION_ARG_STRING, &remmina_option_server, "Use default server name S", "S" }, - { "protocol", 't', 0, G_OPTION_ARG_STRING, &remmina_option_protocol, "Use default protocol T", "T" }, -+{ "icon", 'i', 0, G_OPTION_ARG_NONE, &remmina_option_icon, "Start as tray icon", NULL }, - { NULL } }; - - static gint remmina_on_command_line(GApplication *app, GApplicationCommandLine *cmdline) -@@ -90,6 +92,7 @@ static gint remmina_on_command_line(GApplication *app, GApplicationCommandLine * - remmina_option_plugin = NULL; - remmina_option_server = NULL; - remmina_option_protocol = NULL; -+ remmina_option_icon = FALSE; - - argv = g_application_command_line_get_arguments(cmdline, &argc); - -@@ -157,6 +160,11 @@ static gint remmina_on_command_line(GApplication *app, GApplicationCommandLine * - remmina_exec_command(REMMINA_COMMAND_PLUGIN, remmina_option_plugin); - executed = TRUE; - } -+ if (remmina_option_icon) -+ { -+ remmina_exec_command(REMMINA_COMMAND_NONE, remmina_option_icon); -+ executed = TRUE; -+ } - if (!executed) - { - remmina_exec_command(REMMINA_COMMAND_MAIN, NULL); --- -1.8.1.6 - diff --git a/remmina.spec b/remmina.spec index d43138b..8fb7b40 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,77 +1,22 @@ # Review at https://bugzilla.redhat.com/show_bug.cgi?id=553402 +# https://fedoraproject.org/wiki/Packaging:SourceURL#Github +%global commit 26b814aec6e930746d079c885449dd50d3484fb0 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + Name: remmina -Version: 1.0.0 -Release: 10%{?dist} +Version: 1.1.0 +Release: 0.1%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client Group: Applications/Internet License: GPLv2+ and MIT URL: http://remmina.sourceforge.net -Source0: https://github.com/downloads/FreeRDP/Remmina/Remmina-%{version}.tar.gz #VCS: git:https://github.com/FreeRDP/Remmina.git - -# The following two patches will fix some linking errors -# https://github.com/FreeRDP/Remmina/commit/503a008e -Patch0: remmina-1.0.0-fix-library-name.patch -# https://github.com/FreeRDP/Remmina/commit/13f20367 -Patch1: remmina-1.0.0-linker-error.patch - -# The following 4 patches are needed to add clipboard support (#818155) -# https://github.com/FreeRDP/Remmina/commit/3ebdd6e7 -Patch2: remmina-1.0.0-add-clipboard-support.patch -# https://github.com/FreeRDP/Remmina/commit/97c2af8c -Patch3: remmina-1.0.0-clipboard-bugfix.patch -# https://github.com/FreeRDP/Remmina/commit/84327f81 -Patch4: remmina-1.0.0-some-more-clipboard-fixes.patch -# https://github.com/FreeRDP/Remmina/commit/c1ef3a16 -Patch5: remmina-1.0.0-disconnect-signal-handler-after-disconnect.patch - -# https://github.com/FreeRDP/Remmina/commit/6ee20289 -Patch10: remmina-1.0.0-fix-crashes-in-some-cases.patch -# https://github.com/FreeRDP/Remmina/commit/b2277827 -Patch11: remmina-1.0.0-fix-memory-leak.patch - -# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=953678 -# upstream bug: https://github.com/FreeRDP/Remmina/issues/63 -# upstream fix: https://github.com/FreeRDP/Remmina/commit/1901a1e9 -Patch12: remmina-1.0.0-fix-typo-when-fitting-window.patch - -# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=834883 -# upstream bug: https://github.com/FreeRDP/Remmina/issues/76 -# upstream fix: https://github.com/FreeRDP/Remmina/commit/1901a1e9 -Patch13: remmina-1.0.0-trayicon-patch - -# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=830210 -# upstream fix: https://github.com/FreeRDP/Remmina/commit/ -Patch14: remmina-1.0.0-fix-scrolling-in-vnc-plugin.patch -# upstream fix: https://github.com/FreeRDP/Remmina/commit/fe1b698e -Patch15: remmina-1.0.0-Also-handle-GDK_SCROLL_SMOOTH.patch - -# upstream bug: https://github.com/FreeRDP/Remmina/issues/77 -# upstream fix: https://github.com/FreeRDP/Remmina/commit/bed49ad6 -Patch16: remmina-1.0.0-close-SSH-tunnel-on-disconnect.patch - -# Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=864262 -# upstream fix: https://github.com/FreeRDP/Remmina/commit/348e01d2 -Patch17: remmina-1.0.0-fix-fullscreen-with-multiple-monitors.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=819976 -Patch30: remmina-1.0.0-dsofix.patch - -# From OpenSUSE. All patches are backport from upstream. -# Thanks to Guido Berhoerster -Patch31: remmina-1.0.0-fix-desktop-file.patch -Patch32: remmina-1.0.0-fix-install-paths.patch - -# From Debian. Thanks to Luca Falavigna -Patch35: remmina-1.0.0-remove-inline-libvncserver.patch - - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{commit}.tar.gz BuildRequires: gtk3-devel -BuildRequires: libssh-devel >= 0.4. +BuildRequires: libssh-devel >= 0.4 BuildRequires: libgcrypt-devel BuildRequires: avahi-ui-devel BuildRequires: vte3-devel @@ -101,8 +46,8 @@ Obsoletes: xfce4-remmina-plugin <= 0.7.3 %description -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. Remmina supports multiple network protocols in an integrated and consistent @@ -118,7 +63,7 @@ Requires: %{name} = %{version}-%{release} Requires: pkgconfig %description devel -The %{name}-devel package contains header files for developing plugins for +The %{name}-devel package contains header files for developing plugins for %{name}. @@ -130,8 +75,8 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Requires: libgnome-keyring %description plugins-gnome -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. This package contains the plugin with GNOME keyring support for the Remmina @@ -147,8 +92,8 @@ Obsoletes: qtnx < 0.9-17 Provides: qtnx = 0.9-17 %description plugins-nx -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. This package contains the NX plugin for the Remmina remote desktop client. @@ -157,13 +102,13 @@ This package contains the NX plugin for the Remmina remote desktop client. %package plugins-rdp Summary: RDP plugin for Remmina Remote Desktop Client Group: Applications/System -BuildRequires: freerdp-devel +BuildRequires: freerdp-devel >= 1.2.0 Requires: %{name}%{?_isa} = %{version}-%{release} Requires: freerdp %description plugins-rdp -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. This package contains the Remote Desktop Protocol (RDP) plugin for the Remmina @@ -177,11 +122,11 @@ BuildRequires: telepathy-glib-devel Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-telepathy -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. -This package contains the Telepathy plugin for the Remmina remote desktop +This package contains the Telepathy plugin for the Remmina remote desktop client. @@ -194,11 +139,11 @@ BuildRequires: libvncserver-devel Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-vnc -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. -This package contains the VNC plugin for the Remmina remote desktop +This package contains the VNC plugin for the Remmina remote desktop client. @@ -209,47 +154,16 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Requires: xorg-x11-server-Xephyr %description plugins-xdmcp -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny netbooks. -This package contains the XDMCP plugin for the Remmina remote desktop +This package contains the XDMCP plugin for the Remmina remote desktop client. %prep -%setup -qn FreeRDP-Remmina-356c033 - -%patch0 -p1 -b .fix-library-name -%patch1 -p1 -b .linker-error - -%patch2 -p1 -b .add-clipboard-support -%patch3 -p1 -b .clipboard-bugfix -%patch4 -p1 -b .some-more-clipboard-fixes -%patch5 -p1 -b .disconnect-signal-handler - -%patch10 -p1 -b .fix-crashes-in-some-cases -%patch11 -p1 -b .fix-memory-leak - -%patch12 -p1 -b .fitting-window - -%patch13 -p1 -b .trayicon - -%patch14 -p1 -b .vnc-scrolling - -%patch15 -p1 -b .GDK_SCROLL_SMOOTH - -%patch16 -p1 -b .ssh-disconnect - -%patch17 -p1 -b .multiple-monitors - -%patch30 -p0 -b .dsofix -%patch31 -p1 -b .desktop-file -%patch32 -p1 -b .install-paths - - -%patch35 -p1 -b .libvncserver - +%setup -qn Remmina-%{commit} %build mkdir -p build @@ -281,23 +195,19 @@ make %{?_smp_mflags} popd %install -rm -rf %{buildroot} make install/fast DESTDIR=%{buildroot} -C build desktop-file-install --vendor="" --delete-original \ --add-category="RemoteAccess" \ --remove-category="X-GNOME-NetworkSettings" \ - --remove-key="Actions" \ --dir %{buildroot}%{_datadir}/applications \ %{buildroot}/%{_datadir}/applications/%{name}.desktop %find_lang %{name} %find_lang %{name}-plugins - -%clean -rm -rf %{buildroot} - +# Remove strange external_tools +rm -rf %{buildroot}/$HOME/.%{name} %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -363,9 +273,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang -f %{name}-plugins.lang -%defattr(-,root,root,-) -# FIXME: Add NEWS if not empty -%doc remmina/AUTHORS remmina/ChangeLog remmina/COPYING README +%doc AUTHORS ChangeLog COPYING README %{_bindir}/%{name} %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/*/*.* @@ -373,46 +281,48 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %dir %{_libdir}/remmina/plugins/ %files devel -%defattr(-,root,root,-) %doc %{_includedir}/%{name}/ %{_libdir}/pkgconfig/%{name}.pc %files plugins-gnome -%defattr(-,root,root,-) %{_libdir}/remmina/plugins/remmina-plugins-gnome.so %files plugins-nx -%defattr(-,root,root,-) %{_libdir}/remmina/plugins/remmina-plugin-nx.so %{_datadir}/icons/hicolor/*/emblems/remmina-nx.png %files plugins-rdp -%defattr(-,root,root,-) %{_libdir}/remmina/plugins/remmina-plugin-rdp.so %{_datadir}/icons/hicolor/*/emblems/remmina-rdp-ssh.png %{_datadir}/icons/hicolor/*/emblems/remmina-rdp.png %files plugins-telepathy -%defattr(-,root,root,-) %{_libdir}/remmina/plugins/remmina-plugin-telepathy.so #%{_datadir}/dbus-1/services/org.freedesktop.Telepathy.Client.Remmina.service #%{_datadir}/telepathy/clients/Remmina.client %files plugins-vnc -%defattr(-,root,root,-) %{_libdir}/remmina/plugins/remmina-plugin-vnc.so %{_datadir}/icons/hicolor/*/emblems/remmina-vnc-ssh.png %{_datadir}/icons/hicolor/*/emblems/remmina-vnc.png %files plugins-xdmcp -%defattr(-,root,root,-) %{_libdir}/remmina/plugins/remmina-plugin-xdmcp.so %{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp-ssh.png %{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp.png %changelog +* Mon May 19 2014 Pavel Alexeev - 1.1.0-0.1.git.26b814a +- Try build master branch with new freerdp 1.2 in rawhide (https://github.com/FreeRDP/Remmina/issues/193) +- Some spec cleanup. +- Drop all patches. +- Fix desktop file installation, remove --remove-key="Actions" option. +- Fix %%doc files path. +- Drop strange external_tools installed in $HOME/.remmina +- Bump BuildRequires: freerdp-devel to version >= 1.2.0 + * Thu Apr 24 2014 Tomáš Mráz - 1.0.0-10 - Rebuild for new libgcrypt diff --git a/sources b/sources index c37d06c..b4c9e67 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -701c540acaab961bc3adf130a2ddb8b1 Remmina-1.0.0.tar.gz +d7875e50f21f7d0f2e86527375da6755 Remmina-26b814aec6e930746d079c885449dd50d3484fb0.tar.gz From 35ef096b87ee5b9d4ce44ac21c7b156e14460458 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 23 May 2014 09:40:14 +0200 Subject: [PATCH 034/185] Remove duplicate BuildRequires --- remmina.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/remmina.spec b/remmina.spec index 8fb7b40..a8efa00 100644 --- a/remmina.spec +++ b/remmina.spec @@ -133,9 +133,6 @@ client. %package plugins-vnc Summary: VNC plugin for Remmina Remote Desktop Client Group: Applications/System -BuildRequires: gnutls-devel -BuildRequires: libjpeg-devel -BuildRequires: libvncserver-devel Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-vnc From 73a792b045debb12f2d1d887857c249ecfc476e0 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 27 May 2014 08:15:09 +0200 Subject: [PATCH 035/185] Rpmlint fixes --- remmina.spec | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/remmina.spec b/remmina.spec index a8efa00..1f81c96 100644 --- a/remmina.spec +++ b/remmina.spec @@ -48,7 +48,7 @@ Obsoletes: xfce4-remmina-plugin <= 0.7.3 %description Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny netbooks. +computers in front of either large monitors or tiny net-books. Remmina supports multiple network protocols in an integrated and consistent user interface. Currently RDP, VNC, XDMCP and SSH are supported. @@ -69,15 +69,14 @@ The %{name}-devel package contains header files for developing plugins for %package plugins-gnome Summary: GNOME keyring integration for Remmina Remote Desktop Client -BuildRequires: libgnome-keyring-devel Group: Applications/System +BuildRequires: libgnome-keyring-devel Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: libgnome-keyring %description plugins-gnome Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny netbooks. +computers in front of either large monitors or tiny net-books. This package contains the plugin with GNOME keyring support for the Remmina remote desktop client. @@ -94,7 +93,7 @@ Provides: qtnx = 0.9-17 %description plugins-nx Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny netbooks. +computers in front of either large monitors or tiny net-books. This package contains the NX plugin for the Remmina remote desktop client. @@ -109,7 +108,7 @@ Requires: freerdp %description plugins-rdp Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny netbooks. +computers in front of either large monitors or tiny net-books. This package contains the Remote Desktop Protocol (RDP) plugin for the Remmina remote desktop client. @@ -124,7 +123,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-telepathy Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny netbooks. +computers in front of either large monitors or tiny net-books. This package contains the Telepathy plugin for the Remmina remote desktop client. @@ -138,7 +137,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-vnc Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny netbooks. +computers in front of either large monitors or tiny net-books. This package contains the VNC plugin for the Remmina remote desktop client. @@ -153,7 +152,7 @@ Requires: xorg-x11-server-Xephyr %description plugins-xdmcp Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny netbooks. +computers in front of either large monitors or tiny net-books. This package contains the XDMCP plugin for the Remmina remote desktop client. @@ -296,8 +295,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files plugins-telepathy %{_libdir}/remmina/plugins/remmina-plugin-telepathy.so -#%{_datadir}/dbus-1/services/org.freedesktop.Telepathy.Client.Remmina.service -#%{_datadir}/telepathy/clients/Remmina.client %files plugins-vnc %{_libdir}/remmina/plugins/remmina-plugin-vnc.so From 61eb05f8583402fa8abb81eb9344045eb69db8f9 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 27 May 2014 08:15:47 +0200 Subject: [PATCH 036/185] Fix file list. Base remmina package wrongly contains all the other png/icons from the other packages. SFTP plugin is built in, there is no separate plugin. --- remmina.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index 1f81c96..e460078 100644 --- a/remmina.spec +++ b/remmina.spec @@ -272,12 +272,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %doc AUTHORS ChangeLog COPYING README %{_bindir}/%{name} %{_datadir}/applications/*.desktop -%{_datadir}/icons/hicolor/*/*/*.* +%{_datadir}/icons/hicolor/*/actions/*.* +%{_datadir}/icons/hicolor/*/apps/*.* +%{_datadir}/icons/hicolor/*/emblems/remmina-sftp.png %dir %{_libdir}/remmina/ %dir %{_libdir}/remmina/plugins/ %files devel -%doc %{_includedir}/%{name}/ %{_libdir}/pkgconfig/%{name}.pc From 347ce86bc8c0972d8376c32c3074df512f88b213 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 23 May 2014 10:06:38 +0200 Subject: [PATCH 037/185] Simplify desktop file installation. Also add desktop-file-validate, as per Packaging Guidelines requirement. --- remmina.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/remmina.spec b/remmina.spec index e460078..cb95c5a 100644 --- a/remmina.spec +++ b/remmina.spec @@ -161,6 +161,9 @@ client. %prep %setup -qn Remmina-%{commit} +# Remove useless tags from desktop file +sed -i -e '/^OnlyShowIn/d' %{name}/desktop/%{name}.desktop + %build mkdir -p build pushd build @@ -193,11 +196,7 @@ popd %install make install/fast DESTDIR=%{buildroot} -C build -desktop-file-install --vendor="" --delete-original \ - --add-category="RemoteAccess" \ - --remove-category="X-GNOME-NetworkSettings" \ - --dir %{buildroot}%{_datadir}/applications \ - %{buildroot}/%{_datadir}/applications/%{name}.desktop +desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %find_lang %{name} %find_lang %{name}-plugins From 362a4373d557767e9145362535269b0ad81f7f3a Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 23 May 2014 10:07:34 +0200 Subject: [PATCH 038/185] Do not build external tools. Instead of building them and then removing them in the %install section, do not build them at home. Depending on the user .rpmmacrosthe installation could fail entirely as the folder might not be actually there. --- remmina.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/remmina.spec b/remmina.spec index cb95c5a..855f5d2 100644 --- a/remmina.spec +++ b/remmina.spec @@ -164,6 +164,9 @@ client. # Remove useless tags from desktop file sed -i -e '/^OnlyShowIn/d' %{name}/desktop/%{name}.desktop +# Remove external_tools (test scripts) +sed -i -e '/add_subdirectory(external_tools)/d' %{name}/CMakeLists.txt + %build mkdir -p build pushd build @@ -201,9 +204,6 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %find_lang %{name} %find_lang %{name}-plugins -# Remove strange external_tools -rm -rf %{buildroot}/$HOME/.%{name} - %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : From ff98b2c7108f2f3d8ab9e017209a2642b737b617 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 27 May 2014 08:32:19 +0200 Subject: [PATCH 039/185] Remove obsolete Group tag (EPEL 5) --- remmina.spec | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/remmina.spec b/remmina.spec index 855f5d2..3756939 100644 --- a/remmina.spec +++ b/remmina.spec @@ -6,10 +6,9 @@ Name: remmina Version: 1.1.0 -Release: 0.1%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 0.2%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client -Group: Applications/Internet License: GPLv2+ and MIT URL: http://remmina.sourceforge.net #VCS: git:https://github.com/FreeRDP/Remmina.git @@ -20,7 +19,7 @@ BuildRequires: libssh-devel >= 0.4 BuildRequires: libgcrypt-devel BuildRequires: avahi-ui-devel BuildRequires: vte3-devel -BuildRequires: cmake +BuildRequires: cmake >= 2.8 BuildRequires: gettext BuildRequires: intltool BuildRequires: desktop-file-utils @@ -58,7 +57,6 @@ Please don't forget to install the plugins for the protocols you want to use. %package devel Summary: Development files for %{name} -Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkgconfig @@ -69,7 +67,6 @@ The %{name}-devel package contains header files for developing plugins for %package plugins-gnome Summary: GNOME keyring integration for Remmina Remote Desktop Client -Group: Applications/System BuildRequires: libgnome-keyring-devel Requires: %{name}%{?_isa} = %{version}-%{release} @@ -84,7 +81,6 @@ remote desktop client. %package plugins-nx Summary: NX plugin for Remmina Remote Desktop Client -Group: Applications/System Requires: %{name}%{?_isa} = %{version}-%{release} Requires: nx Obsoletes: qtnx < 0.9-17 @@ -100,7 +96,6 @@ This package contains the NX plugin for the Remmina remote desktop client. %package plugins-rdp Summary: RDP plugin for Remmina Remote Desktop Client -Group: Applications/System BuildRequires: freerdp-devel >= 1.2.0 Requires: %{name}%{?_isa} = %{version}-%{release} Requires: freerdp @@ -116,7 +111,6 @@ remote desktop client. %package plugins-telepathy Summary: Telepathy plugin for Remmina Remote Desktop Client -Group: Applications/System BuildRequires: telepathy-glib-devel Requires: %{name}%{?_isa} = %{version}-%{release} @@ -131,7 +125,6 @@ client. %package plugins-vnc Summary: VNC plugin for Remmina Remote Desktop Client -Group: Applications/System Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-vnc @@ -145,7 +138,6 @@ client. %package plugins-xdmcp Summary: XDMCP plugin for Remmina Remote Desktop Client -Group: Applications/System Requires: %{name}%{?_isa} = %{version}-%{release} Requires: xorg-x11-server-Xephyr @@ -308,6 +300,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue May 27 2014 Simone Caronni - 1.1.0-0.2.git.26b814a +- Remove Group tags. +- Fix file list. +- Remove duplicate buildrequires. +- Fix rpmlint errors. + * Mon May 19 2014 Pavel Alexeev - 1.1.0-0.1.git.26b814a - Try build master branch with new freerdp 1.2 in rawhide (https://github.com/FreeRDP/Remmina/issues/193) - Some spec cleanup. From 0332580b52adaa873b4ede743034c1687680536d Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 21:18:55 -0500 Subject: [PATCH 040/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 3756939..0d61358 100644 --- a/remmina.spec +++ b/remmina.spec @@ -6,7 +6,7 @@ Name: remmina Version: 1.1.0 -Release: 0.2%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 0.3%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -300,6 +300,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 1.1.0-0.3.git.26b814a +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Tue May 27 2014 Simone Caronni - 1.1.0-0.2.git.26b814a - Remove Group tags. - Fix file list. From a8d81bb7c06d69a18efd2a56f06c0ac9c3443d33 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 27 May 2014 08:44:39 +0200 Subject: [PATCH 041/185] Sort BuildRequires and CMake flags --- remmina.spec | 50 +++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/remmina.spec b/remmina.spec index 0d61358..b28c051 100644 --- a/remmina.spec +++ b/remmina.spec @@ -14,20 +14,22 @@ URL: http://remmina.sourceforge.net #VCS: git:https://github.com/FreeRDP/Remmina.git Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{commit}.tar.gz -BuildRequires: gtk3-devel -BuildRequires: libssh-devel >= 0.4 -BuildRequires: libgcrypt-devel BuildRequires: avahi-ui-devel -BuildRequires: vte3-devel BuildRequires: cmake >= 2.8 -BuildRequires: gettext -BuildRequires: intltool BuildRequires: desktop-file-utils -BuildRequires: libxkbfile-devel - +BuildRequires: freerdp-devel >= 1.2.0 +BuildRequires: gettext BuildRequires: gnutls-devel +BuildRequires: gtk3-devel +BuildRequires: intltool +BuildRequires: libgcrypt-devel +BuildRequires: libgnome-keyring-devel BuildRequires: libjpeg-devel +BuildRequires: libssh-devel >= 0.4 BuildRequires: libvncserver-devel +BuildRequires: libxkbfile-devel +BuildRequires: telepathy-glib-devel +BuildRequires: vte3-devel # We don't ship the remmina-plugins-common package any longer Provides: remmina-plugins-common = %{version} @@ -67,7 +69,6 @@ The %{name}-devel package contains header files for developing plugins for %package plugins-gnome Summary: GNOME keyring integration for Remmina Remote Desktop Client -BuildRequires: libgnome-keyring-devel Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-gnome @@ -96,7 +97,6 @@ This package contains the NX plugin for the Remmina remote desktop client. %package plugins-rdp Summary: RDP plugin for Remmina Remote Desktop Client -BuildRequires: freerdp-devel >= 1.2.0 Requires: %{name}%{?_isa} = %{version}-%{release} Requires: freerdp @@ -111,7 +111,6 @@ remote desktop client. %package plugins-telepathy Summary: Telepathy plugin for Remmina Remote Desktop Client -BuildRequires: telepathy-glib-devel Requires: %{name}%{?_isa} = %{version}-%{release} %description plugins-telepathy @@ -161,35 +160,32 @@ sed -i -e '/add_subdirectory(external_tools)/d' %{name}/CMakeLists.txt %build mkdir -p build -pushd build CFLAGS="%{optflags} -DLIBVNCSERVER_WITH_CLIENT_TLS=1" LDFLAGS="-Wl,-z,relro -Wl,--no-as-needed" -%cmake \ - -DWITH_PTHREAD=ON \ +%cmake --build=build \ + -DCMAKE_INSTALL_LIBDIR=%{_lib} \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DLIBVNCSERVER_WITH_CLIENT_TLS=1 \ + -DWITH_APPINDICATOR=OFF \ + -DWITH_AVAHI=ON \ + -DWITH_FREERDP=ON \ -DWITH_GCRYPT=ON \ - -DWITH_LIBSSH=ON \ - -DWITH_VTE=ON \ + -DWITH_GETTEXT=ON \ -DWITH_GETTEXT=ON \ -DWITH_LIBSSH=ON \ - -DWITH_FREERDP=ON \ + -DWITH_LIBSSH=ON \ + -DWITH_PTHREAD=ON \ -DWITH_TELEPATHY=ON \ + -DWITH_VTE=ON \ -DWITH_ZLIB=ON \ - -DWITH_GETTEXT=ON \ - -DWITH_AVAHI=ON \ - -DWITH_APPINDICATOR=OFF \ - -LIBVNCSERVER_INCLUDE_DIRS=%{_includedir} \ - -DLIBVNCSERVER_WITH_CLIENT_TLS=1 \ - -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DCMAKE_INSTALL_LIBDIR=%{_lib} \ - .. + . make %{?_smp_mflags} -popd %install -make install/fast DESTDIR=%{buildroot} -C build +make install/fast DESTDIR=%{buildroot} desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop From 416f8371a68b5e9bcf32fa5d0083846b43228beb Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 10 Jul 2014 15:40:31 +0200 Subject: [PATCH 042/185] Enable external tools. --- remmina.spec | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/remmina.spec b/remmina.spec index b28c051..82bb0be 100644 --- a/remmina.spec +++ b/remmina.spec @@ -155,15 +155,18 @@ client. # Remove useless tags from desktop file sed -i -e '/^OnlyShowIn/d' %{name}/desktop/%{name}.desktop -# Remove external_tools (test scripts) -sed -i -e '/add_subdirectory(external_tools)/d' %{name}/CMakeLists.txt +# Do not install tools into user home directory +sed -i \ + -e 's@$ENV{HOME}/.%{name}@%{_libexecdir}/%{name}@g' \ + -e '/^file(MAKE_DIRECTORY/d' \ + %{name}/external_tools/CMakeLists.txt +sed -i \ + -e 's@%s/.%{name}@%{_libexecdir}/%{name}@g' \ + %{name}/src/%{name}_external_tools.c %build mkdir -p build -CFLAGS="%{optflags} -DLIBVNCSERVER_WITH_CLIENT_TLS=1" -LDFLAGS="-Wl,-z,relro -Wl,--no-as-needed" - %cmake --build=build \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ @@ -262,6 +265,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/icons/hicolor/*/actions/*.* %{_datadir}/icons/hicolor/*/apps/*.* %{_datadir}/icons/hicolor/*/emblems/remmina-sftp.png +%{_libexecdir}/%{name}/ %dir %{_libdir}/remmina/ %dir %{_libdir}/remmina/plugins/ From c72447e7245209d3e5addbbe8f92cde7b2692d30 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 18 Jul 2014 14:19:33 +0200 Subject: [PATCH 043/185] Update to latest snapshot. --- .gitignore | 1 + remmina.spec | 31 ++++++++++++------------------- sources | 2 +- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index 4f85810..f8c7ac9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ remmina-0.7.5.tar.gz /remmina-20120330gitffba771d.tar.bz2 /Remmina-1.0.0.tar.gz /Remmina-26b814aec6e930746d079c885449dd50d3484fb0.tar.gz +/Remmina-1470c974cddaede87d09345f712202ddcda0810b.tar.gz diff --git a/remmina.spec b/remmina.spec index 82bb0be..2a376ac 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,12 +1,12 @@ # Review at https://bugzilla.redhat.com/show_bug.cgi?id=553402 # https://fedoraproject.org/wiki/Packaging:SourceURL#Github -%global commit 26b814aec6e930746d079c885449dd50d3484fb0 +%global commit 1470c974cddaede87d09345f712202ddcda0810b %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: remmina -Version: 1.1.0 -Release: 0.3%{?shortcommit:.git.%{shortcommit}}%{?dist} +Version: 1.0.0 +Release: 11%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -35,16 +35,6 @@ BuildRequires: vte3-devel Provides: remmina-plugins-common = %{version} Obsoletes: remmina-plugins-common < 1.0.0-7 -# Remmina used to be called grdc -Provides: grdc = %{version} -Obsoletes: grdc < 0.6.1 - -# Remmina has a generic trayicon now -Provides: gnome-applet-remmina = %{version} -Provides: xfce4-remmina-plugin = %{version} -Obsoletes: gnome-applet-remmina <= 0.7.3 -Obsoletes: xfce4-remmina-plugin <= 0.7.3 - %description Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -84,8 +74,6 @@ remote desktop client. Summary: NX plugin for Remmina Remote Desktop Client Requires: %{name}%{?_isa} = %{version}-%{release} Requires: nx -Obsoletes: qtnx < 0.9-17 -Provides: qtnx = 0.9-17 %description plugins-nx Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -98,7 +86,6 @@ This package contains the NX plugin for the Remmina remote desktop client. %package plugins-rdp Summary: RDP plugin for Remmina Remote Desktop Client Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: freerdp %description plugins-rdp Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -152,9 +139,6 @@ client. %prep %setup -qn Remmina-%{commit} -# Remove useless tags from desktop file -sed -i -e '/^OnlyShowIn/d' %{name}/desktop/%{name}.desktop - # Do not install tools into user home directory sed -i \ -e 's@$ENV{HOME}/.%{name}@%{_libexecdir}/%{name}@g' \ @@ -300,6 +284,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Jul 18 2014 Simone Caronni - 1.0.0-11.git.1470c97 +- Update to latest snapshot. +- Release number bumped to 1.2.0 beta 1 and then reverted to 1.0.0 upstram, + adjust accordingly. +- Desktop file fixed upstream, remove sed line. +- Package grdc, qtnx, gnome-applet-remmina and xfce4-remmina-plugin are not + required anymore by any package. +- Remove requirement on freerdp binary for plugins-rdp. + * Sun Jun 08 2014 Fedora Release Engineering - 1.1.0-0.3.git.26b814a - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index b4c9e67..30bf2fe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d7875e50f21f7d0f2e86527375da6755 Remmina-26b814aec6e930746d079c885449dd50d3484fb0.tar.gz +ae43ffbf87654559e7d904da4d328e8f Remmina-1470c974cddaede87d09345f712202ddcda0810b.tar.gz From 927d793fce2ec94ebd98eb1f4c57713f1542b480 Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Fri, 18 Jul 2014 22:19:57 +0400 Subject: [PATCH 044/185] Fix freerdp-devel BR version --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index b28c051..d059c65 100644 --- a/remmina.spec +++ b/remmina.spec @@ -17,7 +17,7 @@ Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{c BuildRequires: avahi-ui-devel BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils -BuildRequires: freerdp-devel >= 1.2.0 +BuildRequires: freerdp-devel >= 1:1.1.0 BuildRequires: gettext BuildRequires: gnutls-devel BuildRequires: gtk3-devel From 94198c3d02760abf18647aa03f82e42899cb33dc Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Tue, 12 Aug 2014 12:30:42 +0400 Subject: [PATCH 045/185] - Include in devel sub-package for build external plugins: o %%{_libdir}/cmake/%%{name}/*.cmake o config.h.in o Source1: pluginBuild-CMakeLists.txt (with short instructions inside) - Fix error installing devel files /usr/include/remmina/*.h (hack!) --- pluginBuild-CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ remmina.spec | 27 +++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 pluginBuild-CMakeLists.txt diff --git a/pluginBuild-CMakeLists.txt b/pluginBuild-CMakeLists.txt new file mode 100644 index 0000000..c228e6b --- /dev/null +++ b/pluginBuild-CMakeLists.txt @@ -0,0 +1,34 @@ +# Remmina - The GTK+ Remote Desktop Client +# +# Copyright (C) 2014 Pavel Alexeev +# Work based on https://github.com/muflone/remmina-plugin-builder/blob/master/CMakeLists.txt +# dramatically simplified and tied with Fedora remmina package. Thanks to Fabio Castelli. +# +# To build remmina plugin you need: +# 1) install remmina-devel package +# 2) ln -s %{_includedir}/remmina/config.h.in . +# 3) ln -s %{_includedir}/remmina/pluginBuild-CMakeLists.txt CMakeLists.txt +# 4) Put plugin source code in remmina-plugin-to-build directory +# 5) Build it as usual: %{cmake} . ; make %{?_smp_mflags}… + +cmake_minimum_required(VERSION 2.6) +set(CMAKE_COLOR_MAKEFILE ON) +project(Remmina C) + +set(CMAKE_MODULE_PATH "${LIB_INSTALL_DIR}/cmake/remmina/") + +set(REMMINA_DATADIR "${CMAKE_INSTALL_PREFIX}/share") +set(REMMINA_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/share/locale") +set(REMMINA_PLUGINDIR "${LIB_INSTALL_DIR}/remmina/plugins") + +include(FindPkgConfig) +include(FindOptionalPackage) + +include_directories(.) + +add_definitions(-DHAVE_PTHREAD) + +find_required_package(GTK) +add_subdirectory(remmina-plugin-to-build) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h) diff --git a/remmina.spec b/remmina.spec index 8bc98c3..f62bd3a 100644 --- a/remmina.spec +++ b/remmina.spec @@ -6,7 +6,7 @@ Name: remmina Version: 1.0.0 -Release: 11%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 12%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -14,6 +14,12 @@ URL: http://remmina.sourceforge.net #VCS: git:https://github.com/FreeRDP/Remmina.git Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{commit}.tar.gz +# Cmake helper file to easy build plugins outside remmina sourse tree +# See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which +# use http://www.muflone.com/remmina-plugin-builder/ with remmina bundled source. +# So we can't use it directly only as instructions. +Source1: pluginBuild-CMakeLists.txt + BuildRequires: avahi-ui-devel BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils @@ -148,12 +154,16 @@ sed -i \ -e 's@%s/.%{name}@%{_libexecdir}/%{name}@g' \ %{name}/src/%{name}_external_tools.c +#? Hack: https://github.com/FreeRDP/Remmina/issues/292 +sed -i 's#install(DIRECTORY include/remmina DESTINATION include/remmina #install(DIRECTORY remmina/include/remmina DESTINATION include/ #' CMakeLists.txt + %build mkdir -p build %cmake --build=build \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_INSTALL_COMPONENT=1 \ -DLIBVNCSERVER_WITH_CLIENT_TLS=1 \ -DWITH_APPINDICATOR=OFF \ -DWITH_AVAHI=ON \ @@ -172,10 +182,15 @@ mkdir -p build make %{?_smp_mflags} %install -make install/fast DESTDIR=%{buildroot} +%make_install desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop +mkdir -p %{buildroot}/%{_libdir}/cmake/%{name}/ +cp -pr cmake/*.cmake %{buildroot}/%{_libdir}/cmake/%{name}/ +cp -pr config.h.in %{buildroot}/%{_includedir}/%{name}/ +cp -p %{SOURCE1} %{buildroot}/%{_includedir}/%{name}/ + %find_lang %{name} %find_lang %{name}-plugins @@ -256,6 +271,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files devel %{_includedir}/%{name}/ %{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/cmake/%{name}/*.cmake %files plugins-gnome %{_libdir}/remmina/plugins/remmina-plugins-gnome.so @@ -284,6 +300,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Aug 11 2014 Pavel Alexeev - 1.0.0-12.git.1470c97 +- Include in devel sub-package for build external plugins: + o %%{_libdir}/cmake/%%{name}/*.cmake + o config.h.in + o Source1: pluginBuild-CMakeLists.txt (with short instructions inside) +- Fix error installing devel files /usr/include/remmina/*.h (hack!) + * Fri Jul 18 2014 Simone Caronni - 1.0.0-11.git.1470c97 - Update to latest snapshot. - Release number bumped to 1.2.0 beta 1 and then reverted to 1.0.0 upstram, From b7fc97ac2c7e73e799a1dad9c46f3f8525d2ac4e Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Fri, 15 Aug 2014 21:14:40 +0400 Subject: [PATCH 046/185] - Add Patch0: remmina-1.0-clipboard-fix.patch - Update to 65d2ca4872150942cced1fbe92248dd933e9c0cb --- .gitignore | 1 + remmina-1.0-clipboard-fix.patch | 313 ++++++++++++++++++++++++++++++++ remmina.spec | 15 +- sources | 2 +- 4 files changed, 327 insertions(+), 4 deletions(-) create mode 100644 remmina-1.0-clipboard-fix.patch diff --git a/.gitignore b/.gitignore index f8c7ac9..ac99682 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ remmina-0.7.5.tar.gz /Remmina-1.0.0.tar.gz /Remmina-26b814aec6e930746d079c885449dd50d3484fb0.tar.gz /Remmina-1470c974cddaede87d09345f712202ddcda0810b.tar.gz +/Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.tar.gz diff --git a/remmina-1.0-clipboard-fix.patch b/remmina-1.0-clipboard-fix.patch new file mode 100644 index 0000000..25f013d --- /dev/null +++ b/remmina-1.0-clipboard-fix.patch @@ -0,0 +1,313 @@ +diff -Naur Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_cliprdr.c Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_cliprdr.c +--- Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_cliprdr.c 2014-07-30 00:07:46.000000000 +0400 ++++ Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_cliprdr.c 2014-08-15 20:47:19.713200549 +0400 +@@ -266,12 +266,12 @@ + + data = Stream_Buffer(s); + size = Stream_Length(s); +- Stream_Free(s, TRUE); ++ + pixbuf = gdk_pixbuf_loader_new(); + gdk_pixbuf_loader_write(pixbuf, data, size, NULL); ++ gdk_pixbuf_loader_close(pixbuf, NULL); + Stream_Free(s, TRUE); + output = g_object_ref(gdk_pixbuf_loader_get_pixbuf(pixbuf)); +- gdk_pixbuf_loader_close(pixbuf, NULL); + g_object_unref(pixbuf); + break; + } +@@ -328,7 +328,7 @@ + event = (RDP_CB_DATA_REQUEST_EVENT*) + freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_DataRequest, NULL, NULL); + event->format = rfi->format; +- freerdp_channels_send_event(rfi->channels, (wMessage*) event); ++ freerdp_channels_send_event(rfi->instance->context->channels, (wMessage*) event); + + data = g_async_queue_timeout_pop(rfi->clipboard_queue, 1000000); + if (data != NULL) +@@ -373,16 +373,20 @@ + result = gtk_clipboard_wait_for_targets(clipboard, &targets, &count); + } + +- if (!result) +- return 0; + + event = (RDP_CB_FORMAT_LIST_EVENT*) + freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_FormatList, NULL, NULL); + +- remmina_rdp_cliprdr_get_target_types(&event->formats, &event->num_formats, targets, count); +- g_free(targets); ++ if (result) ++ { ++ remmina_rdp_cliprdr_get_target_types(&event->formats, &event->num_formats, targets, count); ++ g_free(targets); ++ } ++ else ++ event->num_formats = 0; ++ + +- return freerdp_channels_send_event(rfi->channels, (wMessage*) event); ++ return freerdp_channels_send_event(rfi->instance->context->channels, (wMessage*) event); + } + + void remmina_rdp_cliprdr_get_clipboard_data(RemminaProtocolWidget* gp, RemminaPluginRdpUiObject* ui) +@@ -478,7 +482,7 @@ + freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_DataResponse, NULL, NULL); + event->data = outbuf; + event->size = size; +- freerdp_channels_send_event(rfi->channels, (wMessage*) event); ++ freerdp_channels_send_event(rfi->instance->context->channels, (wMessage*) event); + } + + void remmina_rdp_cliprdr_set_clipboard_data(RemminaProtocolWidget* gp, RemminaPluginRdpUiObject* ui) +diff -Naur Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_plugin.c Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_plugin.c +--- Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_plugin.c 2014-07-30 00:07:46.000000000 +0400 ++++ Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_plugin.c 2014-08-15 20:50:39.602705732 +0400 +@@ -212,10 +212,12 @@ + rfContext* rfi; + ALIGN64 rdpSettings* settings; + RemminaProtocolWidget* gp; ++ rdpChannels *channels; + + rfi = (rfContext*) instance->context; + settings = instance->settings; + gp = rfi->protocol_widget; ++ channels = instance->context->channels; + + settings->BitmapCacheEnabled = True; + settings->OffscreenSupportLevel = True; +@@ -254,9 +256,7 @@ + rfi->rfx_context = rfx_context_new(FALSE); + } + +- freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0); +- +- freerdp_channels_pre_connect(rfi->channels, instance); ++ freerdp_channels_pre_connect(instance->context->channels, instance); + + rfi->clrconv = freerdp_clrconv_new(CLRCONV_ALPHA); + +@@ -337,7 +337,7 @@ + instance->update->EndPaint = rf_end_paint; + instance->update->DesktopResize = rf_desktop_resize; + +- freerdp_channels_post_connect(rfi->channels, instance); ++ freerdp_channels_post_connect(instance->context->channels, instance); + + remmina_plugin_service->protocol_plugin_emit_signal(gp, "connect"); + +@@ -464,11 +464,15 @@ + fd_set wfds_set; + rfContext* rfi; + wMessage* event; ++ ++ rdpChannels *channels; ++ + + memset(rfds, 0, sizeof(rfds)); + memset(wfds, 0, sizeof(wfds)); + + rfi = GET_DATA(gp); ++ channels = rfi->instance->context->channels; + + while (1) + { +@@ -479,7 +483,7 @@ + { + break; + } +- if (!freerdp_channels_get_fds(rfi->channels, rfi->instance, rfds, &rcount, wfds, &wcount)) ++ if (!freerdp_channels_get_fds(channels, rfi->instance, rfds, &rcount, wfds, &wcount)) + { + break; + } +@@ -533,13 +537,13 @@ + break; + } + /* check channel fds */ +- if (!freerdp_channels_check_fds(rfi->channels, rfi->instance)) ++ if (!freerdp_channels_check_fds(channels, rfi->instance)) + { + break; + } + else + { +- event = freerdp_channels_pop_event(rfi->channels); ++ event = freerdp_channels_pop_event(channels); + if (event) + remmina_rdp_channels_process_event(gp, event); + } +@@ -572,6 +576,48 @@ + return TRUE; + } + ++int remmina_rdp_load_static_channel_addin(rdpChannels* channels, rdpSettings* settings, char* name, void* data) ++{ ++ void* entry; ++ ++ entry = freerdp_load_channel_addin_entry(name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC); ++ ++ ++ ++ ++ if (entry) ++ { ++ ++ if (freerdp_channels_client_load(channels, settings, entry, data) == 0) ++ { ++ fprintf(stderr, "loading channel %s\n", name); ++ return 0; ++ } ++ } ++ ++ return -1; ++} ++ ++ ++int remmina_rdp_add_static_channel(rdpSettings* settings, int count, char** params) ++{ ++ int index; ++ ADDIN_ARGV* args; ++ ++ args = (ADDIN_ARGV*) malloc(sizeof(ADDIN_ARGV)); ++ ++ args->argc = count; ++ args->argv = (char**) malloc(sizeof(char*) * args->argc); ++ ++ for (index = 0; index < args->argc; index++) ++ args->argv[index] = _strdup(params[index]); ++ ++ freerdp_static_channel_collection_add(settings, args); ++ ++ return 0; ++} ++ ++ + static gboolean remmina_rdp_main(RemminaProtocolWidget* gp) + { + gchar* s; +@@ -584,6 +630,8 @@ + const gchar* cs; + RemminaFile* remminafile; + rfContext* rfi; ++ ADDIN_ARGV* args; ++ gint index; + + rfi = GET_DATA(gp); + remminafile = remmina_plugin_service->protocol_plugin_get_file(gp); +@@ -750,7 +798,7 @@ + */ + + /* remmina_rdp_load_plugin(rfi->channels, rfi->settings, "rdpsnd", rfi->rdpsnd_data); */ +- remmina_rdp_load_plugin(rfi->channels, rfi->settings, "rdpsnd", rfi->settings); ++ remmina_rdp_load_plugin(rfi->instance->context->channels, rfi->settings, "rdpsnd", rfi->settings); + /* TODO: Fix/Check this - Removed because of issue #280 + rfi->drdynvc_data[drdynvc_num].size = sizeof(RDP_PLUGIN_DATA); + rfi->drdynvc_data[drdynvc_num].data[0] = "audin"; +@@ -760,12 +808,21 @@ + + if (drdynvc_num) + { +- remmina_rdp_load_plugin(rfi->channels, rfi->settings, "drdynvc", rfi->drdynvc_data); ++ remmina_rdp_load_plugin(rfi->instance->context->channels, rfi->settings, "drdynvc", rfi->drdynvc_data); + } + + if (!remmina_plugin_service->file_get_int(remminafile, "disableclipboard", FALSE)) + { +- remmina_rdp_load_plugin(rfi->channels, rfi->settings, "cliprdr", NULL); ++ ++ if (!freerdp_static_channel_collection_find(rfi->settings, "cliprdr")) ++ { ++ char* params[1]; ++ params[0] = "cliprdr"; ++ remmina_rdp_add_static_channel(rfi->settings, 1, (char**) params); ++ } ++ ++ // Old version: remmina_rdp_load_plugin(rfi->instance->context->channels, rfi->settings, "cliprdr", NULL); ++ + } + + rdpdr_num = 0; +@@ -804,9 +861,19 @@ + if (rdpdr_num) + { + //remmina_rdp_load_plugin(rfi->channels, rfi->settings, "rdpdr", rfi->rdpdr_data); +- remmina_rdp_load_plugin(rfi->channels, rfi->settings, "rdpdr", rfi->settings); ++ remmina_rdp_load_plugin(rfi->instance->context->channels, rfi->settings, "rdpdr", rfi->settings); + } + ++ ++ for (index = 0; index < rfi->settings->StaticChannelCount; index++) ++ { ++ args = rfi->settings->StaticChannelArray[index]; ++ remmina_rdp_load_static_channel_addin(rfi->instance->context->channels, rfi->settings, args->argv[0], args); ++ ++ } ++ ++ ++ + if (!freerdp_connect(rfi->instance)) + { + if (!rfi->user_cancelled) +@@ -817,6 +884,8 @@ + + return FALSE; + } ++ ++ + + remmina_rdp_main_loop(gp); + +@@ -843,6 +912,8 @@ + { + freerdp* instance; + rfContext* rfi; ++ ++ freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0); + + instance = freerdp_new(); + instance->PreConnect = remmina_rdp_pre_connect; +@@ -861,7 +932,7 @@ + rfi->protocol_widget = gp; + rfi->instance = instance; + rfi->settings = instance->settings; +- rfi->channels = freerdp_channels_new(); ++ rfi->instance->context->channels = freerdp_channels_new(); + + pthread_mutex_init(&rfi->mutex, NULL); + +@@ -896,6 +967,7 @@ + { + rfContext* rfi; + freerdp* instance; ++ + + rfi = GET_DATA(gp); + instance = rfi->instance; +@@ -918,11 +990,11 @@ + + if (instance) + { +- if (rfi->channels) ++ if (instance->context->channels) + { + //freerdp_channels_close(rfi->channels, instance); +- freerdp_channels_free(rfi->channels); +- rfi->channels = NULL; ++ freerdp_channels_free(instance->context->channels); ++ instance->context->channels = NULL; + } + if (freerdp_shall_disconnect(instance)) + { +diff -Naur Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_plugin.h Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_plugin.h +--- Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_plugin.h 2014-07-30 00:07:46.000000000 +0400 ++++ Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_plugin.h 2014-08-15 20:47:19.714200567 +0400 +@@ -90,7 +90,7 @@ + /* main */ + rdpSettings* settings; + freerdp* instance; +- rdpChannels* channels; ++ // rdpChannels* channels; + + pthread_t thread; + pthread_mutex_t mutex; diff --git a/remmina.spec b/remmina.spec index f62bd3a..5192c20 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,12 +1,12 @@ # Review at https://bugzilla.redhat.com/show_bug.cgi?id=553402 # https://fedoraproject.org/wiki/Packaging:SourceURL#Github -%global commit 1470c974cddaede87d09345f712202ddcda0810b +%global commit 65d2ca4872150942cced1fbe92248dd933e9c0cb %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: remmina Version: 1.0.0 -Release: 12%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 13%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -37,6 +37,9 @@ BuildRequires: libxkbfile-devel BuildRequires: telepathy-glib-devel BuildRequires: vte3-devel +# https://github.com/FreeRDP/Remmina/issues/280#issuecomment-52254273 Thanks to Giovanni Panozzo +Patch0: remmina-1.0-clipboard-fix.patch + # We don't ship the remmina-plugins-common package any longer Provides: remmina-plugins-common = %{version} Obsoletes: remmina-plugins-common < 1.0.0-7 @@ -145,6 +148,8 @@ client. %prep %setup -qn Remmina-%{commit} +%patch0 -p1 -b .clipboard + # Do not install tools into user home directory sed -i \ -e 's@$ENV{HOME}/.%{name}@%{_libexecdir}/%{name}@g' \ @@ -258,7 +263,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang -f %{name}-plugins.lang -%doc AUTHORS ChangeLog COPYING README +%doc AUTHORS ChangeLog LICENSE README %{_bindir}/%{name} %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/actions/*.* @@ -300,6 +305,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Aug 15 2014 Pavel Alexeev - 1.0.0-13.git.65d2ca4 +- Add Patch0: remmina-1.0-clipboard-fix.patch +- Update to 65d2ca4872150942cced1fbe92248dd933e9c0cb + * Mon Aug 11 2014 Pavel Alexeev - 1.0.0-12.git.1470c97 - Include in devel sub-package for build external plugins: o %%{_libdir}/cmake/%%{name}/*.cmake diff --git a/sources b/sources index 30bf2fe..9bf32ba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ae43ffbf87654559e7d904da4d328e8f Remmina-1470c974cddaede87d09345f712202ddcda0810b.tar.gz +fffbf18cdbcb280a0d0ae6e4ecf05f03 Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.tar.gz From 35a6e19da6e032cdac2905d543e39ec8494f8d4a Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 23:51:41 +0000 Subject: [PATCH 047/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 5192c20..429bbe3 100644 --- a/remmina.spec +++ b/remmina.spec @@ -6,7 +6,7 @@ Name: remmina Version: 1.0.0 -Release: 13%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 14%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -305,6 +305,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 1.0.0-14.git.65d2ca4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Fri Aug 15 2014 Pavel Alexeev - 1.0.0-13.git.65d2ca4 - Add Patch0: remmina-1.0-clipboard-fix.patch - Update to 65d2ca4872150942cced1fbe92248dd933e9c0cb From 4f9342439b9e3e6f270499695eb5e52c6e39aa0d Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Wed, 3 Sep 2014 20:06:17 -0600 Subject: [PATCH 048/185] Have remmina-plugins-nx require nxproxy (bug #1004860) --- remmina.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index 429bbe3..76e9c40 100644 --- a/remmina.spec +++ b/remmina.spec @@ -6,7 +6,7 @@ Name: remmina Version: 1.0.0 -Release: 14%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 15%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -82,7 +82,7 @@ remote desktop client. %package plugins-nx Summary: NX plugin for Remmina Remote Desktop Client Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: nx +Requires: nxproxy %description plugins-nx Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -305,6 +305,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Sep 3 2014 Orion Poplawski - 1.0.0-15.git.65d2ca4 +- Have remmina-plugins-nx require nxproxy (bug #1004860) + * Sun Aug 17 2014 Fedora Release Engineering - 1.0.0-14.git.65d2ca4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From ac158f2319e868dba09803e50557a92c31bc5a72 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 21 Oct 2014 16:09:21 +0200 Subject: [PATCH 049/185] Update to latest 1.1.1 snapshot --- .gitignore | 1 + remmina-1.0-clipboard-fix.patch | 313 -------------------------------- remmina-rfx_context_new.patch | 12 ++ remmina.spec | 19 +- sources | 2 +- 5 files changed, 26 insertions(+), 321 deletions(-) delete mode 100644 remmina-1.0-clipboard-fix.patch create mode 100644 remmina-rfx_context_new.patch diff --git a/.gitignore b/.gitignore index ac99682..03d15a9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ remmina-0.7.5.tar.gz /Remmina-26b814aec6e930746d079c885449dd50d3484fb0.tar.gz /Remmina-1470c974cddaede87d09345f712202ddcda0810b.tar.gz /Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.tar.gz +/Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.tar.gz diff --git a/remmina-1.0-clipboard-fix.patch b/remmina-1.0-clipboard-fix.patch deleted file mode 100644 index 25f013d..0000000 --- a/remmina-1.0-clipboard-fix.patch +++ /dev/null @@ -1,313 +0,0 @@ -diff -Naur Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_cliprdr.c Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_cliprdr.c ---- Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_cliprdr.c 2014-07-30 00:07:46.000000000 +0400 -+++ Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_cliprdr.c 2014-08-15 20:47:19.713200549 +0400 -@@ -266,12 +266,12 @@ - - data = Stream_Buffer(s); - size = Stream_Length(s); -- Stream_Free(s, TRUE); -+ - pixbuf = gdk_pixbuf_loader_new(); - gdk_pixbuf_loader_write(pixbuf, data, size, NULL); -+ gdk_pixbuf_loader_close(pixbuf, NULL); - Stream_Free(s, TRUE); - output = g_object_ref(gdk_pixbuf_loader_get_pixbuf(pixbuf)); -- gdk_pixbuf_loader_close(pixbuf, NULL); - g_object_unref(pixbuf); - break; - } -@@ -328,7 +328,7 @@ - event = (RDP_CB_DATA_REQUEST_EVENT*) - freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_DataRequest, NULL, NULL); - event->format = rfi->format; -- freerdp_channels_send_event(rfi->channels, (wMessage*) event); -+ freerdp_channels_send_event(rfi->instance->context->channels, (wMessage*) event); - - data = g_async_queue_timeout_pop(rfi->clipboard_queue, 1000000); - if (data != NULL) -@@ -373,16 +373,20 @@ - result = gtk_clipboard_wait_for_targets(clipboard, &targets, &count); - } - -- if (!result) -- return 0; - - event = (RDP_CB_FORMAT_LIST_EVENT*) - freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_FormatList, NULL, NULL); - -- remmina_rdp_cliprdr_get_target_types(&event->formats, &event->num_formats, targets, count); -- g_free(targets); -+ if (result) -+ { -+ remmina_rdp_cliprdr_get_target_types(&event->formats, &event->num_formats, targets, count); -+ g_free(targets); -+ } -+ else -+ event->num_formats = 0; -+ - -- return freerdp_channels_send_event(rfi->channels, (wMessage*) event); -+ return freerdp_channels_send_event(rfi->instance->context->channels, (wMessage*) event); - } - - void remmina_rdp_cliprdr_get_clipboard_data(RemminaProtocolWidget* gp, RemminaPluginRdpUiObject* ui) -@@ -478,7 +482,7 @@ - freerdp_event_new(CliprdrChannel_Class, CliprdrChannel_DataResponse, NULL, NULL); - event->data = outbuf; - event->size = size; -- freerdp_channels_send_event(rfi->channels, (wMessage*) event); -+ freerdp_channels_send_event(rfi->instance->context->channels, (wMessage*) event); - } - - void remmina_rdp_cliprdr_set_clipboard_data(RemminaProtocolWidget* gp, RemminaPluginRdpUiObject* ui) -diff -Naur Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_plugin.c Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_plugin.c ---- Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_plugin.c 2014-07-30 00:07:46.000000000 +0400 -+++ Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_plugin.c 2014-08-15 20:50:39.602705732 +0400 -@@ -212,10 +212,12 @@ - rfContext* rfi; - ALIGN64 rdpSettings* settings; - RemminaProtocolWidget* gp; -+ rdpChannels *channels; - - rfi = (rfContext*) instance->context; - settings = instance->settings; - gp = rfi->protocol_widget; -+ channels = instance->context->channels; - - settings->BitmapCacheEnabled = True; - settings->OffscreenSupportLevel = True; -@@ -254,9 +256,7 @@ - rfi->rfx_context = rfx_context_new(FALSE); - } - -- freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0); -- -- freerdp_channels_pre_connect(rfi->channels, instance); -+ freerdp_channels_pre_connect(instance->context->channels, instance); - - rfi->clrconv = freerdp_clrconv_new(CLRCONV_ALPHA); - -@@ -337,7 +337,7 @@ - instance->update->EndPaint = rf_end_paint; - instance->update->DesktopResize = rf_desktop_resize; - -- freerdp_channels_post_connect(rfi->channels, instance); -+ freerdp_channels_post_connect(instance->context->channels, instance); - - remmina_plugin_service->protocol_plugin_emit_signal(gp, "connect"); - -@@ -464,11 +464,15 @@ - fd_set wfds_set; - rfContext* rfi; - wMessage* event; -+ -+ rdpChannels *channels; -+ - - memset(rfds, 0, sizeof(rfds)); - memset(wfds, 0, sizeof(wfds)); - - rfi = GET_DATA(gp); -+ channels = rfi->instance->context->channels; - - while (1) - { -@@ -479,7 +483,7 @@ - { - break; - } -- if (!freerdp_channels_get_fds(rfi->channels, rfi->instance, rfds, &rcount, wfds, &wcount)) -+ if (!freerdp_channels_get_fds(channels, rfi->instance, rfds, &rcount, wfds, &wcount)) - { - break; - } -@@ -533,13 +537,13 @@ - break; - } - /* check channel fds */ -- if (!freerdp_channels_check_fds(rfi->channels, rfi->instance)) -+ if (!freerdp_channels_check_fds(channels, rfi->instance)) - { - break; - } - else - { -- event = freerdp_channels_pop_event(rfi->channels); -+ event = freerdp_channels_pop_event(channels); - if (event) - remmina_rdp_channels_process_event(gp, event); - } -@@ -572,6 +576,48 @@ - return TRUE; - } - -+int remmina_rdp_load_static_channel_addin(rdpChannels* channels, rdpSettings* settings, char* name, void* data) -+{ -+ void* entry; -+ -+ entry = freerdp_load_channel_addin_entry(name, NULL, NULL, FREERDP_ADDIN_CHANNEL_STATIC); -+ -+ -+ -+ -+ if (entry) -+ { -+ -+ if (freerdp_channels_client_load(channels, settings, entry, data) == 0) -+ { -+ fprintf(stderr, "loading channel %s\n", name); -+ return 0; -+ } -+ } -+ -+ return -1; -+} -+ -+ -+int remmina_rdp_add_static_channel(rdpSettings* settings, int count, char** params) -+{ -+ int index; -+ ADDIN_ARGV* args; -+ -+ args = (ADDIN_ARGV*) malloc(sizeof(ADDIN_ARGV)); -+ -+ args->argc = count; -+ args->argv = (char**) malloc(sizeof(char*) * args->argc); -+ -+ for (index = 0; index < args->argc; index++) -+ args->argv[index] = _strdup(params[index]); -+ -+ freerdp_static_channel_collection_add(settings, args); -+ -+ return 0; -+} -+ -+ - static gboolean remmina_rdp_main(RemminaProtocolWidget* gp) - { - gchar* s; -@@ -584,6 +630,8 @@ - const gchar* cs; - RemminaFile* remminafile; - rfContext* rfi; -+ ADDIN_ARGV* args; -+ gint index; - - rfi = GET_DATA(gp); - remminafile = remmina_plugin_service->protocol_plugin_get_file(gp); -@@ -750,7 +798,7 @@ - */ - - /* remmina_rdp_load_plugin(rfi->channels, rfi->settings, "rdpsnd", rfi->rdpsnd_data); */ -- remmina_rdp_load_plugin(rfi->channels, rfi->settings, "rdpsnd", rfi->settings); -+ remmina_rdp_load_plugin(rfi->instance->context->channels, rfi->settings, "rdpsnd", rfi->settings); - /* TODO: Fix/Check this - Removed because of issue #280 - rfi->drdynvc_data[drdynvc_num].size = sizeof(RDP_PLUGIN_DATA); - rfi->drdynvc_data[drdynvc_num].data[0] = "audin"; -@@ -760,12 +808,21 @@ - - if (drdynvc_num) - { -- remmina_rdp_load_plugin(rfi->channels, rfi->settings, "drdynvc", rfi->drdynvc_data); -+ remmina_rdp_load_plugin(rfi->instance->context->channels, rfi->settings, "drdynvc", rfi->drdynvc_data); - } - - if (!remmina_plugin_service->file_get_int(remminafile, "disableclipboard", FALSE)) - { -- remmina_rdp_load_plugin(rfi->channels, rfi->settings, "cliprdr", NULL); -+ -+ if (!freerdp_static_channel_collection_find(rfi->settings, "cliprdr")) -+ { -+ char* params[1]; -+ params[0] = "cliprdr"; -+ remmina_rdp_add_static_channel(rfi->settings, 1, (char**) params); -+ } -+ -+ // Old version: remmina_rdp_load_plugin(rfi->instance->context->channels, rfi->settings, "cliprdr", NULL); -+ - } - - rdpdr_num = 0; -@@ -804,9 +861,19 @@ - if (rdpdr_num) - { - //remmina_rdp_load_plugin(rfi->channels, rfi->settings, "rdpdr", rfi->rdpdr_data); -- remmina_rdp_load_plugin(rfi->channels, rfi->settings, "rdpdr", rfi->settings); -+ remmina_rdp_load_plugin(rfi->instance->context->channels, rfi->settings, "rdpdr", rfi->settings); - } - -+ -+ for (index = 0; index < rfi->settings->StaticChannelCount; index++) -+ { -+ args = rfi->settings->StaticChannelArray[index]; -+ remmina_rdp_load_static_channel_addin(rfi->instance->context->channels, rfi->settings, args->argv[0], args); -+ -+ } -+ -+ -+ - if (!freerdp_connect(rfi->instance)) - { - if (!rfi->user_cancelled) -@@ -817,6 +884,8 @@ - - return FALSE; - } -+ -+ - - remmina_rdp_main_loop(gp); - -@@ -843,6 +912,8 @@ - { - freerdp* instance; - rfContext* rfi; -+ -+ freerdp_register_addin_provider(freerdp_channels_load_static_addin_entry, 0); - - instance = freerdp_new(); - instance->PreConnect = remmina_rdp_pre_connect; -@@ -861,7 +932,7 @@ - rfi->protocol_widget = gp; - rfi->instance = instance; - rfi->settings = instance->settings; -- rfi->channels = freerdp_channels_new(); -+ rfi->instance->context->channels = freerdp_channels_new(); - - pthread_mutex_init(&rfi->mutex, NULL); - -@@ -896,6 +967,7 @@ - { - rfContext* rfi; - freerdp* instance; -+ - - rfi = GET_DATA(gp); - instance = rfi->instance; -@@ -918,11 +990,11 @@ - - if (instance) - { -- if (rfi->channels) -+ if (instance->context->channels) - { - //freerdp_channels_close(rfi->channels, instance); -- freerdp_channels_free(rfi->channels); -- rfi->channels = NULL; -+ freerdp_channels_free(instance->context->channels); -+ instance->context->channels = NULL; - } - if (freerdp_shall_disconnect(instance)) - { -diff -Naur Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_plugin.h Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_plugin.h ---- Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb/remmina-plugins/rdp/rdp_plugin.h 2014-07-30 00:07:46.000000000 +0400 -+++ Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.WORK/remmina-plugins/rdp/rdp_plugin.h 2014-08-15 20:47:19.714200567 +0400 -@@ -90,7 +90,7 @@ - /* main */ - rdpSettings* settings; - freerdp* instance; -- rdpChannels* channels; -+ // rdpChannels* channels; - - pthread_t thread; - pthread_mutex_t mutex; diff --git a/remmina-rfx_context_new.patch b/remmina-rfx_context_new.patch new file mode 100644 index 0000000..7acffe9 --- /dev/null +++ b/remmina-rfx_context_new.patch @@ -0,0 +1,12 @@ +diff -Naur Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.old/remmina-plugins/rdp/rdp_plugin.c Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b/remmina-plugins/rdp/rdp_plugin.c +--- Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.old/remmina-plugins/rdp/rdp_plugin.c 2014-10-21 15:28:25.956724006 +0200 ++++ Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b/remmina-plugins/rdp/rdp_plugin.c 2014-10-21 15:29:01.772465878 +0200 +@@ -257,7 +257,7 @@ + settings->LargePointerFlag = True; + settings->PerformanceFlags = PERF_FLAG_NONE; + +- rfi->rfx_context = rfx_context_new(); ++ rfi->rfx_context = rfx_context_new(FALSE); + } + + freerdp_client_load_addins(instance->context->channels, instance->settings); diff --git a/remmina.spec b/remmina.spec index 76e9c40..6510d73 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,17 +1,17 @@ # Review at https://bugzilla.redhat.com/show_bug.cgi?id=553402 # https://fedoraproject.org/wiki/Packaging:SourceURL#Github -%global commit 65d2ca4872150942cced1fbe92248dd933e9c0cb +%global commit efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: remmina -Version: 1.0.0 -Release: 15%{?shortcommit:.git.%{shortcommit}}%{?dist} +Version: 1.1.1 +Release: 1%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net -#VCS: git:https://github.com/FreeRDP/Remmina.git +# VCS: git:https://github.com/FreeRDP/Remmina.git Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{commit}.tar.gz # Cmake helper file to easy build plugins outside remmina sourse tree @@ -37,8 +37,8 @@ BuildRequires: libxkbfile-devel BuildRequires: telepathy-glib-devel BuildRequires: vte3-devel -# https://github.com/FreeRDP/Remmina/issues/280#issuecomment-52254273 Thanks to Giovanni Panozzo -Patch0: remmina-1.0-clipboard-fix.patch +# https://github.com/FreeRDP/Remmina/issues/228 +Patch0: %{name}-rfx_context_new.patch # We don't ship the remmina-plugins-common package any longer Provides: remmina-plugins-common = %{version} @@ -148,7 +148,7 @@ client. %prep %setup -qn Remmina-%{commit} -%patch0 -p1 -b .clipboard +%patch0 -p1 -b .rfx_context_new # Do not install tools into user home directory sed -i \ @@ -305,6 +305,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Oct 21 2014 Simone Caronni - 1.1.1-1.git.efb7b5f +- Update to latest snapshot, version now at 1.1.1. Remove upstreamed patch. +- Full GTK3 version removed and moved to 1.2.0 branch. +- Add patch that was lost upstram in the various branching. + * Wed Sep 3 2014 Orion Poplawski - 1.0.0-15.git.65d2ca4 - Have remmina-plugins-nx require nxproxy (bug #1004860) diff --git a/sources b/sources index 9bf32ba..10c2c9f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fffbf18cdbcb280a0d0ae6e4ecf05f03 Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.tar.gz +777bfceeb66be43779e53e87ce8d3f8b Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.tar.gz From f5d0fdd77d49efff2d15bd650c051e5d585989c3 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 21 Oct 2014 16:19:51 +0200 Subject: [PATCH 050/185] Fix sources file --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 10c2c9f..e34d0d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -777bfceeb66be43779e53e87ce8d3f8b Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.tar.gz +777bfceeb66be43779e53e87ce8d3f8b Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.tar.gz From 2ef81fd6ea292e04e97ecba7393c1b1c7b5bc174 Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Thu, 23 Oct 2014 22:00:40 +0400 Subject: [PATCH 051/185] Try enable APPINDICATOR by suggestion of Giovanni Panozzo. --- remmina.spec | 56 ++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/remmina.spec b/remmina.spec index 6510d73..4f97f8f 100644 --- a/remmina.spec +++ b/remmina.spec @@ -4,38 +4,39 @@ %global commit efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b %global shortcommit %(c=%{commit}; echo ${c:0:7}) -Name: remmina -Version: 1.1.1 -Release: 1%{?shortcommit:.git.%{shortcommit}}%{?dist} -Summary: Remote Desktop Client +Name: remmina +Version: 1.1.1 +Release: 2%{?shortcommit:.git.%{shortcommit}}%{?dist} +Summary: Remote Desktop Client -License: GPLv2+ and MIT -URL: http://remmina.sourceforge.net +License: GPLv2+ and MIT +URL: http://remmina.sourceforge.net # VCS: git:https://github.com/FreeRDP/Remmina.git -Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{commit}.tar.gz +Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{commit}.tar.gz # Cmake helper file to easy build plugins outside remmina sourse tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which # use http://www.muflone.com/remmina-plugin-builder/ with remmina bundled source. # So we can't use it directly only as instructions. -Source1: pluginBuild-CMakeLists.txt - -BuildRequires: avahi-ui-devel -BuildRequires: cmake >= 2.8 -BuildRequires: desktop-file-utils -BuildRequires: freerdp-devel >= 1:1.1.0 -BuildRequires: gettext -BuildRequires: gnutls-devel -BuildRequires: gtk3-devel -BuildRequires: intltool -BuildRequires: libgcrypt-devel -BuildRequires: libgnome-keyring-devel -BuildRequires: libjpeg-devel -BuildRequires: libssh-devel >= 0.4 -BuildRequires: libvncserver-devel -BuildRequires: libxkbfile-devel -BuildRequires: telepathy-glib-devel -BuildRequires: vte3-devel +Source1: pluginBuild-CMakeLists.txt + +BuildRequires: avahi-ui-devel +BuildRequires: cmake >= 2.8 +BuildRequires: desktop-file-utils +BuildRequires: freerdp-devel >= 1:1.1.0 +BuildRequires: gettext +BuildRequires: gnutls-devel +BuildRequires: gtk3-devel +BuildRequires: intltool +BuildRequires: libgcrypt-devel +BuildRequires: libgnome-keyring-devel +BuildRequires: libjpeg-devel +BuildRequires: libssh-devel >= 0.4 +BuildRequires: libvncserver-devel +BuildRequires: libxkbfile-devel +BuildRequires: telepathy-glib-devel +BuildRequires: vte3-devel +BuildRequires: libappindicator-gtk3-devel # https://github.com/FreeRDP/Remmina/issues/228 Patch0: %{name}-rfx_context_new.patch @@ -170,7 +171,7 @@ mkdir -p build -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_COMPONENT=1 \ -DLIBVNCSERVER_WITH_CLIENT_TLS=1 \ - -DWITH_APPINDICATOR=OFF \ + -DWITH_APPINDICATOR=ON \ -DWITH_AVAHI=ON \ -DWITH_FREERDP=ON \ -DWITH_GCRYPT=ON \ @@ -305,6 +306,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Oct 23 2014 Pavel Alexeev - 1.1.1-2.git.efb7b5f +- Try enable APPINDICATOR by suggestion of Giovanni Panozzo. + * Tue Oct 21 2014 Simone Caronni - 1.1.1-1.git.efb7b5f - Update to latest snapshot, version now at 1.1.1. Remove upstreamed patch. - Full GTK3 version removed and moved to 1.2.0 branch. From aa3a594b05ac0d877f3aa952a1d80ede350827f8 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 19 Dec 2014 16:16:59 +0100 Subject: [PATCH 052/185] Update to 1.2.0-rcgit.1 --- .gitignore | 1 + remmina-rfx_context_new.patch | 12 ----------- remmina-tools.patch | 28 +++++++++++++++++++++++++ remmina.spec | 39 ++++++++++++++--------------------- sources | 2 +- 5 files changed, 46 insertions(+), 36 deletions(-) delete mode 100644 remmina-rfx_context_new.patch create mode 100644 remmina-tools.patch diff --git a/.gitignore b/.gitignore index 03d15a9..6e961b2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ remmina-0.7.5.tar.gz /Remmina-1470c974cddaede87d09345f712202ddcda0810b.tar.gz /Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.tar.gz /Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.tar.gz +/v1.2.0-rcgit.1.tar.gz diff --git a/remmina-rfx_context_new.patch b/remmina-rfx_context_new.patch deleted file mode 100644 index 7acffe9..0000000 --- a/remmina-rfx_context_new.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.old/remmina-plugins/rdp/rdp_plugin.c Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b/remmina-plugins/rdp/rdp_plugin.c ---- Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.old/remmina-plugins/rdp/rdp_plugin.c 2014-10-21 15:28:25.956724006 +0200 -+++ Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b/remmina-plugins/rdp/rdp_plugin.c 2014-10-21 15:29:01.772465878 +0200 -@@ -257,7 +257,7 @@ - settings->LargePointerFlag = True; - settings->PerformanceFlags = PERF_FLAG_NONE; - -- rfi->rfx_context = rfx_context_new(); -+ rfi->rfx_context = rfx_context_new(FALSE); - } - - freerdp_client_load_addins(instance->context->channels, instance->settings); diff --git a/remmina-tools.patch b/remmina-tools.patch new file mode 100644 index 0000000..6bf0c93 --- /dev/null +++ b/remmina-tools.patch @@ -0,0 +1,28 @@ +From 17827fbd95156ad249b429bb0d862b5affa615e8 Mon Sep 17 00:00:00 2001 +From: Christian Hesse +Date: Mon, 24 Nov 2014 12:28:47 +0100 +Subject: [PATCH] install external tools to datadir, not user's home dir + +--- + remmina/external_tools/CMakeLists.txt | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/remmina/external_tools/CMakeLists.txt b/remmina/external_tools/CMakeLists.txt +index 9cc0f89..9492a9c 100644 +--- a/remmina/external_tools/CMakeLists.txt ++++ b/remmina/external_tools/CMakeLists.txt +@@ -30,10 +30,7 @@ + # version. If you delete this exception statement from all source + # files in the program, then also delete it here. + +- +-set(EXTERNAL_TOOLS_DIR "$ENV{HOME}/.remmina/external_tools") +- +-file(MAKE_DIRECTORY ${EXTERNAL_TOOLS_DIR}) ++set(EXTERNAL_TOOLS_DIR "${CMAKE_INSTALL_FULL_DATADIR}/remmina/external_tools") + + INSTALL(PROGRAMS launcher.sh pause.sh remmina_filezilla_sftp.sh remmina_filezilla_sftp_pki.sh remmina_nslookup.sh remmina_ping.sh remmina_traceroute.sh DESTINATION ${EXTERNAL_TOOLS_DIR}) + +-- +2.1.0 + diff --git a/remmina.spec b/remmina.spec index 4f97f8f..dba40cb 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,18 +1,14 @@ # Review at https://bugzilla.redhat.com/show_bug.cgi?id=553402 -# https://fedoraproject.org/wiki/Packaging:SourceURL#Github -%global commit efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - Name: remmina -Version: 1.1.1 -Release: 2%{?shortcommit:.git.%{shortcommit}}%{?dist} +Version: 1.2.0 +Release: 0.1.rcgit.1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net # VCS: git:https://github.com/FreeRDP/Remmina.git -Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{commit}.tar.gz +Source0: https://github.com/FreeRDP/Remmina/archive/v1.2.0-rcgit.1.tar.gz # Cmake helper file to easy build plugins outside remmina sourse tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -23,7 +19,7 @@ Source1: pluginBuild-CMakeLists.txt BuildRequires: avahi-ui-devel BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils -BuildRequires: freerdp-devel >= 1:1.1.0 +BuildRequires: freerdp-devel >= 1:1.2.0-0.4.beta.1 BuildRequires: gettext BuildRequires: gnutls-devel BuildRequires: gtk3-devel @@ -33,13 +29,14 @@ BuildRequires: libgnome-keyring-devel BuildRequires: libjpeg-devel BuildRequires: libssh-devel >= 0.4 BuildRequires: libvncserver-devel +BuildRequires: libwinpr-devel >= 1:1.2.0-0.4.beta.1 BuildRequires: libxkbfile-devel BuildRequires: telepathy-glib-devel BuildRequires: vte3-devel BuildRequires: libappindicator-gtk3-devel -# https://github.com/FreeRDP/Remmina/issues/228 -Patch0: %{name}-rfx_context_new.patch +# https://github.com/FreeRDP/Remmina/commit/17827fbd95156ad249b429bb0d862b5affa615e8 +Patch0: %{name}-tools.patch # We don't ship the remmina-plugins-common package any longer Provides: remmina-plugins-common = %{version} @@ -147,18 +144,8 @@ client. %prep -%setup -qn Remmina-%{commit} - -%patch0 -p1 -b .rfx_context_new - -# Do not install tools into user home directory -sed -i \ - -e 's@$ENV{HOME}/.%{name}@%{_libexecdir}/%{name}@g' \ - -e '/^file(MAKE_DIRECTORY/d' \ - %{name}/external_tools/CMakeLists.txt -sed -i \ - -e 's@%s/.%{name}@%{_libexecdir}/%{name}@g' \ - %{name}/src/%{name}_external_tools.c +%setup -qn Remmina-1.2.0-rcgit.1 +%patch0 -p1 #? Hack: https://github.com/FreeRDP/Remmina/issues/292 sed -i 's#install(DIRECTORY include/remmina DESTINATION include/remmina #install(DIRECTORY remmina/include/remmina DESTINATION include/ #' CMakeLists.txt @@ -270,7 +257,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/icons/hicolor/*/actions/*.* %{_datadir}/icons/hicolor/*/apps/*.* %{_datadir}/icons/hicolor/*/emblems/remmina-sftp.png -%{_libexecdir}/%{name}/ +%{_datadir}/%{name}/ %dir %{_libdir}/remmina/ %dir %{_libdir}/remmina/plugins/ @@ -306,6 +293,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Dec 16 2014 Simone Caronni - 1.2.0-0.1.rcgit.1 +- Update to latest 1.2.0 snapshot. +- Require latest FreeRDP 1.2.0-beta1+android9 for building. +- External tools now in datadir, use upstream commit for it. +- Removed upstreamed patch. + * Thu Oct 23 2014 Pavel Alexeev - 1.1.1-2.git.efb7b5f - Try enable APPINDICATOR by suggestion of Giovanni Panozzo. diff --git a/sources b/sources index e34d0d6..71f6982 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -777bfceeb66be43779e53e87ce8d3f8b Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.tar.gz +bd92d1beb5c0c3acb6e32ad546e30d84 v1.2.0-rcgit.1.tar.gz From 341c7753e7918ad07a91eac2d57b291f5ca63235 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 13 Mar 2015 15:52:59 +0100 Subject: [PATCH 053/185] Update to latest 1.2.0 snapshot (post 1.2.0-rcgit.2) for updated FreeRDP. Require latest FreeRDP snapshot for building. Remove upstream patch. Format and sort BuildRequires, add AppData file. --- .gitignore | 1 + remmina.spec | 76 +++++++++++++++++++++++++++++----------------------- sources | 2 +- 3 files changed, 44 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index 6e961b2..f277689 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ remmina-0.7.5.tar.gz /Remmina-65d2ca4872150942cced1fbe92248dd933e9c0cb.tar.gz /Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.tar.gz /v1.2.0-rcgit.1.tar.gz +/Remmina-b3e339ea5478c0941a6dfa0bf8fed9e7a1c70e0b.tar.gz diff --git a/remmina.spec b/remmina.spec index dba40cb..3f14769 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,42 +1,44 @@ # Review at https://bugzilla.redhat.com/show_bug.cgi?id=553402 -Name: remmina -Version: 1.2.0 -Release: 0.1.rcgit.1%{?dist} -Summary: Remote Desktop Client +# https://fedoraproject.org/wiki/Packaging:SourceURL#Github +%global commit b3e339ea5478c0941a6dfa0bf8fed9e7a1c70e0b +%global shortcommit %(c=%{commit}; echo ${c:0:7}) -License: GPLv2+ and MIT -URL: http://remmina.sourceforge.net +Name: remmina +Version: 1.2.0 +Release: 0.3%{?shortcommit:.git.%{shortcommit}}%{?dist} +Summary: Remote Desktop Client + +License: GPLv2+ and MIT +URL: http://remmina.sourceforge.net # VCS: git:https://github.com/FreeRDP/Remmina.git -Source0: https://github.com/FreeRDP/Remmina/archive/v1.2.0-rcgit.1.tar.gz +Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{commit}.tar.gz # Cmake helper file to easy build plugins outside remmina sourse tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which # use http://www.muflone.com/remmina-plugin-builder/ with remmina bundled source. # So we can't use it directly only as instructions. -Source1: pluginBuild-CMakeLists.txt - -BuildRequires: avahi-ui-devel -BuildRequires: cmake >= 2.8 -BuildRequires: desktop-file-utils -BuildRequires: freerdp-devel >= 1:1.2.0-0.4.beta.1 -BuildRequires: gettext -BuildRequires: gnutls-devel -BuildRequires: gtk3-devel -BuildRequires: intltool -BuildRequires: libgcrypt-devel -BuildRequires: libgnome-keyring-devel -BuildRequires: libjpeg-devel -BuildRequires: libssh-devel >= 0.4 -BuildRequires: libvncserver-devel -BuildRequires: libwinpr-devel >= 1:1.2.0-0.4.beta.1 -BuildRequires: libxkbfile-devel -BuildRequires: telepathy-glib-devel -BuildRequires: vte3-devel -BuildRequires: libappindicator-gtk3-devel - -# https://github.com/FreeRDP/Remmina/commit/17827fbd95156ad249b429bb0d862b5affa615e8 -Patch0: %{name}-tools.patch +Source1: pluginBuild-CMakeLists.txt + +BuildRequires: avahi-ui-devel +BuildRequires: cmake >= 2.8 +BuildRequires: desktop-file-utils +BuildRequires: freerdp-devel >= 1:1.2.1-0.1 +BuildRequires: gettext +BuildRequires: gnutls-devel +BuildRequires: gtk3-devel +BuildRequires: intltool +BuildRequires: libappindicator-gtk3-devel +BuildRequires: libappstream-glib +BuildRequires: libgcrypt-devel +BuildRequires: libgnome-keyring-devel +BuildRequires: libjpeg-devel +BuildRequires: libssh-devel >= 0.4 +BuildRequires: libvncserver-devel +BuildRequires: libwinpr-devel >= 1:1.2.1-0.1 +BuildRequires: libxkbfile-devel +BuildRequires: telepathy-glib-devel +BuildRequires: vte3-devel # We don't ship the remmina-plugins-common package any longer Provides: remmina-plugins-common = %{version} @@ -144,8 +146,7 @@ client. %prep -%setup -qn Remmina-1.2.0-rcgit.1 -%patch0 -p1 +%setup -qn Remmina-%{commit} #? Hack: https://github.com/FreeRDP/Remmina/issues/292 sed -i 's#install(DIRECTORY include/remmina DESTINATION include/remmina #install(DIRECTORY remmina/include/remmina DESTINATION include/ #' CMakeLists.txt @@ -178,6 +179,7 @@ make %{?_smp_mflags} %make_install desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml mkdir -p %{buildroot}/%{_libdir}/cmake/%{name}/ cp -pr cmake/*.cmake %{buildroot}/%{_libdir}/cmake/%{name}/ @@ -185,7 +187,6 @@ cp -pr config.h.in %{buildroot}/%{_includedir}/%{name}/ cp -p %{SOURCE1} %{buildroot}/%{_includedir}/%{name}/ %find_lang %{name} -%find_lang %{name}-plugins %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -250,9 +251,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -%files -f %{name}.lang -f %{name}-plugins.lang +%files -f %{name}.lang %doc AUTHORS ChangeLog LICENSE README %{_bindir}/%{name} +%{_datadir}/appdata/*.appdata.xml %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/actions/*.* %{_datadir}/icons/hicolor/*/apps/*.* @@ -293,6 +295,12 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Feb 24 2015 Simone Caronni - 1.2.0-0.2.rcgit.2 +- Update to latest 1.2.0 snapshot (post 1.2.0-rcgit.2) for updated FreeRDP. +- Require latest FreeRDP snapshot for building. +- Remove upstream patch. +- Format and sort BuildRequires, add AppData file. + * Tue Dec 16 2014 Simone Caronni - 1.2.0-0.1.rcgit.1 - Update to latest 1.2.0 snapshot. - Require latest FreeRDP 1.2.0-beta1+android9 for building. diff --git a/sources b/sources index 71f6982..f88fb62 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bd92d1beb5c0c3acb6e32ad546e30d84 v1.2.0-rcgit.1.tar.gz +5416021bacea67866835a14dd2f22af5 Remmina-b3e339ea5478c0941a6dfa0bf8fed9e7a1c70e0b.tar.gz From cd949797875a57d9232e643ebb20ffc04f2dad43 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 13 Mar 2015 16:15:57 +0100 Subject: [PATCH 054/185] Fix changelog --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 3f14769..09aeed1 100644 --- a/remmina.spec +++ b/remmina.spec @@ -295,7 +295,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog -* Tue Feb 24 2015 Simone Caronni - 1.2.0-0.2.rcgit.2 +* Tue Feb 24 2015 Simone Caronni - 1.2.0-0.3.git.b3e339e - Update to latest 1.2.0 snapshot (post 1.2.0-rcgit.2) for updated FreeRDP. - Require latest FreeRDP snapshot for building. - Remove upstream patch. From e2a0493c1559b43ba97e5ba09f2768e45188a028 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 17 Mar 2015 17:48:02 +0100 Subject: [PATCH 055/185] Update build requirements --- remmina.spec | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/remmina.spec b/remmina.spec index 09aeed1..b023edc 100644 --- a/remmina.spec +++ b/remmina.spec @@ -6,7 +6,7 @@ Name: remmina Version: 1.2.0 -Release: 0.3%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 0.4%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -20,25 +20,23 @@ Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{c # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt -BuildRequires: avahi-ui-devel BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils -BuildRequires: freerdp-devel >= 1:1.2.1-0.1 BuildRequires: gettext -BuildRequires: gnutls-devel -BuildRequires: gtk3-devel BuildRequires: intltool -BuildRequires: libappindicator-gtk3-devel BuildRequires: libappstream-glib BuildRequires: libgcrypt-devel -BuildRequires: libgnome-keyring-devel -BuildRequires: libjpeg-devel -BuildRequires: libssh-devel >= 0.4 -BuildRequires: libvncserver-devel -BuildRequires: libwinpr-devel >= 1:1.2.1-0.1 -BuildRequires: libxkbfile-devel -BuildRequires: telepathy-glib-devel -BuildRequires: vte3-devel +BuildRequires: pkgconfig(appindicator3-0.1) +BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 +BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 +BuildRequires: pkgconfig(freerdp) >= 1.2.0-beta1 +BuildRequires: pkgconfig(gnome-keyring-1) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(libssh) >= 0.6 +BuildRequires: pkgconfig(libvncserver) +BuildRequires: pkgconfig(telepathy-glib) +BuildRequires: pkgconfig(vte-2.91) +BuildRequires: pkgconfig(xkbfile) # We don't ship the remmina-plugins-common package any longer Provides: remmina-plugins-common = %{version} @@ -158,7 +156,6 @@ mkdir -p build -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_COMPONENT=1 \ - -DLIBVNCSERVER_WITH_CLIENT_TLS=1 \ -DWITH_APPINDICATOR=ON \ -DWITH_AVAHI=ON \ -DWITH_FREERDP=ON \ @@ -295,6 +292,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Mar 17 2015 Simone Caronni - 1.2.0-0.4.git.b3e339e +- Update build requirements. + * Tue Feb 24 2015 Simone Caronni - 1.2.0-0.3.git.b3e339e - Update to latest 1.2.0 snapshot (post 1.2.0-rcgit.2) for updated FreeRDP. - Require latest FreeRDP snapshot for building. From 7af7a221731c2144ae8e9cb097155fc3174d189e Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 1 May 2015 15:23:27 +0200 Subject: [PATCH 056/185] Update to latest snapshot (post 1.2.0-rcgit.3) --- remmina.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index b023edc..26689cd 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,12 +1,12 @@ # Review at https://bugzilla.redhat.com/show_bug.cgi?id=553402 # https://fedoraproject.org/wiki/Packaging:SourceURL#Github -%global commit b3e339ea5478c0941a6dfa0bf8fed9e7a1c70e0b +%global commit b3237e832df87bffc176c4f4024000b3d2d776cf %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: remmina Version: 1.2.0 -Release: 0.4%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 0.5%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -292,6 +292,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri May 01 2015 Simone Caronni - 1.2.0-0.5.git.b3237e8 +- Update to latest snapshot (post 1.2.0-rcgit.3). + * Tue Mar 17 2015 Simone Caronni - 1.2.0-0.4.git.b3e339e - Update build requirements. From 7c14fc74e2ffe5994475c0aa57d089c7c1cf642e Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 1 May 2015 15:25:02 +0200 Subject: [PATCH 057/185] Update sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f277689..13b9527 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ remmina-0.7.5.tar.gz /Remmina-efb7b5f87b2ed1604fa8bdf559fd4e08e2a18d9b.tar.gz /v1.2.0-rcgit.1.tar.gz /Remmina-b3e339ea5478c0941a6dfa0bf8fed9e7a1c70e0b.tar.gz +/Remmina-b3237e832df87bffc176c4f4024000b3d2d776cf.tar.gz diff --git a/sources b/sources index f88fb62..71f43f1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5416021bacea67866835a14dd2f22af5 Remmina-b3e339ea5478c0941a6dfa0bf8fed9e7a1c70e0b.tar.gz +71bd087cf110e227c30600f938fcd537 Remmina-b3237e832df87bffc176c4f4024000b3d2d776cf.tar.gz From bfc12eb3675e2e37040c5f46fbeb4542ff1dd0c0 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 3 Jun 2015 09:34:38 +0200 Subject: [PATCH 058/185] Remove appindicator support --- remmina.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/remmina.spec b/remmina.spec index 26689cd..d70b2d2 100644 --- a/remmina.spec +++ b/remmina.spec @@ -6,7 +6,7 @@ Name: remmina Version: 1.2.0 -Release: 0.5%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 0.6%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -26,7 +26,6 @@ BuildRequires: gettext BuildRequires: intltool BuildRequires: libappstream-glib BuildRequires: libgcrypt-devel -BuildRequires: pkgconfig(appindicator3-0.1) BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 BuildRequires: pkgconfig(freerdp) >= 1.2.0-beta1 @@ -156,7 +155,7 @@ mkdir -p build -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_COMPONENT=1 \ - -DWITH_APPINDICATOR=ON \ + -DWITH_APPINDICATOR=OFF \ -DWITH_AVAHI=ON \ -DWITH_FREERDP=ON \ -DWITH_GCRYPT=ON \ @@ -292,6 +291,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Jun 03 2015 Simone Caronni - 1.2.0-0.6.git.b3237e8 +- Remove appindicator support. + * Fri May 01 2015 Simone Caronni - 1.2.0-0.5.git.b3237e8 - Update to latest snapshot (post 1.2.0-rcgit.3). From 633fc2a6060a79a3c35faefc2c40855d3ae870bb Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 5 Jun 2015 09:56:51 +0200 Subject: [PATCH 059/185] Re-add appindicator support --- remmina.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index d70b2d2..6c1ac4c 100644 --- a/remmina.spec +++ b/remmina.spec @@ -6,7 +6,7 @@ Name: remmina Version: 1.2.0 -Release: 0.6%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 0.7%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -26,6 +26,7 @@ BuildRequires: gettext BuildRequires: intltool BuildRequires: libappstream-glib BuildRequires: libgcrypt-devel +BuildRequires: pkgconfig(appindicator3-0.1) BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 BuildRequires: pkgconfig(freerdp) >= 1.2.0-beta1 @@ -155,7 +156,7 @@ mkdir -p build -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_COMPONENT=1 \ - -DWITH_APPINDICATOR=OFF \ + -DWITH_APPINDICATOR=ON \ -DWITH_AVAHI=ON \ -DWITH_FREERDP=ON \ -DWITH_GCRYPT=ON \ @@ -291,6 +292,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Jun 05 2015 Simone Caronni - 1.2.0-0.7.git.b3237e8 +- Re-add appindicator support. See: + https://lists.fedoraproject.org/pipermail/devel/2015-June/211121.html + https://lists.fedoraproject.org/pipermail/devel/2014-March/196343.html + * Wed Jun 03 2015 Simone Caronni - 1.2.0-0.6.git.b3237e8 - Remove appindicator support. From 0cc55c70ba5fc6947dc5ab1670e1f4380d4e55c2 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 18 Jun 2015 22:17:01 +0000 Subject: [PATCH 060/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 6c1ac4c..33a88a9 100644 --- a/remmina.spec +++ b/remmina.spec @@ -6,7 +6,7 @@ Name: remmina Version: 1.2.0 -Release: 0.7%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 0.8%{?shortcommit:.git.%{shortcommit}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -292,6 +292,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jun 18 2015 Fedora Release Engineering - 1.2.0-0.8.git.b3237e8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Fri Jun 05 2015 Simone Caronni - 1.2.0-0.7.git.b3237e8 - Re-add appindicator support. See: https://lists.fedoraproject.org/pipermail/devel/2015-June/211121.html From f1d8479056dcc743c6584a0addc30517a9f19382 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 15 Nov 2015 12:15:32 +0100 Subject: [PATCH 061/185] Update to latest snapshot --- remmina-tools.patch | 28 ---------------------------- remmina.spec | 31 +++++++++++++++++-------------- 2 files changed, 17 insertions(+), 42 deletions(-) delete mode 100644 remmina-tools.patch diff --git a/remmina-tools.patch b/remmina-tools.patch deleted file mode 100644 index 6bf0c93..0000000 --- a/remmina-tools.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 17827fbd95156ad249b429bb0d862b5affa615e8 Mon Sep 17 00:00:00 2001 -From: Christian Hesse -Date: Mon, 24 Nov 2014 12:28:47 +0100 -Subject: [PATCH] install external tools to datadir, not user's home dir - ---- - remmina/external_tools/CMakeLists.txt | 5 +---- - 1 file changed, 1 insertion(+), 4 deletions(-) - -diff --git a/remmina/external_tools/CMakeLists.txt b/remmina/external_tools/CMakeLists.txt -index 9cc0f89..9492a9c 100644 ---- a/remmina/external_tools/CMakeLists.txt -+++ b/remmina/external_tools/CMakeLists.txt -@@ -30,10 +30,7 @@ - # version. If you delete this exception statement from all source - # files in the program, then also delete it here. - -- --set(EXTERNAL_TOOLS_DIR "$ENV{HOME}/.remmina/external_tools") -- --file(MAKE_DIRECTORY ${EXTERNAL_TOOLS_DIR}) -+set(EXTERNAL_TOOLS_DIR "${CMAKE_INSTALL_FULL_DATADIR}/remmina/external_tools") - - INSTALL(PROGRAMS launcher.sh pause.sh remmina_filezilla_sftp.sh remmina_filezilla_sftp_pki.sh remmina_nslookup.sh remmina_ping.sh remmina_traceroute.sh DESTINATION ${EXTERNAL_TOOLS_DIR}) - --- -2.1.0 - diff --git a/remmina.spec b/remmina.spec index 33a88a9..65224c6 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,20 +1,17 @@ -# Review at https://bugzilla.redhat.com/show_bug.cgi?id=553402 - -# https://fedoraproject.org/wiki/Packaging:SourceURL#Github -%global commit b3237e832df87bffc176c4f4024000b3d2d776cf -%global shortcommit %(c=%{commit}; echo ${c:0:7}) +# Main branch is the "next" branch, not master +%global commit0 8855df73b33fe5b92142e257c9ff679dea4fbd82 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: remmina Version: 1.2.0 -Release: 0.8%{?shortcommit:.git.%{shortcommit}}%{?dist} +Release: 0.9%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client - License: GPLv2+ and MIT URL: http://remmina.sourceforge.net -# VCS: git:https://github.com/FreeRDP/Remmina.git -Source0: https://github.com/FreeRDP/Remmina/archive/%{commit}/Remmina-%{commit}.tar.gz -# Cmake helper file to easy build plugins outside remmina sourse tree +Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{commit0}.tar.gz#/Remmina-%{shortcommit0}.tar.gz + +# Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which # use http://www.muflone.com/remmina-plugin-builder/ with remmina bundled source. # So we can't use it directly only as instructions. @@ -29,9 +26,9 @@ BuildRequires: libgcrypt-devel BuildRequires: pkgconfig(appindicator3-0.1) BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 -BuildRequires: pkgconfig(freerdp) >= 1.2.0-beta1 -BuildRequires: pkgconfig(gnome-keyring-1) +BuildRequires: pkgconfig(freerdp) >= 1.2.0 BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libssh) >= 0.6 BuildRequires: pkgconfig(libvncserver) BuildRequires: pkgconfig(telepathy-glib) @@ -144,7 +141,7 @@ client. %prep -%setup -qn Remmina-%{commit} +%setup -qn Remmina-%{commit0} #? Hack: https://github.com/FreeRDP/Remmina/issues/292 sed -i 's#install(DIRECTORY include/remmina DESTINATION include/remmina #install(DIRECTORY remmina/include/remmina DESTINATION include/ #' CMakeLists.txt @@ -249,7 +246,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang -%doc AUTHORS ChangeLog LICENSE README +%{!?_licensedir:%global license %%doc} +%license LICENSE +%doc AUTHORS ChangeLog README %{_bindir}/%{name} %{_datadir}/appdata/*.appdata.xml %{_datadir}/applications/*.desktop @@ -292,6 +291,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Nov 15 2015 Simone Caronni - 1.2.0-0.9.git.8855df7 +- Update to latest snapshot. +- Update to new packaging guidelines for GitHub sources and license tag. + * Thu Jun 18 2015 Fedora Release Engineering - 1.2.0-0.8.git.b3237e8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From a3279191347c816f53887dee573d2aa4a1fe7c43 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 15 Nov 2015 12:15:56 +0100 Subject: [PATCH 062/185] Update to latest snapshot --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 13b9527..d282cfc 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ remmina-0.7.5.tar.gz /v1.2.0-rcgit.1.tar.gz /Remmina-b3e339ea5478c0941a6dfa0bf8fed9e7a1c70e0b.tar.gz /Remmina-b3237e832df87bffc176c4f4024000b3d2d776cf.tar.gz +/Remmina-8855df7.tar.gz diff --git a/sources b/sources index 71f43f1..682b790 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -71bd087cf110e227c30600f938fcd537 Remmina-b3237e832df87bffc176c4f4024000b3d2d776cf.tar.gz +056402f3c1489ba6cacd466afce2bca8 Remmina-8855df7.tar.gz From 2c0a39e786b97148a43918da8b27ebcd4497eaaf Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 15 Nov 2015 17:43:30 +0100 Subject: [PATCH 063/185] Bump FreeRDP requirement to make it more explicit --- remmina.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 65224c6..814d172 100644 --- a/remmina.spec +++ b/remmina.spec @@ -26,7 +26,7 @@ BuildRequires: libgcrypt-devel BuildRequires: pkgconfig(appindicator3-0.1) BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 -BuildRequires: pkgconfig(freerdp) >= 1.2.0 +BuildRequires: pkgconfig(freerdp) >= 2.0.0 BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libssh) >= 0.6 @@ -294,6 +294,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : * Sun Nov 15 2015 Simone Caronni - 1.2.0-0.9.git.8855df7 - Update to latest snapshot. - Update to new packaging guidelines for GitHub sources and license tag. +- Bump FreeRDP requirement to make it more explicit. * Thu Jun 18 2015 Fedora Release Engineering - 1.2.0-0.8.git.b3237e8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 8468c6802fe1d8334f7cbf0b844659920d92a624 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 13 Dec 2015 11:24:09 +0100 Subject: [PATCH 064/185] Update to latest snapshot (1.2.0.rcgit.6), Wayland backend has been disabled --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d282cfc..6c570f6 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ remmina-0.7.5.tar.gz /Remmina-b3e339ea5478c0941a6dfa0bf8fed9e7a1c70e0b.tar.gz /Remmina-b3237e832df87bffc176c4f4024000b3d2d776cf.tar.gz /Remmina-8855df7.tar.gz +/Remmina-b43697d.tar.gz diff --git a/remmina.spec b/remmina.spec index 814d172..b8f17dc 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,10 +1,10 @@ # Main branch is the "next" branch, not master -%global commit0 8855df73b33fe5b92142e257c9ff679dea4fbd82 +%global commit0 b43697d8d79cea20d3fdbdea2c4b8de92a2f331f %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: remmina Version: 1.2.0 -Release: 0.9%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.10%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -291,6 +291,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sun Dec 13 2015 Simone Caronni - 1.2.0-0.10.git.b43697d +- Update to latest snapshot (1.2.0.rcgit.6), Wayland backend has been disabled. + * Sun Nov 15 2015 Simone Caronni - 1.2.0-0.9.git.8855df7 - Update to latest snapshot. - Update to new packaging guidelines for GitHub sources and license tag. diff --git a/sources b/sources index 682b790..465aa73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -056402f3c1489ba6cacd466afce2bca8 Remmina-8855df7.tar.gz +912e4c70500ed99dddcbb97380178341 Remmina-b43697d.tar.gz From 21f9cfdbd5024759495c3eb9b1cc1de18ef796a1 Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Fri, 1 Jan 2016 18:25:05 +0300 Subject: [PATCH 065/185] use new "Recommends" weak dependencies for plugins - bz#1241658 --- remmina.spec | 62 ++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/remmina.spec b/remmina.spec index b8f17dc..8650cfc 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,43 +2,44 @@ %global commit0 b43697d8d79cea20d3fdbdea2c4b8de92a2f331f %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) -Name: remmina -Version: 1.2.0 -Release: 0.10%{?shortcommit0:.git.%{shortcommit0}}%{?dist} -Summary: Remote Desktop Client -License: GPLv2+ and MIT -URL: http://remmina.sourceforge.net - -Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{commit0}.tar.gz#/Remmina-%{shortcommit0}.tar.gz +Name: remmina +Version: 1.2.0 +Release: 0.11%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Summary: Remote Desktop Client +License: GPLv2+ and MIT +URL: http://remmina.sourceforge.net +Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{commit0}.tar.gz#/Remmina-%{shortcommit0}.tar.gz # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which # use http://www.muflone.com/remmina-plugin-builder/ with remmina bundled source. # So we can't use it directly only as instructions. -Source1: pluginBuild-CMakeLists.txt - -BuildRequires: cmake >= 2.8 -BuildRequires: desktop-file-utils -BuildRequires: gettext -BuildRequires: intltool -BuildRequires: libappstream-glib -BuildRequires: libgcrypt-devel -BuildRequires: pkgconfig(appindicator3-0.1) -BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 -BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 -BuildRequires: pkgconfig(freerdp) >= 2.0.0 -BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(libsecret-1) -BuildRequires: pkgconfig(libssh) >= 0.6 -BuildRequires: pkgconfig(libvncserver) -BuildRequires: pkgconfig(telepathy-glib) -BuildRequires: pkgconfig(vte-2.91) -BuildRequires: pkgconfig(xkbfile) +Source1: pluginBuild-CMakeLists.txt + +BuildRequires: cmake >= 2.8 +BuildRequires: desktop-file-utils +BuildRequires: gettext +BuildRequires: intltool +BuildRequires: libappstream-glib +BuildRequires: libgcrypt-devel +BuildRequires: pkgconfig(appindicator3-0.1) +BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 +BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 +BuildRequires: pkgconfig(freerdp) >= 2.0.0 +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(libsecret-1) +BuildRequires: pkgconfig(libssh) >= 0.6 +BuildRequires: pkgconfig(libvncserver) +BuildRequires: pkgconfig(telepathy-glib) +BuildRequires: pkgconfig(vte-2.91) +BuildRequires: pkgconfig(xkbfile) # We don't ship the remmina-plugins-common package any longer -Provides: remmina-plugins-common = %{version} -Obsoletes: remmina-plugins-common < 1.0.0-7 +Provides: remmina-plugins-common = %{version} +Obsoletes: remmina-plugins-common < 1.0.0-7 +Recommends: remmina-plugins-telepathy remmina-plugins-nx remmina-plugins-rdp +Recommends: remmina-plugins-gnome remmina-plugins-vnc remmina-plugins-xdmcp %description Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -291,6 +292,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Jan 01 2016 Pavel Alexeev - 1.2.0-0.11.git.b43697d +- Recommends all plugins by suggestion bz#1241658. + * Sun Dec 13 2015 Simone Caronni - 1.2.0-0.10.git.b43697d - Update to latest snapshot (1.2.0.rcgit.6), Wayland backend has been disabled. From ba52c25c29b209effda1c728c3dfd067266636bb Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Tue, 5 Jan 2016 01:34:27 +0300 Subject: [PATCH 066/185] - Update to version 1.2.0-rcgit.7. --- remmina.spec | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/remmina.spec b/remmina.spec index 8650cfc..698df9d 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,14 +1,16 @@ # Main branch is the "next" branch, not master -%global commit0 b43697d8d79cea20d3fdbdea2c4b8de92a2f331f -%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +#%%global commit0 b43697d8d79cea20d3fdbdea2c4b8de92a2f331f +#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) +%global upstream_version 1.2.0-rcgit.7 Name: remmina Version: 1.2.0 -Release: 0.11%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.12.rcgit.7%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net -Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{commit0}.tar.gz#/Remmina-%{shortcommit0}.tar.gz +#Source0: https://github.com/FreeRDP/Remmina/archive/%%{commit0}/Remmina-%%{commit0}.tar.gz#/Remmina-%%{shortcommit0}.tar.gz +Source0: https://github.com/FreeRDP/Remmina/archive/1.2.0-rcgit.7.tar.gz#/Remmina-%{upstream_version}.tar.gz # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -142,7 +144,7 @@ client. %prep -%setup -qn Remmina-%{commit0} +%setup -qn Remmina-%{upstream_version} #? Hack: https://github.com/FreeRDP/Remmina/issues/292 sed -i 's#install(DIRECTORY include/remmina DESTINATION include/remmina #install(DIRECTORY remmina/include/remmina DESTINATION include/ #' CMakeLists.txt @@ -249,7 +251,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang %{!?_licensedir:%global license %%doc} %license LICENSE -%doc AUTHORS ChangeLog README +%doc AUTHORS ChangeLog README.md %{_bindir}/%{name} %{_datadir}/appdata/*.appdata.xml %{_datadir}/applications/*.desktop @@ -292,6 +294,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Jan 02 2016 Pavel Alexeev - 1.2.0-0.12.rcgit.7 +- Update to version 1.2.0-rcgit.7. + * Fri Jan 01 2016 Pavel Alexeev - 1.2.0-0.11.git.b43697d - Recommends all plugins by suggestion bz#1241658. From 9ffc3a8ec80d2d47cecce48b105f71fc19c0fe38 Mon Sep 17 00:00:00 2001 From: Hubbitus Date: Tue, 5 Jan 2016 12:14:58 +0300 Subject: [PATCH 067/185] Update to version 1.2.0-rcgit.7. --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6c570f6..736624d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ remmina-0.7.5.tar.gz /Remmina-b3237e832df87bffc176c4f4024000b3d2d776cf.tar.gz /Remmina-8855df7.tar.gz /Remmina-b43697d.tar.gz +/Remmina-1.2.0-rcgit.7.tar.gz diff --git a/sources b/sources index 465aa73..bffa549 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -912e4c70500ed99dddcbb97380178341 Remmina-b43697d.tar.gz +31ca754ee42cad5e0d086b42b81e719f Remmina-1.2.0-rcgit.7.tar.gz From c3ef9de719a69c14538a5546fee1b0d7f3c78b19 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 4 Feb 2016 22:06:50 +0000 Subject: [PATCH 068/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 698df9d..cd3017f 100644 --- a/remmina.spec +++ b/remmina.spec @@ -5,7 +5,7 @@ Name: remmina Version: 1.2.0 -Release: 0.12.rcgit.7%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.13.rcgit.7%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -294,6 +294,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 1.2.0-0.13.rcgit.7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Sat Jan 02 2016 Pavel Alexeev - 1.2.0-0.12.rcgit.7 - Update to version 1.2.0-rcgit.7. From 6eeca8cb2b43e2486b6812c0d5ef2ddc024ec21b Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Fri, 20 May 2016 16:37:41 +0100 Subject: [PATCH 069/185] Update to latest snapshot, rebuild against new FreeRDP --- .gitignore | 1 + remmina.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 736624d..e0e5a14 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ remmina-0.7.5.tar.gz /Remmina-8855df7.tar.gz /Remmina-b43697d.tar.gz /Remmina-1.2.0-rcgit.7.tar.gz +/Remmina-1.2.0.rcgit.12.tar.gz diff --git a/remmina.spec b/remmina.spec index cd3017f..f364626 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,16 +1,16 @@ # Main branch is the "next" branch, not master #%%global commit0 b43697d8d79cea20d3fdbdea2c4b8de92a2f331f #%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) -%global upstream_version 1.2.0-rcgit.7 +%global upstream_version 1.2.0.rcgit.12 Name: remmina Version: 1.2.0 -Release: 0.13.rcgit.7%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.14.rcgit.12%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net #Source0: https://github.com/FreeRDP/Remmina/archive/%%{commit0}/Remmina-%%{commit0}.tar.gz#/Remmina-%%{shortcommit0}.tar.gz -Source0: https://github.com/FreeRDP/Remmina/archive/1.2.0-rcgit.7.tar.gz#/Remmina-%{upstream_version}.tar.gz +Source0: https://github.com/FreeRDP/Remmina/archive/1.2.0.rcgit.12.tar.gz#/Remmina-%{upstream_version}.tar.gz # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -27,7 +27,7 @@ BuildRequires: libgcrypt-devel BuildRequires: pkgconfig(appindicator3-0.1) BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 -BuildRequires: pkgconfig(freerdp) >= 2.0.0 +BuildRequires: pkgconfig(freerdp2) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libssh) >= 0.6 @@ -294,6 +294,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri May 20 2016 David Woodhouse - 1.2.0-0.14.rcgit.12 +- Update to version 12.0-rcgit.12. + * Thu Feb 04 2016 Fedora Release Engineering - 1.2.0-0.13.rcgit.7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index bffa549..c1875d7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -31ca754ee42cad5e0d086b42b81e719f Remmina-1.2.0-rcgit.7.tar.gz +5bfa6a90077b41749a162c7a87e66461 Remmina-1.2.0.rcgit.12.tar.gz From 3f0dc112316d2dbd25091007c6ac2582e3ccb3cb Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Fri, 20 May 2016 17:18:11 +0100 Subject: [PATCH 070/185] Disable survey --- remmina.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index f364626..e71c160 100644 --- a/remmina.spec +++ b/remmina.spec @@ -5,7 +5,7 @@ Name: remmina Version: 1.2.0 -Release: 0.14.rcgit.12%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.15.rcgit.12%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -165,6 +165,7 @@ mkdir -p build -DWITH_LIBSSH=ON \ -DWITH_LIBSSH=ON \ -DWITH_PTHREAD=ON \ + -DWITH_SURVEY=OFF \ -DWITH_TELEPATHY=ON \ -DWITH_VTE=ON \ -DWITH_ZLIB=ON \ @@ -294,6 +295,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri May 20 2016 David Woodhouse - 1.2.0-0.15.rcgit.12 +- Disable survey, as it has build problems + * Fri May 20 2016 David Woodhouse - 1.2.0-0.14.rcgit.12 - Update to version 12.0-rcgit.12. From ed5772dba910dde75dadf3f89dad2ce0509964b1 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 7 Jun 2016 15:25:58 +0200 Subject: [PATCH 071/185] Update to version 12.0-rcgit.13, enable SPICE plugin --- .gitignore | 1 + remmina.spec | 41 +++++++++++++++++++++++++++++++++++------ sources | 2 +- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index e0e5a14..d5b813e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ remmina-0.7.5.tar.gz /Remmina-b43697d.tar.gz /Remmina-1.2.0-rcgit.7.tar.gz /Remmina-1.2.0.rcgit.12.tar.gz +/Remmina-1.2.0.rcgit.13.tar.gz diff --git a/remmina.spec b/remmina.spec index e71c160..ba5fd5a 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,16 +1,16 @@ # Main branch is the "next" branch, not master #%%global commit0 b43697d8d79cea20d3fdbdea2c4b8de92a2f331f #%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) -%global upstream_version 1.2.0.rcgit.12 +%global upstream_version 1.2.0.rcgit.13 Name: remmina Version: 1.2.0 -Release: 0.15.rcgit.12%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.16.rcgit.12%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net #Source0: https://github.com/FreeRDP/Remmina/archive/%%{commit0}/Remmina-%%{commit0}.tar.gz#/Remmina-%%{shortcommit0}.tar.gz -Source0: https://github.com/FreeRDP/Remmina/archive/1.2.0.rcgit.12.tar.gz#/Remmina-%{upstream_version}.tar.gz +Source0: https://github.com/FreeRDP/Remmina/archive/%{upstream_version}.tar.gz#/Remmina-%{upstream_version}.tar.gz # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -32,6 +32,7 @@ BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libssh) >= 0.6 BuildRequires: pkgconfig(libvncserver) +BuildRequires: pkgconfig(spice-client-gtk-3.0) BuildRequires: pkgconfig(telepathy-glib) BuildRequires: pkgconfig(vte-2.91) BuildRequires: pkgconfig(xkbfile) @@ -143,6 +144,19 @@ This package contains the XDMCP plugin for the Remmina remote desktop client. +%package plugins-spice +Summary: SPICE plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description plugins-spice +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny net-books. + +This package contains the SPICE plugin for the Remmina remote desktop +client. + + %prep %setup -qn Remmina-%{upstream_version} @@ -161,10 +175,8 @@ mkdir -p build -DWITH_FREERDP=ON \ -DWITH_GCRYPT=ON \ -DWITH_GETTEXT=ON \ - -DWITH_GETTEXT=ON \ -DWITH_LIBSSH=ON \ - -DWITH_LIBSSH=ON \ - -DWITH_PTHREAD=ON \ + -DWITH_SPICE=ON \ -DWITH_SURVEY=OFF \ -DWITH_TELEPATHY=ON \ -DWITH_VTE=ON \ @@ -201,6 +213,8 @@ touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %post plugins-xdmcp touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +%post plugins-spice +touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then @@ -232,6 +246,11 @@ if [ $1 -eq 0 ] ; then gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi +%postun plugins-spice +if [ $1 -eq 0 ] ; then + touch --no-create %{_datadir}/icons/hicolor &>/dev/null + gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi %posttrans gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : @@ -248,6 +267,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %posttrans plugins-xdmcp gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +%posttrans plugins-spice +gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + %files -f %{name}.lang %{!?_licensedir:%global license %%doc} @@ -293,8 +315,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp-ssh.png %{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp.png +%files plugins-spice +%{_libdir}/remmina/plugins/remmina-plugin-spice.so +%{_datadir}/icons/hicolor/*/emblems/remmina-spice.png + %changelog +* Tue Jun 07 2016 Simone Caronni - 1.2.0-0.16.rcgit.12 +- Update to version 12.0-rcgit.13, enable SPICE plugin, update cmake options. + * Fri May 20 2016 David Woodhouse - 1.2.0-0.15.rcgit.12 - Disable survey, as it has build problems diff --git a/sources b/sources index c1875d7..8e683fa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5bfa6a90077b41749a162c7a87e66461 Remmina-1.2.0.rcgit.12.tar.gz +158828e85350b1db55a0b1f21deb9048 Remmina-1.2.0.rcgit.13.tar.gz From 056798da5625080c34976ff93ff8ec7334e3fb3a Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 7 Jun 2016 16:36:22 +0200 Subject: [PATCH 072/185] Fix versioning --- remmina.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/remmina.spec b/remmina.spec index ba5fd5a..0af0af0 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,16 +1,18 @@ # Main branch is the "next" branch, not master #%%global commit0 b43697d8d79cea20d3fdbdea2c4b8de92a2f331f #%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) -%global upstream_version 1.2.0.rcgit.13 + +# RC releases +%global snapshot rcgit.13 Name: remmina Version: 1.2.0 -Release: 0.16.rcgit.12%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.17%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net #Source0: https://github.com/FreeRDP/Remmina/archive/%%{commit0}/Remmina-%%{commit0}.tar.gz#/Remmina-%%{shortcommit0}.tar.gz -Source0: https://github.com/FreeRDP/Remmina/archive/%{upstream_version}.tar.gz#/Remmina-%{upstream_version}.tar.gz +Source0: https://github.com/FreeRDP/Remmina/archive/%{version}%{?snapshot:.%{snapshot}}.tar.gz#/Remmina-%{version}%{?snapshot:.%{snapshot}}.tar.gz # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -158,7 +160,7 @@ client. %prep -%setup -qn Remmina-%{upstream_version} +%setup -qn Remmina-%{version}%{?snapshot:.%{snapshot}} #? Hack: https://github.com/FreeRDP/Remmina/issues/292 sed -i 's#install(DIRECTORY include/remmina DESTINATION include/remmina #install(DIRECTORY remmina/include/remmina DESTINATION include/ #' CMakeLists.txt @@ -321,6 +323,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Jun 07 2016 Simone Caronni - 1.2.0-0.17.rcgit.13 +- Use "snapshot" name only once in the SPEC file. + * Tue Jun 07 2016 Simone Caronni - 1.2.0-0.16.rcgit.12 - Update to version 12.0-rcgit.13, enable SPICE plugin, update cmake options. From 72e9cb5b4175f7d6dab8bcc77b16fdd23aaa9bd8 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 21 Jun 2016 11:41:16 +0200 Subject: [PATCH 073/185] Update to version 1.2.0-rcgit.14 --- .gitignore | 1 + remmina.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index d5b813e..4e3df6b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ remmina-0.7.5.tar.gz /Remmina-1.2.0-rcgit.7.tar.gz /Remmina-1.2.0.rcgit.12.tar.gz /Remmina-1.2.0.rcgit.13.tar.gz +/Remmina-1.2.0-rcgit.14.tar.gz diff --git a/remmina.spec b/remmina.spec index 0af0af0..df03a18 100644 --- a/remmina.spec +++ b/remmina.spec @@ -3,16 +3,16 @@ #%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases -%global snapshot rcgit.13 +%global snapshot rcgit.14 Name: remmina Version: 1.2.0 -Release: 0.17%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.18%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net #Source0: https://github.com/FreeRDP/Remmina/archive/%%{commit0}/Remmina-%%{commit0}.tar.gz#/Remmina-%%{shortcommit0}.tar.gz -Source0: https://github.com/FreeRDP/Remmina/archive/%{version}%{?snapshot:.%{snapshot}}.tar.gz#/Remmina-%{version}%{?snapshot:.%{snapshot}}.tar.gz +Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}%{?snapshot:-%{snapshot}}.tar.gz#/Remmina-%{version}%{?snapshot:-%{snapshot}}.tar.gz # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -160,7 +160,7 @@ client. %prep -%setup -qn Remmina-%{version}%{?snapshot:.%{snapshot}} +%setup -qn Remmina-%{version}%{?snapshot:-%{snapshot}} #? Hack: https://github.com/FreeRDP/Remmina/issues/292 sed -i 's#install(DIRECTORY include/remmina DESTINATION include/remmina #install(DIRECTORY remmina/include/remmina DESTINATION include/ #' CMakeLists.txt @@ -323,6 +323,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Jun 21 2016 Simone Caronni - 1.2.0-0.18.rcgit.14 +- Update to version 1.2.0-rcgit.14. + * Tue Jun 07 2016 Simone Caronni - 1.2.0-0.17.rcgit.13 - Use "snapshot" name only once in the SPEC file. diff --git a/sources b/sources index 8e683fa..4c965c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -158828e85350b1db55a0b1f21deb9048 Remmina-1.2.0.rcgit.13.tar.gz +c855a37b9afdec35dd03980b303a1c3a Remmina-1.2.0-rcgit.14.tar.gz From 71ac5630aaff0e8f87e1e844e669484314e6ba7f Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 23 Jun 2016 16:39:34 +0200 Subject: [PATCH 074/185] Rebuild for spice-gtk upgrade --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index df03a18..2180ebb 100644 --- a/remmina.spec +++ b/remmina.spec @@ -7,7 +7,7 @@ Name: remmina Version: 1.2.0 -Release: 0.18%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.19%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -323,6 +323,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jun 23 2016 Simone Caronni - 1.2.0-0.19.rcgit.14 +- Rebuild for spice-gtk upgrade. + * Tue Jun 21 2016 Simone Caronni - 1.2.0-0.18.rcgit.14 - Update to version 1.2.0-rcgit.14. From 45ea24dbb11e9f799400a4de5dfb3faeb3099d70 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 12 Aug 2016 09:29:47 +0200 Subject: [PATCH 075/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 18 +++++++++++------- sources | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 4e3df6b..bdca729 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ remmina-0.7.5.tar.gz /Remmina-1.2.0.rcgit.12.tar.gz /Remmina-1.2.0.rcgit.13.tar.gz /Remmina-1.2.0-rcgit.14.tar.gz +/Remmina-cbcb19e.tar.gz diff --git a/remmina.spec b/remmina.spec index 2180ebb..4450ae8 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,18 +1,18 @@ # Main branch is the "next" branch, not master -#%%global commit0 b43697d8d79cea20d3fdbdea2c4b8de92a2f331f -#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) +%global commit0 cbcb19ec443e869d0e82a07a4f29c9cd8a5bc134 +%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases -%global snapshot rcgit.14 +#%global snapshot rcgit.14 Name: remmina Version: 1.2.0 -Release: 0.19%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.20%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net -#Source0: https://github.com/FreeRDP/Remmina/archive/%%{commit0}/Remmina-%%{commit0}.tar.gz#/Remmina-%%{shortcommit0}.tar.gz -Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}%{?snapshot:-%{snapshot}}.tar.gz#/Remmina-%{version}%{?snapshot:-%{snapshot}}.tar.gz +Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{commit0}.tar.gz#/Remmina-%{shortcommit0}.tar.gz +#Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}%{?snapshot:-%{snapshot}}.tar.gz#/Remmina-%{version}%{?snapshot:-%{snapshot}}.tar.gz # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -160,7 +160,8 @@ client. %prep -%setup -qn Remmina-%{version}%{?snapshot:-%{snapshot}} +#%setup -qn Remmina-%{version}%{?snapshot:-%{snapshot}} +%setup -qn Remmina-%{commit0} #? Hack: https://github.com/FreeRDP/Remmina/issues/292 sed -i 's#install(DIRECTORY include/remmina DESTINATION include/remmina #install(DIRECTORY remmina/include/remmina DESTINATION include/ #' CMakeLists.txt @@ -323,6 +324,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Aug 12 2016 Simone Caronni - 1.2.0-0.20.git.cbcb19e +- Update to latest snapshot. + * Thu Jun 23 2016 Simone Caronni - 1.2.0-0.19.rcgit.14 - Rebuild for spice-gtk upgrade. diff --git a/sources b/sources index 4c965c1..0c16261 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c855a37b9afdec35dd03980b303a1c3a Remmina-1.2.0-rcgit.14.tar.gz +796893f059ccabede4840843d5ebf730 Remmina-cbcb19e.tar.gz From 141cf1c1c5dd7c08b6ea73ceaad775225c103e90 Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Tue, 16 Aug 2016 13:24:25 +0300 Subject: [PATCH 076/185] - Update to try solve issues with tray icons - https://github.com/FreeRDP/Remmina/issues/944#issuecomment-239913278 - Drop old issue 292 hack. - Conditionally allow build by hash or pre-releases. --- .gitignore | 1 + remmina.spec | 22 +++++++++++++--------- sources | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index bdca729..f518435 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ remmina-0.7.5.tar.gz /Remmina-1.2.0.rcgit.13.tar.gz /Remmina-1.2.0-rcgit.14.tar.gz /Remmina-cbcb19e.tar.gz +/Remmina-679bb8e.tar.gz diff --git a/remmina.spec b/remmina.spec index 4450ae8..d302f3c 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,18 +1,21 @@ # Main branch is the "next" branch, not master -%global commit0 cbcb19ec443e869d0e82a07a4f29c9cd8a5bc134 +%global commit0 679bb8eee78765252b62aa56078a9fabe50563f8 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases -#%global snapshot rcgit.14 +#%%global snapshot rcgit.14 Name: remmina Version: 1.2.0 -Release: 0.20%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.21%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net +%if %{?shapshot}0 +Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}%{?snapshot:-%{snapshot}}.tar.gz#/Remmina-%{version}%{?snapshot:-%{snapshot}}.tar.gz +%else Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{commit0}.tar.gz#/Remmina-%{shortcommit0}.tar.gz -#Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}%{?snapshot:-%{snapshot}}.tar.gz#/Remmina-%{version}%{?snapshot:-%{snapshot}}.tar.gz +%endif # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -160,11 +163,7 @@ client. %prep -#%setup -qn Remmina-%{version}%{?snapshot:-%{snapshot}} -%setup -qn Remmina-%{commit0} - -#? Hack: https://github.com/FreeRDP/Remmina/issues/292 -sed -i 's#install(DIRECTORY include/remmina DESTINATION include/remmina #install(DIRECTORY remmina/include/remmina DESTINATION include/ #' CMakeLists.txt +%setup -qn Remmina-%{?snapshot:%{version}-%{snapshot}}%{?commit0} %build mkdir -p build @@ -324,6 +323,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Aug 16 2016 Pavel Alexeev - 1.2.0-0.21.git.679bb8e +- Update to try solve issues with tray icons - https://github.com/FreeRDP/Remmina/issues/944#issuecomment-239913278 +- Drop old issue 292 hack. +- Conditionally allow build by hash or pre-releases. + * Fri Aug 12 2016 Simone Caronni - 1.2.0-0.20.git.cbcb19e - Update to latest snapshot. diff --git a/sources b/sources index 0c16261..42050a5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -796893f059ccabede4840843d5ebf730 Remmina-cbcb19e.tar.gz +063c4769e2db37d2fdfad1285fb870c1 Remmina-679bb8e.tar.gz From a46bced7923e1b609508b837252e069eea519a88 Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Sun, 28 Aug 2016 19:16:54 +0300 Subject: [PATCH 077/185] Provide GIT_REVISION to cmake for use in version. --- remmina.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index d302f3c..cee4335 100644 --- a/remmina.spec +++ b/remmina.spec @@ -7,7 +7,7 @@ Name: remmina Version: 1.2.0 -Release: 0.21%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.22%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -183,6 +183,7 @@ mkdir -p build -DWITH_TELEPATHY=ON \ -DWITH_VTE=ON \ -DWITH_ZLIB=ON \ + -DGIT_REVISION=%{commit0} \ . make %{?_smp_mflags} @@ -323,6 +324,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Aug 27 2016 Pavel Alexeev - 1.2.0-0.22.git.679bb8e +- Provide GIT_REVISION to cmake for use in version. + * Tue Aug 16 2016 Pavel Alexeev - 1.2.0-0.21.git.679bb8e - Update to try solve issues with tray icons - https://github.com/FreeRDP/Remmina/issues/944#issuecomment-239913278 - Drop old issue 292 hack. From ee96e4237cd71353867b3acf149fd0c81df8d62f Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 20 Sep 2016 14:44:43 +0200 Subject: [PATCH 078/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 10 +++++++--- sources | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f518435..4270ebc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ remmina-0.7.5.tar.gz /Remmina-1.2.0-rcgit.14.tar.gz /Remmina-cbcb19e.tar.gz /Remmina-679bb8e.tar.gz +/Remmina-42f5a87.tar.gz diff --git a/remmina.spec b/remmina.spec index cee4335..16100cd 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,13 +1,14 @@ # Main branch is the "next" branch, not master -%global commit0 679bb8eee78765252b62aa56078a9fabe50563f8 +%global commit0 42f5a87f9d395e9732b52224e4fb4d83aed0e4a6 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) +%global date 20160914 # RC releases -#%%global snapshot rcgit.14 +#%%global snapshot rcgit.15 Name: remmina Version: 1.2.0 -Release: 0.22%{?snapshot:.%{snapshot}}%{?shortcommit0:.git.%{shortcommit0}}%{?dist} +Release: 0.23%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -324,6 +325,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Sep 20 2016 Simone Caronni - 1.2.0-0.23.20160914git42f5a87 +- Update to latest snapshot, update release to follow packaging guidelines. + * Sat Aug 27 2016 Pavel Alexeev - 1.2.0-0.22.git.679bb8e - Provide GIT_REVISION to cmake for use in version. diff --git a/sources b/sources index 42050a5..9d22cd4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -063c4769e2db37d2fdfad1285fb870c1 Remmina-679bb8e.tar.gz +b59bd6cd52c229d52a08f82afea85850 Remmina-42f5a87.tar.gz From dc959bfbc905e853a9f9d37d52733ee25918932f Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 8 Oct 2016 15:29:49 +0200 Subject: [PATCH 079/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 4270ebc..03f4fd4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ remmina-0.7.5.tar.gz /Remmina-cbcb19e.tar.gz /Remmina-679bb8e.tar.gz /Remmina-42f5a87.tar.gz +/Remmina-88f490d.tar.gz diff --git a/remmina.spec b/remmina.spec index 16100cd..e2ccd1e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,18 +1,18 @@ # Main branch is the "next" branch, not master -%global commit0 42f5a87f9d395e9732b52224e4fb4d83aed0e4a6 +%global commit0 88f490de6654a6edcc37627b8df9a4591a1bcbf8 +%global date 20161004 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) -%global date 20160914 # RC releases #%%global snapshot rcgit.15 Name: remmina Version: 1.2.0 -Release: 0.23%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.24%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net -%if %{?shapshot}0 +%if %{?snapshot}0 Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}%{?snapshot:-%{snapshot}}.tar.gz#/Remmina-%{version}%{?snapshot:-%{snapshot}}.tar.gz %else Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{commit0}.tar.gz#/Remmina-%{shortcommit0}.tar.gz @@ -325,6 +325,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Oct 08 2016 Simone Caronni - 1.2.0-0.24.20161004git88f490d +- Update to latest snapshot. + * Tue Sep 20 2016 Simone Caronni - 1.2.0-0.23.20160914git42f5a87 - Update to latest snapshot, update release to follow packaging guidelines. diff --git a/sources b/sources index 9d22cd4..ce1822e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b59bd6cd52c229d52a08f82afea85850 Remmina-42f5a87.tar.gz +0228ef4220dddf2e4a6a8caeacb7acdb Remmina-88f490d.tar.gz From 3b9c7fd32815eb7f53e4261aa49552cb1855ab12 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 14 Oct 2016 11:26:16 +0200 Subject: [PATCH 080/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 03f4fd4..9eb9baa 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ remmina-0.7.5.tar.gz /Remmina-679bb8e.tar.gz /Remmina-42f5a87.tar.gz /Remmina-88f490d.tar.gz +/Remmina-aeaae39.tar.gz diff --git a/remmina.spec b/remmina.spec index e2ccd1e..e75b8b0 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 88f490de6654a6edcc37627b8df9a4591a1bcbf8 -%global date 20161004 +%global commit0 aeaae3988a15b6c906c86c29c55b7032e39b90d0 +%global date 20161010 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.24%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.25%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -325,6 +325,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Oct 14 2016 Simone Caronni - 1.2.0-0.25.20161010gitaeaae39 +- Update to latest snapshot. + * Sat Oct 08 2016 Simone Caronni - 1.2.0-0.24.20161004git88f490d - Update to latest snapshot. diff --git a/sources b/sources index ce1822e..6d5b85b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0228ef4220dddf2e4a6a8caeacb7acdb Remmina-88f490d.tar.gz +9bf9c5874af31034d425cadb0b1ae92a Remmina-aeaae39.tar.gz From 16727b332c005507ffe4b6e7f8e955dae0f32b45 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 4 Nov 2016 11:19:46 +0100 Subject: [PATCH 081/185] Update to latest snapshot --- .gitignore | 2 ++ remmina.spec | 11 ++++++++--- sources | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9eb9baa..29e478d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ remmina-0.7.5.tar.gz /Remmina-42f5a87.tar.gz /Remmina-88f490d.tar.gz /Remmina-aeaae39.tar.gz +/remmina.spec +/Remmina-80a77b8.tar.gz diff --git a/remmina.spec b/remmina.spec index e75b8b0..929653e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 aeaae3988a15b6c906c86c29c55b7032e39b90d0 -%global date 20161010 +%global commit0 80a77b897541879e779178c588d07d4610d685c9 +%global date 20161104 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.25%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.26%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -325,6 +325,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Nov 04 2016 Simone Caronni - 1.2.0-0.26.20161104git80a77b8 +- Update to latest snapshot. +- Still not building properly with FreeRDP: + https://github.com/FreeRDP/Remmina/issues/1028 + * Fri Oct 14 2016 Simone Caronni - 1.2.0-0.25.20161010gitaeaae39 - Update to latest snapshot. diff --git a/sources b/sources index 6d5b85b..15fc92c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9bf9c5874af31034d425cadb0b1ae92a Remmina-aeaae39.tar.gz +abfbb847aebfa2f019a80837781cb371 Remmina-80a77b8.tar.gz From 2e25eae3e8504db8d1021afc8370194b1445de70 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 3 Dec 2016 13:15:59 +0100 Subject: [PATCH 082/185] Update to latest code drop from the libfreerdp_updates branch --- remmina.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/remmina.spec b/remmina.spec index 929653e..25e3f32 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,7 @@ -# Main branch is the "next" branch, not master -%global commit0 80a77b897541879e779178c588d07d4610d685c9 -%global date 20161104 +# Main branch is the "next" branch, not master; but temporarily switch to the +# libfreerdp_updates branch +%global commit0 35604d5e02e4ab02bb2e42fd1cc03d3bdd14ee3d +%global date 20161126 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -8,7 +9,7 @@ Name: remmina Version: 1.2.0 -Release: 0.26%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.27%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -325,6 +326,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Dec 03 2016 Simone Caronni - 1.2.0-0.27.20161126git35604d5 +- Update to latest code drop from the libfreerdp_updates branch. + * Fri Nov 04 2016 Simone Caronni - 1.2.0-0.26.20161104git80a77b8 - Update to latest snapshot. - Still not building properly with FreeRDP: From fd104c1f54d6122e3eafe454f97d77c3db382074 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 3 Dec 2016 13:18:12 +0100 Subject: [PATCH 083/185] Update sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 29e478d..3cf506c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ remmina-0.7.5.tar.gz /Remmina-aeaae39.tar.gz /remmina.spec /Remmina-80a77b8.tar.gz +/Remmina-35604d5.tar.gz diff --git a/sources b/sources index 15fc92c..02d7b81 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -abfbb847aebfa2f019a80837781cb371 Remmina-80a77b8.tar.gz +93b152c7491881ea5b890dcf4c47fb98 Remmina-35604d5.tar.gz From a1865d0fdd37813c707716735360cb2d7cb8d844 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 3 Dec 2016 13:37:28 +0100 Subject: [PATCH 084/185] Add man page --- remmina.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/remmina.spec b/remmina.spec index 25e3f32..0c48001 100644 --- a/remmina.spec +++ b/remmina.spec @@ -289,6 +289,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/%{name}/ %dir %{_libdir}/remmina/ %dir %{_libdir}/remmina/plugins/ +%{_mandir}/man1/%{name}.* %files devel %{_includedir}/%{name}/ From 049df623f5890721987bdd23a5bf9432c5a11360 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 9 Jan 2017 10:21:09 +0100 Subject: [PATCH 085/185] Update to latest snapshot from next branch --- .gitignore | 1 + remmina.spec | 12 +++++++----- sources | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 3cf506c..e4389dd 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ remmina-0.7.5.tar.gz /remmina.spec /Remmina-80a77b8.tar.gz /Remmina-35604d5.tar.gz +/Remmina-d1a4a73.tar.gz diff --git a/remmina.spec b/remmina.spec index 0c48001..01c7f26 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,6 @@ -# Main branch is the "next" branch, not master; but temporarily switch to the -# libfreerdp_updates branch -%global commit0 35604d5e02e4ab02bb2e42fd1cc03d3bdd14ee3d -%global date 20161126 +# Main branch is the "next" branch, not master +%global commit0 d1a4a73317848d350d2dae3715646aa6c8b69b39 +%global date 20161226 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -9,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.27%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.28%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -327,6 +326,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Jan 09 2017 Simone Caronni - 1.2.0-0.28.20161226gitd1a4a73 +- Switch to latest snapshot of the next branch. + * Sat Dec 03 2016 Simone Caronni - 1.2.0-0.27.20161126git35604d5 - Update to latest code drop from the libfreerdp_updates branch. diff --git a/sources b/sources index 02d7b81..47706df 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -93b152c7491881ea5b890dcf4c47fb98 Remmina-35604d5.tar.gz +SHA512 (Remmina-d1a4a73.tar.gz) = 0d67594ed9d9d089b8320a09c7413535043bcdf2040d9a2af8c4f11d7155c99ed2b56a83b7985e2e9227104074d80e4f86cd93fb8032ae65e1f1c2705352effd From 8389acee2a84bc37209eb5c1fd8a26f42d0de789 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 11:40:26 +0000 Subject: [PATCH 086/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 01c7f26..dcf239f 100644 --- a/remmina.spec +++ b/remmina.spec @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.28%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.29%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -326,6 +326,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 1.2.0-0.29.20161226gitd1a4a73 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Mon Jan 09 2017 Simone Caronni - 1.2.0-0.28.20161226gitd1a4a73 - Switch to latest snapshot of the next branch. From 2ef1d73f80c52f2abd3d0781cc52deeb33320d0c Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Wed, 15 Feb 2017 09:34:27 -0600 Subject: [PATCH 087/185] rebuild (libvncserver) --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index dcf239f..25edeea 100644 --- a/remmina.spec +++ b/remmina.spec @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.29%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.30%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -326,6 +326,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Feb 15 2017 Rex Dieter - 1.2.0-0.30.20161226gitd1a4a73 +- rebuild (libvncserver) + * Sat Feb 11 2017 Fedora Release Engineering - 1.2.0-0.29.20161226gitd1a4a73 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From c238d54d950aaa23b6a98f554c1ebbe92331d7e1 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 2 Mar 2017 20:49:36 +0100 Subject: [PATCH 088/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index e4389dd..bcc4717 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ remmina-0.7.5.tar.gz /Remmina-80a77b8.tar.gz /Remmina-35604d5.tar.gz /Remmina-d1a4a73.tar.gz +/Remmina-1da1fb6.tar.gz diff --git a/remmina.spec b/remmina.spec index 25edeea..7661be9 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,14 +1,14 @@ # Main branch is the "next" branch, not master -%global commit0 d1a4a73317848d350d2dae3715646aa6c8b69b39 -%global date 20161226 +%global commit0 1da1fb601ba77c3549cb7cbe94e853e3d49bfced +%global date 20170302 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases -#%%global snapshot rcgit.15 +#%%global snapshot rcgit.18 Name: remmina Version: 1.2.0 -Release: 0.30%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.31%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -326,6 +326,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Mar 02 2017 Simone Caronni - 1.2.0-0.31.20170302git1da1fb6 +- Update to latest snapshot. + * Wed Feb 15 2017 Rex Dieter - 1.2.0-0.30.20161226gitd1a4a73 - rebuild (libvncserver) diff --git a/sources b/sources index 47706df..67b0f1b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-d1a4a73.tar.gz) = 0d67594ed9d9d089b8320a09c7413535043bcdf2040d9a2af8c4f11d7155c99ed2b56a83b7985e2e9227104074d80e4f86cd93fb8032ae65e1f1c2705352effd +SHA512 (Remmina-1da1fb6.tar.gz) = 26ea17aa8ee91a4b3d7ccabb0efd3aff1b6a187f5d34009e8b8dcd09afd342deb7c3ef1d29b1d2c8532cb7870b975e95e22e8355117c3fcafd347ea4bc5bef28 From c5bf6abc6c666b9bdcc1204ce5007f9fa42bce8c Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 9 Mar 2017 10:43:28 +0100 Subject: [PATCH 089/185] Remove non-working telepathy plugin --- remmina.spec | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/remmina.spec b/remmina.spec index 7661be9..ea70415 100644 --- a/remmina.spec +++ b/remmina.spec @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.31%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.32%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -39,15 +39,14 @@ BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libssh) >= 0.6 BuildRequires: pkgconfig(libvncserver) BuildRequires: pkgconfig(spice-client-gtk-3.0) -BuildRequires: pkgconfig(telepathy-glib) BuildRequires: pkgconfig(vte-2.91) BuildRequires: pkgconfig(xkbfile) -# We don't ship the remmina-plugins-common package any longer -Provides: remmina-plugins-common = %{version} -Obsoletes: remmina-plugins-common < 1.0.0-7 +# We don't ship the remmina-plugins-telepathy package any longer +Provides: remmina-plugins-telepathy = %{version} +Obsoletes: remmina-plugins-telepathy < %{version}-%{release} -Recommends: remmina-plugins-telepathy remmina-plugins-nx remmina-plugins-rdp +Recommends: remmina-plugins-nx remmina-plugins-rdp Recommends: remmina-plugins-gnome remmina-plugins-vnc remmina-plugins-xdmcp %description @@ -110,19 +109,6 @@ This package contains the Remote Desktop Protocol (RDP) plugin for the Remmina remote desktop client. -%package plugins-telepathy -Summary: Telepathy plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description plugins-telepathy -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny net-books. - -This package contains the Telepathy plugin for the Remmina remote desktop -client. - - %package plugins-vnc Summary: VNC plugin for Remmina Remote Desktop Client Requires: %{name}%{?_isa} = %{version}-%{release} @@ -181,7 +167,7 @@ mkdir -p build -DWITH_LIBSSH=ON \ -DWITH_SPICE=ON \ -DWITH_SURVEY=OFF \ - -DWITH_TELEPATHY=ON \ + -DWITH_TELEPATHY=OFF \ -DWITH_VTE=ON \ -DWITH_ZLIB=ON \ -DGIT_REVISION=%{commit0} \ @@ -307,9 +293,6 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/icons/hicolor/*/emblems/remmina-rdp-ssh.png %{_datadir}/icons/hicolor/*/emblems/remmina-rdp.png -%files plugins-telepathy -%{_libdir}/remmina/plugins/remmina-plugin-telepathy.so - %files plugins-vnc %{_libdir}/remmina/plugins/remmina-plugin-vnc.so %{_datadir}/icons/hicolor/*/emblems/remmina-vnc-ssh.png @@ -326,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Mar 09 2017 Simone Caronni - 1.2.0-0.32.20170302git1da1fb6 +- Remove non-working telepathy plugin. + * Thu Mar 02 2017 Simone Caronni - 1.2.0-0.31.20170302git1da1fb6 - Update to latest snapshot. From f49c537a1ce9810101d7087111e75db5db3c1133 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 22 Mar 2017 11:39:40 +0100 Subject: [PATCH 090/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index bcc4717..102a9b7 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ remmina-0.7.5.tar.gz /Remmina-35604d5.tar.gz /Remmina-d1a4a73.tar.gz /Remmina-1da1fb6.tar.gz +/Remmina-4d8d257.tar.gz diff --git a/remmina.spec b/remmina.spec index ea70415..3ce4a5b 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 1da1fb601ba77c3549cb7cbe94e853e3d49bfced -%global date 20170302 +%global commit0 4d8d2573113416a108b4e99ab94c0b3026c6aff0 +%global date 20170317 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.32%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.33%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Mar 22 2017 Simone Caronni - 1.2.0-0.33.20170317git4d8d257 +- Update to latest snapshot. + * Thu Mar 09 2017 Simone Caronni - 1.2.0-0.32.20170302git1da1fb6 - Remove non-working telepathy plugin. diff --git a/sources b/sources index 67b0f1b..46fc09e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-1da1fb6.tar.gz) = 26ea17aa8ee91a4b3d7ccabb0efd3aff1b6a187f5d34009e8b8dcd09afd342deb7c3ef1d29b1d2c8532cb7870b975e95e22e8355117c3fcafd347ea4bc5bef28 +SHA512 (Remmina-4d8d257.tar.gz) = 428d866ec3f557ce84dfdd7a1555b5a3c55d8652c6eada888bca93d5ba71fc6c2f38b22095296c12d8d2f6222638ccf411b114325a25b7a6cb1be2a6a365d1d0 From d354918c06dd2149e1ab99f9e7a36be014585e45 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 24 Apr 2017 20:28:50 +0200 Subject: [PATCH 091/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 102a9b7..19b5b78 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ remmina-0.7.5.tar.gz /Remmina-d1a4a73.tar.gz /Remmina-1da1fb6.tar.gz /Remmina-4d8d257.tar.gz +/Remmina-2c0a77e.tar.gz diff --git a/remmina.spec b/remmina.spec index 3ce4a5b..da447ba 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 4d8d2573113416a108b4e99ab94c0b3026c6aff0 -%global date 20170317 +%global commit0 2c0a77e125567ea1d7cbbe1ec0eabc9327e007d3 +%global date 20170424 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.33%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.34%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Apr 24 2017 Simone Caronni - 1.2.0-0.34.20170424git2c0a77e +- Update to latest snapshot. + * Wed Mar 22 2017 Simone Caronni - 1.2.0-0.33.20170317git4d8d257 - Update to latest snapshot. diff --git a/sources b/sources index 46fc09e..bf23f08 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-4d8d257.tar.gz) = 428d866ec3f557ce84dfdd7a1555b5a3c55d8652c6eada888bca93d5ba71fc6c2f38b22095296c12d8d2f6222638ccf411b114325a25b7a6cb1be2a6a365d1d0 +SHA512 (Remmina-2c0a77e.tar.gz) = 3ba1a86db5b1886bd6b41b83b26de84d01ba9f615b61eedfc1b910a9722497b92041910ce2bc4a70f3021c2e8e63e5353ed7a2cc321796574618f69f54600e0f From c66ac0e41451f32244134348d1896e2cbfcfc101 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 15 May 2017 13:20:00 +0200 Subject: [PATCH 092/185] Update to latest sources --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 19b5b78..f883b30 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ remmina-0.7.5.tar.gz /Remmina-1da1fb6.tar.gz /Remmina-4d8d257.tar.gz /Remmina-2c0a77e.tar.gz +/Remmina-41c8de6.tar.gz diff --git a/remmina.spec b/remmina.spec index da447ba..cca4cf0 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 2c0a77e125567ea1d7cbbe1ec0eabc9327e007d3 -%global date 20170424 +%global commit0 41c8de665ffc048756ea41b6b8ecab8b02e183d2 +%global date 20170510 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.34%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.35%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon May 15 2017 Simone Caronni - 1.2.0-0.35.20170510git41c8de6 +- Update to latest snapshot. + * Mon Apr 24 2017 Simone Caronni - 1.2.0-0.34.20170424git2c0a77e - Update to latest snapshot. diff --git a/sources b/sources index bf23f08..717c66c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-2c0a77e.tar.gz) = 3ba1a86db5b1886bd6b41b83b26de84d01ba9f615b61eedfc1b910a9722497b92041910ce2bc4a70f3021c2e8e63e5353ed7a2cc321796574618f69f54600e0f +SHA512 (Remmina-41c8de6.tar.gz) = 27cd04936f31c6db5ae048460c2db67c2a971c0236f8feb08760f21c405e1e431b68cc53a756c0528bc3ac1b04c33ea7270d40e38a13ee7976279b3f26919ba1 From c899ee4b137942d6757fc276f36f894403745503 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 26 Jun 2017 11:21:35 +0200 Subject: [PATCH 093/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index f883b30..5ba5a6a 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ remmina-0.7.5.tar.gz /Remmina-4d8d257.tar.gz /Remmina-2c0a77e.tar.gz /Remmina-41c8de6.tar.gz +/Remmina-7e82138.tar.gz diff --git a/remmina.spec b/remmina.spec index cca4cf0..ca5ae1e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 41c8de665ffc048756ea41b6b8ecab8b02e183d2 -%global date 20170510 +%global commit0 7e82138c15f3f58ed063741af0a953b61fd49552 +%global date 20170622 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.35%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.36%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Jun 26 2017 Simone Caronni - 1.2.0-0.36.20170622git7e82138 +- Update to latest snapshot. + * Mon May 15 2017 Simone Caronni - 1.2.0-0.35.20170510git41c8de6 - Update to latest snapshot. diff --git a/sources b/sources index 717c66c..4f72dbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-41c8de6.tar.gz) = 27cd04936f31c6db5ae048460c2db67c2a971c0236f8feb08760f21c405e1e431b68cc53a756c0528bc3ac1b04c33ea7270d40e38a13ee7976279b3f26919ba1 +SHA512 (Remmina-7e82138.tar.gz) = 0f3ef89fa23b9cf0fd6d0f60edfb3e91db92b47983e8c926d6f73512ce43963e17442fbd0877de0182a974fed050e5fa3913d107befdb89df5ea0adf40b8f8fe From 54640b97c6b0421bec1c8e9d8b696dd3d189a4d1 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 26 Jun 2017 13:28:32 +0200 Subject: [PATCH 094/185] Rebuild for FreeRDP update --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index ca5ae1e..3c47a05 100644 --- a/remmina.spec +++ b/remmina.spec @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.36%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.37%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Jun 26 2017 Simone Caronni - 1.2.0-0.37.20170622git7e82138 +- Rebuild for FreeRDP update. + * Mon Jun 26 2017 Simone Caronni - 1.2.0-0.36.20170622git7e82138 - Update to latest snapshot. From 246e7f910943417f8379048076ac8d031ad51e24 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 12 Jul 2017 17:05:44 +0200 Subject: [PATCH 095/185] Update to the latest snapshot --- remmina.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/remmina.spec b/remmina.spec index 3c47a05..1a48f1b 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 7e82138c15f3f58ed063741af0a953b61fd49552 -%global date 20170622 +%global commit0 89009c8db58f4be4261d2f675684f9d90a88d50c +%global date 20170710 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.37%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.38%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Jul 12 2017 Simone Caronni - 1.2.0-0.38.20170710git89009c8 +- Update to latest snapshot. + * Mon Jun 26 2017 Simone Caronni - 1.2.0-0.37.20170622git7e82138 - Rebuild for FreeRDP update. From dfc13c26011a11dec2883160ffe9ef2c9bbece27 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 13 Jul 2017 08:48:51 +0200 Subject: [PATCH 096/185] Update sources --- .gitignore | 1 + sources | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5ba5a6a..f7eb361 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ remmina-0.7.5.tar.gz /Remmina-2c0a77e.tar.gz /Remmina-41c8de6.tar.gz /Remmina-7e82138.tar.gz +/Remmina-89009c8.tar.gz diff --git a/sources b/sources index 4f72dbb..7cc11cf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-7e82138.tar.gz) = 0f3ef89fa23b9cf0fd6d0f60edfb3e91db92b47983e8c926d6f73512ce43963e17442fbd0877de0182a974fed050e5fa3913d107befdb89df5ea0adf40b8f8fe +SHA512 (Remmina-89009c8.tar.gz) = 3b9ee320c46f38866ec7a97bab0f18c1f96b0ac616a01f987ec952758c7b898d9e9e3dd3cf7499bd8955b0d1f2d6bde411e0d14fab71a790cec3c588bf0f166f From 9996651460432dafdfe10bedd7e2a769cbf20a8f Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 27 Jul 2017 09:58:46 +0200 Subject: [PATCH 097/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f7eb361..a4f8ef1 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ remmina-0.7.5.tar.gz /Remmina-41c8de6.tar.gz /Remmina-7e82138.tar.gz /Remmina-89009c8.tar.gz +/Remmina-0387ee0.tar.gz diff --git a/remmina.spec b/remmina.spec index 1a48f1b..cf70f96 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,14 +1,14 @@ # Main branch is the "next" branch, not master -%global commit0 89009c8db58f4be4261d2f675684f9d90a88d50c -%global date 20170710 +%global commit0 0387ee0a916e64083972b45ee147c1e02b60ea90 +%global date 20170724 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases -#%%global snapshot rcgit.18 +#%%global snapshot rcgit.19 Name: remmina Version: 1.2.0 -Release: 0.38%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.39%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jul 27 2017 Simone Caronni - 1.2.0-0.39.20170724git0387ee0 +- Update to latest snapshot (matching with rcgit 19). + * Wed Jul 12 2017 Simone Caronni - 1.2.0-0.38.20170710git89009c8 - Update to latest snapshot. diff --git a/sources b/sources index 7cc11cf..268a048 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-89009c8.tar.gz) = 3b9ee320c46f38866ec7a97bab0f18c1f96b0ac616a01f987ec952758c7b898d9e9e3dd3cf7499bd8955b0d1f2d6bde411e0d14fab71a790cec3c588bf0f166f +SHA512 (Remmina-0387ee0.tar.gz) = 242c153667b2581a956e71f75619378cd23da578130f8838cdb797b792979ef52964ea170d6e8d4acd564fc69c4177f3ceb532c2402dd92dba0b020c3a82b57f From 472bc82ea0f54650608044ed4f854af67d8cea09 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 13:05:14 +0000 Subject: [PATCH 098/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index cf70f96..b96c22b 100644 --- a/remmina.spec +++ b/remmina.spec @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.39%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.40%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 1.2.0-0.40.20170724git0387ee0 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Thu Jul 27 2017 Simone Caronni - 1.2.0-0.39.20170724git0387ee0 - Update to latest snapshot (matching with rcgit 19). From 72258f5f549682c1dd729cc4391adfe121a7110a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 07:40:05 +0000 Subject: [PATCH 099/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index b96c22b..7a814f2 100644 --- a/remmina.spec +++ b/remmina.spec @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.40%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.41%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 1.2.0-0.41.20170724git0387ee0 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 1.2.0-0.40.20170724git0387ee0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 0b4af866d4fbacae4feadb2e560bef00e0207743 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 11 Sep 2017 15:29:11 +0200 Subject: [PATCH 100/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 195 ++------------------------------------------------- sources | 2 +- 3 files changed, 9 insertions(+), 189 deletions(-) diff --git a/.gitignore b/.gitignore index a4f8ef1..2860ce2 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ remmina-0.7.5.tar.gz /Remmina-7e82138.tar.gz /Remmina-89009c8.tar.gz /Remmina-0387ee0.tar.gz +/Remmina-205df66.tar.gz diff --git a/remmina.spec b/remmina.spec index 7a814f2..bd28c0e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 0387ee0a916e64083972b45ee147c1e02b60ea90 -%global date 20170724 +%global commit0 205df66325b566d2ae5f87f8a68f9d829765d4d5 +%global date 20170908 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.41%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.42%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -309,6 +309,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Mon Sep 11 2017 Simone Caronni - 1.2.0-0.42.20170908git205df66 +- Update to latest snapshot. +- Trim changelog. + * Thu Aug 03 2017 Fedora Release Engineering - 1.2.0-0.41.20170724git0387ee0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild @@ -405,188 +409,3 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : * Fri Jan 01 2016 Pavel Alexeev - 1.2.0-0.11.git.b43697d - Recommends all plugins by suggestion bz#1241658. - -* Sun Dec 13 2015 Simone Caronni - 1.2.0-0.10.git.b43697d -- Update to latest snapshot (1.2.0.rcgit.6), Wayland backend has been disabled. - -* Sun Nov 15 2015 Simone Caronni - 1.2.0-0.9.git.8855df7 -- Update to latest snapshot. -- Update to new packaging guidelines for GitHub sources and license tag. -- Bump FreeRDP requirement to make it more explicit. - -* Thu Jun 18 2015 Fedora Release Engineering - 1.2.0-0.8.git.b3237e8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Fri Jun 05 2015 Simone Caronni - 1.2.0-0.7.git.b3237e8 -- Re-add appindicator support. See: - https://lists.fedoraproject.org/pipermail/devel/2015-June/211121.html - https://lists.fedoraproject.org/pipermail/devel/2014-March/196343.html - -* Wed Jun 03 2015 Simone Caronni - 1.2.0-0.6.git.b3237e8 -- Remove appindicator support. - -* Fri May 01 2015 Simone Caronni - 1.2.0-0.5.git.b3237e8 -- Update to latest snapshot (post 1.2.0-rcgit.3). - -* Tue Mar 17 2015 Simone Caronni - 1.2.0-0.4.git.b3e339e -- Update build requirements. - -* Tue Feb 24 2015 Simone Caronni - 1.2.0-0.3.git.b3e339e -- Update to latest 1.2.0 snapshot (post 1.2.0-rcgit.2) for updated FreeRDP. -- Require latest FreeRDP snapshot for building. -- Remove upstream patch. -- Format and sort BuildRequires, add AppData file. - -* Tue Dec 16 2014 Simone Caronni - 1.2.0-0.1.rcgit.1 -- Update to latest 1.2.0 snapshot. -- Require latest FreeRDP 1.2.0-beta1+android9 for building. -- External tools now in datadir, use upstream commit for it. -- Removed upstreamed patch. - -* Thu Oct 23 2014 Pavel Alexeev - 1.1.1-2.git.efb7b5f -- Try enable APPINDICATOR by suggestion of Giovanni Panozzo. - -* Tue Oct 21 2014 Simone Caronni - 1.1.1-1.git.efb7b5f -- Update to latest snapshot, version now at 1.1.1. Remove upstreamed patch. -- Full GTK3 version removed and moved to 1.2.0 branch. -- Add patch that was lost upstram in the various branching. - -* Wed Sep 3 2014 Orion Poplawski - 1.0.0-15.git.65d2ca4 -- Have remmina-plugins-nx require nxproxy (bug #1004860) - -* Sun Aug 17 2014 Fedora Release Engineering - 1.0.0-14.git.65d2ca4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Fri Aug 15 2014 Pavel Alexeev - 1.0.0-13.git.65d2ca4 -- Add Patch0: remmina-1.0-clipboard-fix.patch -- Update to 65d2ca4872150942cced1fbe92248dd933e9c0cb - -* Mon Aug 11 2014 Pavel Alexeev - 1.0.0-12.git.1470c97 -- Include in devel sub-package for build external plugins: - o %%{_libdir}/cmake/%%{name}/*.cmake - o config.h.in - o Source1: pluginBuild-CMakeLists.txt (with short instructions inside) -- Fix error installing devel files /usr/include/remmina/*.h (hack!) - -* Fri Jul 18 2014 Simone Caronni - 1.0.0-11.git.1470c97 -- Update to latest snapshot. -- Release number bumped to 1.2.0 beta 1 and then reverted to 1.0.0 upstram, - adjust accordingly. -- Desktop file fixed upstream, remove sed line. -- Package grdc, qtnx, gnome-applet-remmina and xfce4-remmina-plugin are not - required anymore by any package. -- Remove requirement on freerdp binary for plugins-rdp. - -* Sun Jun 08 2014 Fedora Release Engineering - 1.1.0-0.3.git.26b814a -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Tue May 27 2014 Simone Caronni - 1.1.0-0.2.git.26b814a -- Remove Group tags. -- Fix file list. -- Remove duplicate buildrequires. -- Fix rpmlint errors. - -* Mon May 19 2014 Pavel Alexeev - 1.1.0-0.1.git.26b814a -- Try build master branch with new freerdp 1.2 in rawhide (https://github.com/FreeRDP/Remmina/issues/193) -- Some spec cleanup. -- Drop all patches. -- Fix desktop file installation, remove --remove-key="Actions" option. -- Fix %%doc files path. -- Drop strange external_tools installed in $HOME/.remmina -- Bump BuildRequires: freerdp-devel to version >= 1.2.0 - -* Thu Apr 24 2014 Tomáš Mráz - 1.0.0-10 -- Rebuild for new libgcrypt - -* Mon Dec 02 2013 Orion Poplawski - 1.0.0-9 -- Obsolete/Provide qtnx (Bug #1034046) - -* Sun Aug 04 2013 Fedora Release Engineering - 1.0.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Tue May 07 2013 Christoph Wickert - 1.0.0-7 -- Fix scrolling in VNC (#830210) -- Handle GDK_SCROLL_SMOOTH in VNC and RDP -- Bring back the --icon/-i autostart option (#834883) -- Fix fullscreen with multiple monitors (#864262) -- Resize window to fit remote resolution (#953678) -- Enable TLS-support in VNC plugin -- Close SSH tunnels on disconnect (https://github.com/FreeRDP/Remmina/issues/77) -- Patch out copy of libvncserver shipped in source tarball -- Update icon cache also for plugins -- Drop the remmina-plugins-common package -- Drop Provides/Obsoletes for grdc -- Spec file clean-up - -* Thu Feb 14 2013 Fedora Release Engineering - 1.0.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Sat Jul 21 2012 Fedora Release Engineering - 1.0.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jun 09 2012 Christoph Wickert - 1.0.0-4 -- Fix DSO linking against gnutls (#819976) - -* Sun Jun 03 2012 Christoph Wickert - 1.0.0-3 -- Fix crash introduced by clipboard support (#827756) - -* Fri Jun 01 2012 Christoph Wickert - 1.0.0-2 -- Add clipboard support (#818155) -- Fix a memory leak and a crash - -* Sun Apr 22 2012 Christoph Wickert - 1.0.0-1 -- Update to 1.0.0 -- Plugins are now part of this package (again) -- Fix two linker errors -- Add VCS key - -* Sat Jan 14 2012 Fedora Release Engineering - 0.9.3-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Dec 06 2011 Adam Jackson - 0.9.3-4 -- Rebuild for new libpng - -* Sat Mar 05 2011 Christoph Wickert - 0.9.3-3 -- Fix obsoletes for for gnome-applet-remmina and xfce4-remmina-plugin - -* Wed Feb 09 2011 Fedora Release Engineering - 0.9.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Jan 19 2011 Christoph Wickert - 0.9.3-1 -- Update to 0.9.3 - -* Sun Nov 28 2010 Christoph Wickert - 0.8.3-1 -- Update to 0.8.3 -- Plugins are in remmina-plugins now - -* Sat Nov 27 2010 Christoph Wickert - 0.7.5-3 -- Enable 32-bit color depth (#656120) - -* Mon Jul 19 2010 Christoph Wickert - 0.7.5-2 -- Fix menu entry (#616115) - -* Wed May 05 2010 Damien Durand - 0.7.5-1 -- Upstream release, 0.7.5 -- Remove the old "DSO" patch - -* Tue Mar 16 2010 Christoph Wickert - 0.7.4-2 -- Add patch to fix DSO issue - -* Sat Feb 27 2010 Damien Durand 0.7.4-1 -- Update to 0.7.4 -- Fix License tag - -* Sun Feb 14 2010 Damien Durand 0.7.3-1 -- Upstream release -- Add rdesktop, xorg-x11-server-Xephyr in Requires -- Add grdc in Provides/Obsoletes -- Add --enable-vnc=dl in %%configure -- Remove unneeded README.LibVNCServer -- Fix "icons/hicolor" path - -* Thu Jan 07 2010 Damien Durand 0.7.2-2 -- Fix Summary -- Split BuildRequires - -* Thu Jan 07 2010 Damien Durand 0.7.2-1 -- Initial release diff --git a/sources b/sources index 268a048..0319f26 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-0387ee0.tar.gz) = 242c153667b2581a956e71f75619378cd23da578130f8838cdb797b792979ef52964ea170d6e8d4acd564fc69c4177f3ceb532c2402dd92dba0b020c3a82b57f +SHA512 (Remmina-205df66.tar.gz) = e9b2daac5edf6d73bd0b6b9186032cab97f13efd3d82036d5c301a7d8af4ff724731871f14072eaff202cd1998c1ea3b480717d5b00c806204fc2fee23d160a1 From bfa7094b606fdfff4e5ee656eb4937fc6c81096b Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 20 Dec 2017 15:19:25 +0100 Subject: [PATCH 101/185] Update to latest 1.2.0 snapshot (rcgit.25) --- .gitignore | 1 + remmina-format-security.patch | 12 ++++++ remmina.spec | 75 +++++++++++++++++++++++------------ sources | 2 +- 4 files changed, 64 insertions(+), 26 deletions(-) create mode 100644 remmina-format-security.patch diff --git a/.gitignore b/.gitignore index 2860ce2..8af921d 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,4 @@ remmina-0.7.5.tar.gz /Remmina-89009c8.tar.gz /Remmina-0387ee0.tar.gz /Remmina-205df66.tar.gz +/Remmina-08f5b4b.tar.gz diff --git a/remmina-format-security.patch b/remmina-format-security.patch new file mode 100644 index 0000000..9ec275a --- /dev/null +++ b/remmina-format-security.patch @@ -0,0 +1,12 @@ +diff -Naur Remmina-08f5b4be5e31a44765d651009be2ac7797fc44ac.old/remmina-plugins/exec/exec_plugin.c Remmina-08f5b4be5e31a44765d651009be2ac7797fc44ac/remmina-plugins/exec/exec_plugin.c +--- Remmina-08f5b4be5e31a44765d651009be2ac7797fc44ac.old/remmina-plugins/exec/exec_plugin.c 2017-12-20 14:08:42.167227579 +0100 ++++ Remmina-08f5b4be5e31a44765d651009be2ac7797fc44ac/remmina-plugins/exec/exec_plugin.c 2017-12-20 14:17:09.688627742 +0100 +@@ -201,7 +201,7 @@ + _("WARNING! Executing a command synchronously, may hung Remmina.\r" + "Do you really want to continue?"); + dialog = GTK_DIALOG(gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, +- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, sync_warning)); ++ GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", sync_warning)); + gint result = gtk_dialog_run (GTK_DIALOG (dialog)); + + switch (result) diff --git a/remmina.spec b/remmina.spec index bd28c0e..d159e5a 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,14 +1,14 @@ # Main branch is the "next" branch, not master -%global commit0 205df66325b566d2ae5f87f8a68f9d829765d4d5 -%global date 20170908 +%global commit0 08f5b4be5e31a44765d651009be2ac7797fc44ac +%global date 20171220 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC releases -#%%global snapshot rcgit.19 +#%%global snapshot rcgit.25 Name: remmina Version: 1.2.0 -Release: 0.42%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.43%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net @@ -24,6 +24,8 @@ Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{c # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt +Patch0: %{name}-format-security.patch + BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils BuildRequires: gettext @@ -43,11 +45,14 @@ BuildRequires: pkgconfig(vte-2.91) BuildRequires: pkgconfig(xkbfile) # We don't ship the remmina-plugins-telepathy package any longer -Provides: remmina-plugins-telepathy = %{version} -Obsoletes: remmina-plugins-telepathy < %{version}-%{release} +Obsoletes: %{name}-plugins-telepathy < %{version}-%{release} -Recommends: remmina-plugins-nx remmina-plugins-rdp -Recommends: remmina-plugins-gnome remmina-plugins-vnc remmina-plugins-xdmcp +Recommends: %{name}-plugins-exec +Recommends: %{name}-plugins-nx +Recommends: %{name}-plugins-rdp +Recommends: %{name}-plugins-secret +Recommends: %{name}-plugins-vnc +Recommends: %{name}-plugins-xdmcp %description Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -70,17 +75,32 @@ The %{name}-devel package contains header files for developing plugins for %{name}. -%package plugins-gnome -Summary: GNOME keyring integration for Remmina Remote Desktop Client +%package plugins-exec +Summary: External execution plugin for Remmina Remote Desktop Client Requires: %{name}%{?_isa} = %{version}-%{release} -%description plugins-gnome +%description plugins-exec Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. -This package contains the plugin with GNOME keyring support for the Remmina -remote desktop client. +This package contains the plugin to execute external processes (commands or +applications) from the Remmina window. + + +%package plugins-secret +Summary: Keyring integration for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-plugins-gnome < %{version}-%{release} +Provides: %{name}-plugins-gnome%{?_isa} = %{version}-%{release} + +%description plugins-secret +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny net-books. + +This package contains the plugin with keyring support for the Remmina remote +desktop client. %package plugins-nx @@ -151,6 +171,7 @@ client. %prep %setup -qn Remmina-%{?snapshot:%{version}-%{snapshot}}%{?commit0} +%patch0 -p1 %build mkdir -p build @@ -158,7 +179,6 @@ mkdir -p build %cmake --build=build \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ - -DCMAKE_INSTALL_COMPONENT=1 \ -DWITH_APPINDICATOR=ON \ -DWITH_AVAHI=ON \ -DWITH_FREERDP=ON \ @@ -166,20 +186,17 @@ mkdir -p build -DWITH_GETTEXT=ON \ -DWITH_LIBSSH=ON \ -DWITH_SPICE=ON \ - -DWITH_SURVEY=OFF \ -DWITH_TELEPATHY=OFF \ -DWITH_VTE=ON \ - -DWITH_ZLIB=ON \ - -DGIT_REVISION=%{commit0} \ . -make %{?_smp_mflags} +%make_build %install %make_install -desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop -appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/%{name}.appdata.xml +desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdata.xml mkdir -p %{buildroot}/%{_libdir}/cmake/%{name}/ cp -pr cmake/*.cmake %{buildroot}/%{_libdir}/cmake/%{name}/ @@ -262,15 +279,15 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files -f %{name}.lang -%{!?_licensedir:%global license %%doc} %license LICENSE %doc AUTHORS ChangeLog README.md %{_bindir}/%{name} -%{_datadir}/appdata/*.appdata.xml +%{_datadir}/metainfo/*.appdata.xml %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/actions/*.* %{_datadir}/icons/hicolor/*/apps/*.* -%{_datadir}/icons/hicolor/*/emblems/remmina-sftp.png +%{_datadir}/icons/hicolor/*/emblems/remmina-*.png +%{_datadir}/mime/packages/*.xml %{_datadir}/%{name}/ %dir %{_libdir}/remmina/ %dir %{_libdir}/remmina/plugins/ @@ -281,8 +298,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_libdir}/pkgconfig/%{name}.pc %{_libdir}/cmake/%{name}/*.cmake -%files plugins-gnome -%{_libdir}/remmina/plugins/remmina-plugins-gnome.so +%files plugins-exec +%{_libdir}/remmina/plugins/remmina-plugin-exec.so + +%files plugins-secret +%{_libdir}/remmina/plugins/remmina-plugin-secret.so %files plugins-nx %{_libdir}/remmina/plugins/remmina-plugin-nx.so @@ -309,6 +329,11 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Wed Dec 20 2017 Simone Caronni - 1.2.0-0.43.20171220git08f5b4b +- Update to latest 1.2.0 snapshot (rcgit.25). +- Gnome plugin renamed to secret. +- Add new executor plugin. + * Mon Sep 11 2017 Simone Caronni - 1.2.0-0.42.20170908git205df66 - Update to latest snapshot. - Trim changelog. diff --git a/sources b/sources index 0319f26..f1fa8e4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-205df66.tar.gz) = e9b2daac5edf6d73bd0b6b9186032cab97f13efd3d82036d5c301a7d8af4ff724731871f14072eaff202cd1998c1ea3b480717d5b00c806204fc2fee23d160a1 +SHA512 (Remmina-08f5b4b.tar.gz) = 3ea1191dccd2b84526c17f99c3fb14894e6b020fa9aa7d78c989a348640ed75e94c52cdc746ac58f650b30ca61006c0723948ba1448f067aec1cdbe91f5be853 From 5825e57c0419e6e670083afc4dd481856a8dcf1c Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Fri, 5 Jan 2018 01:56:06 +0300 Subject: [PATCH 102/185] - Update to version v1.2.0-rcgit.26. - Drop remmina-format-security.patch which seams handled upstream in different way. --- .gitignore | 1 + remmina-format-security.patch | 12 ------------ remmina.spec | 23 ++++++++++++----------- sources | 2 +- 4 files changed, 14 insertions(+), 24 deletions(-) delete mode 100644 remmina-format-security.patch diff --git a/.gitignore b/.gitignore index 8af921d..73d5318 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ remmina-0.7.5.tar.gz /Remmina-0387ee0.tar.gz /Remmina-205df66.tar.gz /Remmina-08f5b4b.tar.gz +/Remmina-1.2.0-rcgit.26.tar.gz diff --git a/remmina-format-security.patch b/remmina-format-security.patch deleted file mode 100644 index 9ec275a..0000000 --- a/remmina-format-security.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Remmina-08f5b4be5e31a44765d651009be2ac7797fc44ac.old/remmina-plugins/exec/exec_plugin.c Remmina-08f5b4be5e31a44765d651009be2ac7797fc44ac/remmina-plugins/exec/exec_plugin.c ---- Remmina-08f5b4be5e31a44765d651009be2ac7797fc44ac.old/remmina-plugins/exec/exec_plugin.c 2017-12-20 14:08:42.167227579 +0100 -+++ Remmina-08f5b4be5e31a44765d651009be2ac7797fc44ac/remmina-plugins/exec/exec_plugin.c 2017-12-20 14:17:09.688627742 +0100 -@@ -201,7 +201,7 @@ - _("WARNING! Executing a command synchronously, may hung Remmina.\r" - "Do you really want to continue?"); - dialog = GTK_DIALOG(gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, -- GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, sync_warning)); -+ GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", sync_warning)); - gint result = gtk_dialog_run (GTK_DIALOG (dialog)); - - switch (result) diff --git a/remmina.spec b/remmina.spec index d159e5a..cff39d4 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,19 +1,19 @@ # Main branch is the "next" branch, not master -%global commit0 08f5b4be5e31a44765d651009be2ac7797fc44ac -%global date 20171220 -%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) +#%%global commit0 08f5b4be5e31a44765d651009be2ac7797fc44ac +#%%global date 20171220 +#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) -# RC releases -#%%global snapshot rcgit.25 +# RC upstream releases +%global snapshot rcgit.26 Name: remmina Version: 1.2.0 -Release: 0.43%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 0.44%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.sourceforge.net -%if %{?snapshot}0 -Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}%{?snapshot:-%{snapshot}}.tar.gz#/Remmina-%{version}%{?snapshot:-%{snapshot}}.tar.gz +%if %{?snapshot:1}0 +Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}-%{snapshot}.tar.gz#/Remmina-%{version}-%{snapshot}.tar.gz %else Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{commit0}.tar.gz#/Remmina-%{shortcommit0}.tar.gz %endif @@ -24,8 +24,6 @@ Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{c # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt -Patch0: %{name}-format-security.patch - BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils BuildRequires: gettext @@ -171,7 +169,6 @@ client. %prep %setup -qn Remmina-%{?snapshot:%{version}-%{snapshot}}%{?commit0} -%patch0 -p1 %build mkdir -p build @@ -329,6 +326,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Fri Jan 05 2018 Pavel Alexeev - 1.2.0-0.44.rcgit.26 +- Update to version v1.2.0-rcgit.26. +- Drop remmina-format-security.patch which seams handled upstream in different way. + * Wed Dec 20 2017 Simone Caronni - 1.2.0-0.43.20171220git08f5b4b - Update to latest 1.2.0 snapshot (rcgit.25). - Gnome plugin renamed to secret. diff --git a/sources b/sources index f1fa8e4..7859280 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-08f5b4b.tar.gz) = 3ea1191dccd2b84526c17f99c3fb14894e6b020fa9aa7d78c989a348640ed75e94c52cdc746ac58f650b30ca61006c0723948ba1448f067aec1cdbe91f5be853 +SHA512 (Remmina-1.2.0-rcgit.26.tar.gz) = 800675123153c0696a032d91e81d895e849b2dadb51664a2e1b4a21e8fdc76d204e3eea2a74b256be2a6bf21d7171ab447dc51ee1cb53ae49f894bb4bf0013af From 0556e6e7f9cb312aa76be08f842b853827a245ed Mon Sep 17 00:00:00 2001 From: Pavel Alexeev Date: Fri, 5 Jan 2018 02:48:01 +0300 Subject: [PATCH 103/185] Change main URL to http://remmina.org --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index cff39d4..35c645e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -11,7 +11,7 @@ Version: 1.2.0 Release: 0.44%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT -URL: http://remmina.sourceforge.net +URL: http://remmina.org %if %{?snapshot:1}0 Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}-%{snapshot}.tar.gz#/Remmina-%{version}-%{snapshot}.tar.gz %else From fed2d0d1e78896443b2a0fe39706e52d0eac1658 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 16 Jan 2018 09:48:40 +0100 Subject: [PATCH 104/185] Update to latest snapshot --- .gitignore | 1 + remmina.spec | 13 ++++++++----- sources | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 73d5318..0d00539 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ remmina-0.7.5.tar.gz /Remmina-205df66.tar.gz /Remmina-08f5b4b.tar.gz /Remmina-1.2.0-rcgit.26.tar.gz +/Remmina-d70108c.tar.gz diff --git a/remmina.spec b/remmina.spec index 35c645e..cf942b7 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,14 +1,14 @@ # Main branch is the "next" branch, not master -#%%global commit0 08f5b4be5e31a44765d651009be2ac7797fc44ac -#%%global date 20171220 -#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) +%global commit0 d70108c596f2265d918da865fbca27a754ede7f4 +%global date 20171220 +%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC upstream releases -%global snapshot rcgit.26 +#global snapshot rcgit.26 Name: remmina Version: 1.2.0 -Release: 0.44%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Release: 0.45%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -326,6 +326,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Tue Jan 16 2018 Simone Caronni - 1.2.0-0.45.20171220.git.d70108c +- Update to latest snapshot. + * Fri Jan 05 2018 Pavel Alexeev - 1.2.0-0.44.rcgit.26 - Update to version v1.2.0-rcgit.26. - Drop remmina-format-security.patch which seams handled upstream in different way. diff --git a/sources b/sources index 7859280..1c0742e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-1.2.0-rcgit.26.tar.gz) = 800675123153c0696a032d91e81d895e849b2dadb51664a2e1b4a21e8fdc76d204e3eea2a74b256be2a6bf21d7171ab447dc51ee1cb53ae49f894bb4bf0013af +SHA512 (Remmina-d70108c.tar.gz) = 5486659bf2f503b5d8c93fcbc5ad7da45d625c1557a2a8ef41426f720cd6a6c1a6bfbf508e319402c53eb9f4bc93a03f171a62370304a5a92e880ebfb153ef89 From fb25ca31e602c565b70bd525663738beae66d638 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 16 Jan 2018 10:12:57 +0100 Subject: [PATCH 105/185] Fix date --- remmina.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index cf942b7..620c514 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master %global commit0 d70108c596f2265d918da865fbca27a754ede7f4 -%global date 20171220 +%global date 20180107 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC upstream releases @@ -326,7 +326,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog -* Tue Jan 16 2018 Simone Caronni - 1.2.0-0.45.20171220.git.d70108c +* Tue Jan 16 2018 Simone Caronni - 1.2.0-0.45.20180107.git.d70108c - Update to latest snapshot. * Fri Jan 05 2018 Pavel Alexeev - 1.2.0-0.44.rcgit.26 From 502ad7d4fe9b330e314695f861a4a356bc87f69c Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 18 Jan 2018 22:10:24 +0100 Subject: [PATCH 106/185] Remove obsolete scriptlets Signed-off-by: Igor Gnatenko --- remmina.spec | 78 +++------------------------------------------------- 1 file changed, 4 insertions(+), 74 deletions(-) diff --git a/remmina.spec b/remmina.spec index 620c514..8a0b9b4 100644 --- a/remmina.spec +++ b/remmina.spec @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.45%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Release: 0.46%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -202,79 +202,6 @@ cp -p %{SOURCE1} %{buildroot}/%{_includedir}/%{name}/ %find_lang %{name} -%post -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%post plugins-nx -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%post plugins-rdp -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%post plugins-vnc -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%post plugins-xdmcp -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%post plugins-spice -touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%postun -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%postun plugins-nx -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%postun plugins-rdp -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%postun plugins-vnc -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%postun plugins-xdmcp -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%postun plugins-spice -if [ $1 -eq 0 ] ; then - touch --no-create %{_datadir}/icons/hicolor &>/dev/null - gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%posttrans -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - -%posttrans plugins-nx -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - -%posttrans plugins-rdp -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - -%posttrans plugins-vnc -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - -%posttrans plugins-xdmcp -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - -%posttrans plugins-spice -gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - - %files -f %{name}.lang %license LICENSE %doc AUTHORS ChangeLog README.md @@ -326,6 +253,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %changelog +* Thu Jan 18 2018 Igor Gnatenko - 1.2.0-0.46.20180107.git.d70108c +- Remove obsolete scriptlets + * Tue Jan 16 2018 Simone Caronni - 1.2.0-0.45.20180107.git.d70108c - Update to latest snapshot. From 951449886126d8827e5f778cfb8710e1ffce296b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 13:00:41 +0000 Subject: [PATCH 107/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 8a0b9b4..fa5c7f2 100644 --- a/remmina.spec +++ b/remmina.spec @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.46%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Release: 0.47%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -253,6 +253,9 @@ cp -p %{SOURCE1} %{buildroot}/%{_includedir}/%{name}/ %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 1.2.0-0.47.20180107.git.d70108c +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Jan 18 2018 Igor Gnatenko - 1.2.0-0.46.20180107.git.d70108c - Remove obsolete scriptlets From a5e429ec255f8aec4752c4f1aa5cd43041a6c02b Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 15 Mar 2018 09:19:33 +0100 Subject: [PATCH 108/185] Update to latest snapshot post rc27 --- .gitignore | 1 + remmina.spec | 13 +++++++++---- sources | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 0d00539..069d8b8 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ remmina-0.7.5.tar.gz /Remmina-08f5b4b.tar.gz /Remmina-1.2.0-rcgit.26.tar.gz /Remmina-d70108c.tar.gz +/Remmina-04e4a99.tar.gz diff --git a/remmina.spec b/remmina.spec index fa5c7f2..9cbb858 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,14 +1,14 @@ # Main branch is the "next" branch, not master -%global commit0 d70108c596f2265d918da865fbca27a754ede7f4 -%global date 20180107 +%global commit0 04e4a99027284cee91e6b54af907b460ea903040 +%global date 20180314 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC upstream releases -#global snapshot rcgit.26 +#global snapshot rcgit.27 Name: remmina Version: 1.2.0 -Release: 0.47%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Release: 0.48%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -35,7 +35,9 @@ BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 BuildRequires: pkgconfig(freerdp2) BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(libsecret-1) +BuildRequires: pkgconfig(libsoup-2.4) BuildRequires: pkgconfig(libssh) >= 0.6 BuildRequires: pkgconfig(libvncserver) BuildRequires: pkgconfig(spice-client-gtk-3.0) @@ -253,6 +255,9 @@ cp -p %{SOURCE1} %{buildroot}/%{_includedir}/%{name}/ %changelog +* Thu Mar 15 2018 Simone Caronni - 1.2.0-0.48.20180314.git.04e4a99 +- Update to latest snapshot post rc27. + * Fri Feb 09 2018 Fedora Release Engineering - 1.2.0-0.47.20180107.git.d70108c - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/sources b/sources index 1c0742e..870dc3a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-d70108c.tar.gz) = 5486659bf2f503b5d8c93fcbc5ad7da45d625c1557a2a8ef41426f720cd6a6c1a6bfbf508e319402c53eb9f4bc93a03f171a62370304a5a92e880ebfb153ef89 +SHA512 (Remmina-04e4a99.tar.gz) = 849a586c458d09633a012de8ee740a38c12c755db640011b2bf3232f84b7e60ca439bccf4cc474188e712b30615cc7af3b63d37cf6a4b78f339f79d29d36377c From 929f49a46c4007d3b06aca188466bd63f3090a07 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 19 Mar 2018 16:04:20 +0100 Subject: [PATCH 109/185] New source snapshot (#1553098, #1557572) --- .gitignore | 1 + remmina.spec | 17 +++++++++++------ sources | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 069d8b8..8a8b3ad 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ remmina-0.7.5.tar.gz /Remmina-1.2.0-rcgit.26.tar.gz /Remmina-d70108c.tar.gz /Remmina-04e4a99.tar.gz +/Remmina-5f3cc40.tar.gz diff --git a/remmina.spec b/remmina.spec index 9cbb858..1b1e57f 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 04e4a99027284cee91e6b54af907b460ea903040 -%global date 20180314 +%global commit0 5f3cc40be2bc1d3d92f0db7cc14affbf0eef4297 +%global date 20180319 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC upstream releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.48%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Release: 0.49%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -194,9 +194,6 @@ mkdir -p build %install %make_install -desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop -appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdata.xml - mkdir -p %{buildroot}/%{_libdir}/cmake/%{name}/ cp -pr cmake/*.cmake %{buildroot}/%{_libdir}/cmake/%{name}/ cp -pr config.h.in %{buildroot}/%{_includedir}/%{name}/ @@ -204,6 +201,10 @@ cp -p %{SOURCE1} %{buildroot}/%{_includedir}/%{name}/ %find_lang %{name} +%check +desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdata.xml + %files -f %{name}.lang %license LICENSE %doc AUTHORS ChangeLog README.md @@ -255,6 +256,10 @@ cp -p %{SOURCE1} %{buildroot}/%{_includedir}/%{name}/ %changelog +* Mon Mar 19 2018 Simone Caronni - 1.2.0-0.49.20180319.git.5f3cc40 +- Move checks in the check section. +- New source snapshot (#1553098, #1557572). + * Thu Mar 15 2018 Simone Caronni - 1.2.0-0.48.20180314.git.04e4a99 - Update to latest snapshot post rc27. diff --git a/sources b/sources index 870dc3a..d07866a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-04e4a99.tar.gz) = 849a586c458d09633a012de8ee740a38c12c755db640011b2bf3232f84b7e60ca439bccf4cc474188e712b30615cc7af3b63d37cf6a4b78f339f79d29d36377c +SHA512 (Remmina-5f3cc40.tar.gz) = 4ff5cf9d89c16c6613fa83ded828ad4c3156e65bfd26551f6d32a8ca0b73b5b38e4bfcea1f70e54609661919897a8c7100c7ecddec71f4c8b2ead896334a9b54 From 1e54eb8edeabf519ccb8a2c770a55e1f0afda159 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 21 Mar 2018 09:36:33 +0100 Subject: [PATCH 110/185] New snapshot, removes duplicate icon --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 8a8b3ad..9f84ae5 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ remmina-0.7.5.tar.gz /Remmina-d70108c.tar.gz /Remmina-04e4a99.tar.gz /Remmina-5f3cc40.tar.gz +/Remmina-f467f19.tar.gz diff --git a/remmina.spec b/remmina.spec index 1b1e57f..54e3bec 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ # Main branch is the "next" branch, not master -%global commit0 5f3cc40be2bc1d3d92f0db7cc14affbf0eef4297 -%global date 20180319 +%global commit0 f467f19725a1883859077b78c4d0d9a9284e7f06 +%global date 20180321 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC upstream releases @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.49%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Release: 0.50%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -256,6 +256,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %changelog +* Wed Mar 21 2018 Simone Caronni - 1.2.0-0.50.20180321.git.f467f19 +- New snapshot, removes duplicate icon. + * Mon Mar 19 2018 Simone Caronni - 1.2.0-0.49.20180319.git.5f3cc40 - Move checks in the check section. - New source snapshot (#1553098, #1557572). diff --git a/sources b/sources index d07866a..107fe04 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-5f3cc40.tar.gz) = 4ff5cf9d89c16c6613fa83ded828ad4c3156e65bfd26551f6d32a8ca0b73b5b38e4bfcea1f70e54609661919897a8c7100c7ecddec71f4c8b2ead896334a9b54 +SHA512 (Remmina-f467f19.tar.gz) = 207e071f04b9be04853cad2ad1d39740f0eb437f777ee499b5b1726442f393a1d533894ceb9bb99624924efc73d4f25b7f912df237cc0b5c27a77bdcc3ad291a From 3b392319b3f5db75fbb6d93dec55f49742f2a0c4 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 9 Apr 2018 09:17:57 +0200 Subject: [PATCH 111/185] Update to latest snapshot (rcgit.29) --- .gitignore | 1 + remmina.spec | 11 +++++++---- sources | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 9f84ae5..6f1b817 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ remmina-0.7.5.tar.gz /Remmina-04e4a99.tar.gz /Remmina-5f3cc40.tar.gz /Remmina-f467f19.tar.gz +/Remmina-6b62986.tar.gz diff --git a/remmina.spec b/remmina.spec index 54e3bec..ce907bc 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,14 +1,14 @@ # Main branch is the "next" branch, not master -%global commit0 f467f19725a1883859077b78c4d0d9a9284e7f06 -%global date 20180321 +%global commit0 6b62986b44a47baa91cd637934092a8d3371c3b9 +%global date 20180408 %global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC upstream releases -#global snapshot rcgit.27 +#global snapshot rcgit.29 Name: remmina Version: 1.2.0 -Release: 0.50%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Release: 0.51%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -256,6 +256,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %changelog +* Mon Apr 09 2018 Simone Caronni - 1.2.0-0.51.20180408.git.6b62986 +- Update to latest snapshot (rcgit.29). + * Wed Mar 21 2018 Simone Caronni - 1.2.0-0.50.20180321.git.f467f19 - New snapshot, removes duplicate icon. diff --git a/sources b/sources index 107fe04..984fce3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-f467f19.tar.gz) = 207e071f04b9be04853cad2ad1d39740f0eb437f777ee499b5b1726442f393a1d533894ceb9bb99624924efc73d4f25b7f912df237cc0b5c27a77bdcc3ad291a +SHA512 (Remmina-6b62986.tar.gz) = 2fe0e643fea9cdbfb3bbb98138a1479f1bda4561f6f94b0092cf80ab263d952a25b4959ad98aa5fd992167bee2cdb4a6dd5aab68ee7d67fae644077c7f0cfaac From 540c190abffa92fbfd0dbd12e4a4a4f19bbe8b3b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 9 Jul 2018 19:06:51 +0200 Subject: [PATCH 112/185] add BuildRequires: gcc Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- remmina.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/remmina.spec b/remmina.spec index ce907bc..c6784f4 100644 --- a/remmina.spec +++ b/remmina.spec @@ -24,6 +24,7 @@ Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{c # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt +BuildRequires: gcc BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils BuildRequires: gettext From 62b2afae0384f14f76b5c6b073f98236cd907c77 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 03:31:52 +0000 Subject: [PATCH 113/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index c6784f4..e035b3e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -8,7 +8,7 @@ Name: remmina Version: 1.2.0 -Release: 0.51%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Release: 0.52%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -257,6 +257,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 1.2.0-0.52.20180408.git.6b62986 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Mon Apr 09 2018 Simone Caronni - 1.2.0-0.51.20180408.git.6b62986 - Update to latest snapshot (rcgit.29). From 77c4862ad09c7677b0b069abfbba8335bb4e94b0 Mon Sep 17 00:00:00 2001 From: Mike DePaulo Date: Mon, 13 Aug 2018 08:02:01 -0400 Subject: [PATCH 114/185] Update to latest stable release 1.2.31.2 Add remmina-gnome-session subpackage for new Kiosk mode --- remmina.spec | 72 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/remmina.spec b/remmina.spec index e035b3e..138b75e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,21 +1,27 @@ -# Main branch is the "next" branch, not master -%global commit0 6b62986b44a47baa91cd637934092a8d3371c3b9 -%global date 20180408 -%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) +# Main branch is master again. +# We may need to use pre-releases or snapshots again in the future. +#%%global commit0 647d2e8c7dba8451a2d5ef89c9b9551d3ea954fb +#%%global date 20180731 +#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) # RC upstream releases -#global snapshot rcgit.29 +#%%global snapshot rcgit.29 Name: remmina -Version: 1.2.0 -Release: 0.52%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Version: 1.2.31.2 +Release: 1%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org + +%if %{!?commit0:1}0 +Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-v%{version}.tar.gz +%else %if %{?snapshot:1}0 -Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}-%{snapshot}.tar.gz#/Remmina-%{version}-%{snapshot}.tar.gz +Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}-%{snapshot}/Remmina-v%{version}-%{snapshot}.tar.bz2 %else -Source0: https://github.com/FreeRDP/Remmina/archive/%{commit0}/Remmina-%{commit0}.tar.gz#/Remmina-%{shortcommit0}.tar.gz +Source0: https://gitlab.com/Remmina/Remmina/-/archive/%{commit0}/Remmina-%{commit0}.tar.bz2 +%endif %endif # Cmake helper file to easy build plugins outside remmina source tree @@ -169,9 +175,25 @@ computers in front of either large monitors or tiny net-books. This package contains the SPICE plugin for the Remmina remote desktop client. +%package gnome-session +Summary: Gnome Shell session for Remmina kiosk mode +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: gnome-session + +%description gnome-session +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny net-books. + +This package contains Remmina kiosk mode, including a Gnome Shell session +that shows up under the display manager session menu. %prep -%setup -qn Remmina-%{?snapshot:%{version}-%{snapshot}}%{?commit0} +%if %{!?commit0:1}0 +%setup -qn Remmina-v%{version} +%else +%setup -qn Remmina-%{?snapshot:v%{version}-%{snapshot}}%{?commit0} +%endif %build mkdir -p build @@ -214,7 +236,7 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/actions/*.* %{_datadir}/icons/hicolor/*/apps/*.* -%{_datadir}/icons/hicolor/*/emblems/remmina-*.png +%{_datadir}/icons/hicolor/*/emblems/remmina-*.svg %{_datadir}/mime/packages/*.xml %{_datadir}/%{name}/ %dir %{_libdir}/remmina/ @@ -234,29 +256,41 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %files plugins-nx %{_libdir}/remmina/plugins/remmina-plugin-nx.so -%{_datadir}/icons/hicolor/*/emblems/remmina-nx.png +%{_datadir}/icons/hicolor/*/emblems/remmina-nx-symbolic.svg %files plugins-rdp %{_libdir}/remmina/plugins/remmina-plugin-rdp.so -%{_datadir}/icons/hicolor/*/emblems/remmina-rdp-ssh.png -%{_datadir}/icons/hicolor/*/emblems/remmina-rdp.png +%{_datadir}/icons/hicolor/*/emblems/remmina-rdp-ssh-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/remmina-rdp-symbolic.svg %files plugins-vnc %{_libdir}/remmina/plugins/remmina-plugin-vnc.so -%{_datadir}/icons/hicolor/*/emblems/remmina-vnc-ssh.png -%{_datadir}/icons/hicolor/*/emblems/remmina-vnc.png +%{_datadir}/icons/hicolor/*/emblems/remmina-vnc-ssh-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/remmina-vnc-symbolic.svg %files plugins-xdmcp %{_libdir}/remmina/plugins/remmina-plugin-xdmcp.so -%{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp-ssh.png -%{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp.png +%{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp-ssh-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp-symbolic.svg %files plugins-spice %{_libdir}/remmina/plugins/remmina-plugin-spice.so -%{_datadir}/icons/hicolor/*/emblems/remmina-spice.png +%{_datadir}/icons/hicolor/*/emblems/remmina-spice-ssh-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/remmina-spice-symbolic.svg +%files gnome-session +%{_bindir}/gnome-session-remmina +%{_bindir}/remmina-gnome +%{_datadir}/gnome-session/sessions/remmina-gnome.session +%{_datadir}/xsessions/remmina-gnome.desktop +%{_mandir}/man1/gnome-session-remmina.1.* +%{_mandir}/man1/remmina-gnome.1.* %changelog +* Tue Aug 14 2018 Mike DePaulo - 1.2.31.2-1 +- Update to latest stable release 1.2.31.2 +- Add remmina-gnome-session subpackage for new Kiosk mode + * Sat Jul 14 2018 Fedora Release Engineering - 1.2.0-0.52.20180408.git.6b62986 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From f9dedbb3a29c2e42f91e12b206592c489f027698 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 20 Aug 2018 16:26:35 +0200 Subject: [PATCH 115/185] Update to 1.2.31.3 --- .gitignore | 1 + remmina.spec | 35 +++++++++-------------------------- sources | 2 +- 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/.gitignore b/.gitignore index 6f1b817..0d5af25 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,4 @@ remmina-0.7.5.tar.gz /Remmina-5f3cc40.tar.gz /Remmina-f467f19.tar.gz /Remmina-6b62986.tar.gz +/remmina-1.2.31.3.tar.gz diff --git a/remmina.spec b/remmina.spec index 138b75e..c2291c5 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,28 +1,11 @@ -# Main branch is master again. -# We may need to use pre-releases or snapshots again in the future. -#%%global commit0 647d2e8c7dba8451a2d5ef89c9b9551d3ea954fb -#%%global date 20180731 -#%%global shortcommit0 %%(c=%%{commit0}; echo ${c:0:7}) - -# RC upstream releases -#%%global snapshot rcgit.29 - Name: remmina -Version: 1.2.31.2 -Release: 1%{?snapshot:.%{snapshot}}%{?shortcommit0:.%{date}.git.%{shortcommit0}}%{?dist} +Version: 1.2.31.3 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org -%if %{!?commit0:1}0 -Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-v%{version}.tar.gz -%else -%if %{?snapshot:1}0 -Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}-%{snapshot}/Remmina-v%{version}-%{snapshot}.tar.bz2 -%else -Source0: https://gitlab.com/Remmina/Remmina/-/archive/%{commit0}/Remmina-%{commit0}.tar.bz2 -%endif -%endif +Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -30,7 +13,7 @@ Source0: https://gitlab.com/Remmina/Remmina/-/archive/%{commit0}/Remmina-% # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt -BuildRequires: gcc +BuildRequires: gcc BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils BuildRequires: gettext @@ -175,6 +158,7 @@ computers in front of either large monitors or tiny net-books. This package contains the SPICE plugin for the Remmina remote desktop client. + %package gnome-session Summary: Gnome Shell session for Remmina kiosk mode Requires: %{name}%{?_isa} = %{version}-%{release} @@ -189,11 +173,7 @@ This package contains Remmina kiosk mode, including a Gnome Shell session that shows up under the display manager session menu. %prep -%if %{!?commit0:1}0 -%setup -qn Remmina-v%{version} -%else -%setup -qn Remmina-%{?snapshot:v%{version}-%{snapshot}}%{?commit0} -%endif +%autosetup -n Remmina-%{version} %build mkdir -p build @@ -287,6 +267,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Mon Aug 20 2018 Simone Caronni - 1.2.31.3-1 +- Update to 1.2.31.3. + * Tue Aug 14 2018 Mike DePaulo - 1.2.31.2-1 - Update to latest stable release 1.2.31.2 - Add remmina-gnome-session subpackage for new Kiosk mode diff --git a/sources b/sources index 984fce3..f315e99 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Remmina-6b62986.tar.gz) = 2fe0e643fea9cdbfb3bbb98138a1479f1bda4561f6f94b0092cf80ab263d952a25b4959ad98aa5fd992167bee2cdb4a6dd5aab68ee7d67fae644077c7f0cfaac +SHA512 (remmina-1.2.31.3.tar.gz) = 107559244e2cfc9986c3698e2bbd3766fce78a354ad2c226c56b800ed8a3728d1b357db277a4dc70119bf1670e8f3603a9fc6ebbdf7888894bf135efe8f37824 From f212643f062dcd38c88068136a91deceec62132a Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 15 Oct 2018 15:20:17 +0200 Subject: [PATCH 116/185] Update to 1.2.32 --- .gitignore | 1 + remmina.spec | 28 +++++++++++++++++++++++++--- sources | 2 +- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 0d5af25..fb4b1dd 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ remmina-0.7.5.tar.gz /Remmina-f467f19.tar.gz /Remmina-6b62986.tar.gz /remmina-1.2.31.3.tar.gz +/remmina-1.2.32.tar.gz diff --git a/remmina.spec b/remmina.spec index c2291c5..a3504c9 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,11 +1,13 @@ +%global commit0 09157d46fe48ab6ad8af157b20182ea4bb7dea72 + Name: remmina -Version: 1.2.31.3 +Version: 1.2.32 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org -Source0: https://github.com/FreeRDP/Remmina/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-%{version}.tar.gz#/%{name}-%{version}.tar.gz # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which @@ -41,6 +43,7 @@ Recommends: %{name}-plugins-exec Recommends: %{name}-plugins-nx Recommends: %{name}-plugins-rdp Recommends: %{name}-plugins-secret +Recommends: %{name}-plugins-st Recommends: %{name}-plugins-vnc Recommends: %{name}-plugins-xdmcp @@ -118,6 +121,17 @@ computers in front of either large monitors or tiny net-books. This package contains the Remote Desktop Protocol (RDP) plugin for the Remmina remote desktop client. +%package plugins-st +Summary: Simple Terminal plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description plugins-st +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny net-books. + +This package contains the Simple Terminal plugin for the Remmina remote desktop +client. %package plugins-vnc Summary: VNC plugin for Remmina Remote Desktop Client @@ -173,7 +187,7 @@ This package contains Remmina kiosk mode, including a Gnome Shell session that shows up under the display manager session menu. %prep -%autosetup -n Remmina-%{version} +%autosetup -n Remmina-v%{version}-%{commit0} %build mkdir -p build @@ -243,6 +257,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_datadir}/icons/hicolor/*/emblems/remmina-rdp-ssh-symbolic.svg %{_datadir}/icons/hicolor/*/emblems/remmina-rdp-symbolic.svg +%files plugins-st +%{_libdir}/remmina/plugins/remmina-plugin-st.so +%{_datadir}/icons/hicolor/*/emblems/remmina-tool-symbolic.svg + %files plugins-vnc %{_libdir}/remmina/plugins/remmina-plugin-vnc.so %{_datadir}/icons/hicolor/*/emblems/remmina-vnc-ssh-symbolic.svg @@ -267,6 +285,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Mon Oct 15 2018 Simone Caronni - 1.2.32-1 +- Update to 1.2.32, new Simple Terminal plugin. +- Project moved to Gitlab, update spec file accordingly. + * Mon Aug 20 2018 Simone Caronni - 1.2.31.3-1 - Update to 1.2.31.3. diff --git a/sources b/sources index f315e99..23b5cbb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.2.31.3.tar.gz) = 107559244e2cfc9986c3698e2bbd3766fce78a354ad2c226c56b800ed8a3728d1b357db277a4dc70119bf1670e8f3603a9fc6ebbdf7888894bf135efe8f37824 +SHA512 (remmina-1.2.32.tar.gz) = df1351d9fde9b4b4311106c2eee06dd9a321ed29b73551c76efa8139b3c44cf34a60f7b10c977c6dd7865bfe07510e35896fa92ffcdd3a328e6b83036e782375 From 55bd2cab9c0bbf075c619917877e31ec01eeca44 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 30 Nov 2018 20:40:12 +0100 Subject: [PATCH 117/185] Update to 1.2.23.1 --- .gitignore | 1 + remmina.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fb4b1dd..a03d683 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ remmina-0.7.5.tar.gz /Remmina-6b62986.tar.gz /remmina-1.2.31.3.tar.gz /remmina-1.2.32.tar.gz +/remmina-1.2.32.1.tar.gz diff --git a/remmina.spec b/remmina.spec index a3504c9..5a48437 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ %global commit0 09157d46fe48ab6ad8af157b20182ea4bb7dea72 Name: remmina -Version: 1.2.32 +Version: 1.2.32.1 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -285,6 +285,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Fri Nov 30 2018 Simone Caronni - 1.2.32.1-1 +- Update to 1.2.32.1. + * Mon Oct 15 2018 Simone Caronni - 1.2.32-1 - Update to 1.2.32, new Simple Terminal plugin. - Project moved to Gitlab, update spec file accordingly. diff --git a/sources b/sources index 23b5cbb..08a457f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.2.32.tar.gz) = df1351d9fde9b4b4311106c2eee06dd9a321ed29b73551c76efa8139b3c44cf34a60f7b10c977c6dd7865bfe07510e35896fa92ffcdd3a328e6b83036e782375 +SHA512 (remmina-1.2.32.1.tar.gz) = 5e55ea9d4b7f6b4e5a8b6010696c39d0d0964c2e719581b5d95ba93c9fc436b54247c56b4f0a80aaf1e307b684484562017f518ab666cae688af0ee8dfcb64bc From 25c53fd1a3871a2c516886320ee6513e1cc28f49 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 4 Dec 2018 21:37:16 +0100 Subject: [PATCH 118/185] Update commit id --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 5a48437..6ff1ee7 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,4 +1,4 @@ -%global commit0 09157d46fe48ab6ad8af157b20182ea4bb7dea72 +%global commit0 719a0016c2b80a904c27efc3ff40c7155119bc9b Name: remmina Version: 1.2.32.1 From 3781eee0b2ad0cda2de453b8083643d19c97828a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 11:18:33 +0000 Subject: [PATCH 119/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 6ff1ee7..9730a50 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.2.32.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -285,6 +285,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 1.2.32.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Nov 30 2018 Simone Caronni - 1.2.32.1-1 - Update to 1.2.32.1. From abe27711131ad8bf9f6ec0630c032ab32aef311e Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 28 Feb 2019 20:03:12 +0100 Subject: [PATCH 120/185] Update to 1.3.3 --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a03d683..f2855cf 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ remmina-0.7.5.tar.gz /remmina-1.2.31.3.tar.gz /remmina-1.2.32.tar.gz /remmina-1.2.32.1.tar.gz +/remmina-1.3.3.tar.gz diff --git a/remmina.spec b/remmina.spec index 9730a50..ec2852a 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ -%global commit0 719a0016c2b80a904c27efc3ff40c7155119bc9b +%global commit0 3a28b819c05fd7dedde46abc082dab760b0892ff Name: remmina -Version: 1.2.32.1 -Release: 2%{?dist} +Version: 1.3.3 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -285,6 +285,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Thu Feb 28 2019 Simone Caronni - 1.3.3-1 +- Update to 1.3.3. + * Sat Feb 02 2019 Fedora Release Engineering - 1.2.32.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 08a457f..23d2c2f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.2.32.1.tar.gz) = 5e55ea9d4b7f6b4e5a8b6010696c39d0d0964c2e719581b5d95ba93c9fc436b54247c56b4f0a80aaf1e307b684484562017f518ab666cae688af0ee8dfcb64bc +SHA512 (remmina-1.3.3.tar.gz) = 612a5e1a0ffab10ed5efe69f3bd4562c361e678e456fc6e4a5cb5301cc3e2b03d75e73426ed09ced807347685afd982cbd2a66d77194c682b384cafd46b8172c From eff1c8d8c6c495283f16fc40e70422e8bb8ceb2f Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 18 May 2019 15:01:55 +0200 Subject: [PATCH 121/185] Update to 1.3.4 --- .gitignore | 1 + remmina.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f2855cf..08df270 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ remmina-0.7.5.tar.gz /remmina-1.2.32.tar.gz /remmina-1.2.32.1.tar.gz /remmina-1.3.3.tar.gz +/remmina-1.3.4.tar.gz diff --git a/remmina.spec b/remmina.spec index ec2852a..e374c23 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ %global commit0 3a28b819c05fd7dedde46abc082dab760b0892ff Name: remmina -Version: 1.3.3 +Version: 1.3.4 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -285,6 +285,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Sat May 18 2019 Simone Caronni - 1.3.4-1 +- Update to 1.3.4. + * Thu Feb 28 2019 Simone Caronni - 1.3.3-1 - Update to 1.3.3. diff --git a/sources b/sources index 23d2c2f..bffe374 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.3.3.tar.gz) = 612a5e1a0ffab10ed5efe69f3bd4562c361e678e456fc6e4a5cb5301cc3e2b03d75e73426ed09ced807347685afd982cbd2a66d77194c682b384cafd46b8172c +SHA512 (remmina-1.3.4.tar.gz) = ae9d7ea2835213c9af18bf0c74d7dad4d5efa2d657cc151b1c1165f9e2ca72a193872b8feebf71e3a32a95aec3ba75375c70e666d4a50a05b1ef08cea9a12da2 From 07af56f94130151129aeae6921e186cfc8cea871 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 19 May 2019 10:05:01 +0200 Subject: [PATCH 122/185] Update Commit ID --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index e374c23..5a39f1c 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,4 +1,4 @@ -%global commit0 3a28b819c05fd7dedde46abc082dab760b0892ff +%global commit0 494903ec8ba33d78bfda2560c276e230b8d31b13 Name: remmina Version: 1.3.4 From a78c639c77b21a311351bf281365057cd087330d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 26 Jul 2019 18:27:56 +0000 Subject: [PATCH 123/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 5a39f1c..03c0b86 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.3.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -285,6 +285,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Fri Jul 26 2019 Fedora Release Engineering - 1.3.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sat May 18 2019 Simone Caronni - 1.3.4-1 - Update to 1.3.4. From 71a04b78a9c4bea3d3fe2bde6423f2c3421671bb Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 20 Aug 2019 20:57:16 +0200 Subject: [PATCH 124/185] Update to 1.3.5 --- .gitignore | 1 + remmina.spec | 35 ++++++++++++++++++++++++++++++----- sources | 2 +- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 08df270..b78826a 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ remmina-0.7.5.tar.gz /remmina-1.2.32.1.tar.gz /remmina-1.3.3.tar.gz /remmina-1.3.4.tar.gz +/remmina-1.3.5.tar.gz diff --git a/remmina.spec b/remmina.spec index 03c0b86..038171c 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ -%global commit0 494903ec8ba33d78bfda2560c276e230b8d31b13 +%global commit0 e1a0ffd30a0d8e35ed86ec81ecb4719bb870d62c Name: remmina -Version: 1.3.4 -Release: 2%{?dist} +Version: 1.3.5 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -15,13 +15,14 @@ Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina- # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt -BuildRequires: gcc +BuildRequires: gcc-c++ BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: intltool BuildRequires: libappstream-glib BuildRequires: libgcrypt-devel +BuildRequires: libsodium-devel BuildRequires: pkgconfig(appindicator3-0.1) BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 @@ -34,6 +35,7 @@ BuildRequires: pkgconfig(libssh) >= 0.6 BuildRequires: pkgconfig(libvncserver) BuildRequires: pkgconfig(spice-client-gtk-3.0) BuildRequires: pkgconfig(vte-2.91) +BuildRequires: pkgconfig(webkit2gtk-4.0) BuildRequires: pkgconfig(xkbfile) # We don't ship the remmina-plugins-telepathy package any longer @@ -173,6 +175,19 @@ This package contains the SPICE plugin for the Remmina remote desktop client. +%package plugins-www +Summary: WWW plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description plugins-www +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny net-books. + +This package contains the WWW plugin (web browser with authentication) for the +Remmina remote desktop client. + + %package gnome-session Summary: Gnome Shell session for Remmina kiosk mode Requires: %{name}%{?_isa} = %{version}-%{release} @@ -187,7 +202,10 @@ This package contains Remmina kiosk mode, including a Gnome Shell session that shows up under the display manager session menu. %prep -%autosetup -n Remmina-v%{version}-%{commit0} +%autosetup -p1 -n Remmina-v%{version}-%{commit0} + +# Remove unsupported entries +sed -i -e '/x-scheme-handler/d' data/desktop/remmina-file.desktop.in %build mkdir -p build @@ -226,6 +244,7 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %license LICENSE %doc AUTHORS ChangeLog README.md %{_bindir}/%{name} +%{_bindir}/%{name}-file-wrapper.sh %{_datadir}/metainfo/*.appdata.xml %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/actions/*.* @@ -276,6 +295,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_datadir}/icons/hicolor/*/emblems/remmina-spice-ssh-symbolic.svg %{_datadir}/icons/hicolor/*/emblems/remmina-spice-symbolic.svg +%files plugins-www +%{_libdir}/remmina/plugins/remmina-plugin-www.so + %files gnome-session %{_bindir}/gnome-session-remmina %{_bindir}/remmina-gnome @@ -285,6 +307,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Tue Aug 20 2019 Simone Caronni - 1.3.5-1 +- Update to 1.3.5 + * Fri Jul 26 2019 Fedora Release Engineering - 1.3.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index bffe374..a32364d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.3.4.tar.gz) = ae9d7ea2835213c9af18bf0c74d7dad4d5efa2d657cc151b1c1165f9e2ca72a193872b8feebf71e3a32a95aec3ba75375c70e666d4a50a05b1ef08cea9a12da2 +SHA512 (remmina-1.3.5.tar.gz) = ac0eda2ff9b4a4ba1702e13301df96968ca13f61f9cde2738c34fc769871cc69e2d3b2b5ebb37353183cbb5842a7250332a6935f5d44dd9890dd926782108c53 From e4ea6cb9e887f0ce4120d7b3701c19f0e1146bab Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 20 Aug 2019 21:06:56 +0200 Subject: [PATCH 125/185] Enable KDE Wallet plugin --- remmina.spec | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 038171c..2b6e75b 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.3.5 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -20,6 +20,7 @@ BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: intltool +BuildRequires: kf5-kwallet-devel BuildRequires: libappstream-glib BuildRequires: libgcrypt-devel BuildRequires: libsodium-devel @@ -188,6 +189,20 @@ This package contains the WWW plugin (web browser with authentication) for the Remmina remote desktop client. +%package plugins-kwallet +Summary: KDE Wallet plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description plugins-kwallet +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny net-books. + +This package contains the KDE Wallet plugin for the Remmina remote desktop +client. It will be activated automatically if KDE Wallet is installed and +running. + + %package gnome-session Summary: Gnome Shell session for Remmina kiosk mode Requires: %{name}%{?_isa} = %{version}-%{release} @@ -298,6 +313,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %files plugins-www %{_libdir}/remmina/plugins/remmina-plugin-www.so +%files plugins-kwallet +%{_libdir}/remmina/plugins/remmina-plugin-kwallet.so + %files gnome-session %{_bindir}/gnome-session-remmina %{_bindir}/remmina-gnome @@ -307,6 +325,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Tue Aug 20 2019 Simone Caronni - 1.3.5-2 +- Enable KDE Wallet plugin. + * Tue Aug 20 2019 Simone Caronni - 1.3.5-1 - Update to 1.3.5 From 9b6dfb07672e652dbfb317ddfe7acc26ef6d6a1a Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 20 Aug 2019 21:09:36 +0200 Subject: [PATCH 126/185] Fix build on Fedora 31/32 --- remmina.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/remmina.spec b/remmina.spec index 2b6e75b..0fb8ca0 100644 --- a/remmina.spec +++ b/remmina.spec @@ -19,6 +19,7 @@ BuildRequires: gcc-c++ BuildRequires: cmake >= 2.8 BuildRequires: desktop-file-utils BuildRequires: gettext +BuildRequires: harfbuzz-devel BuildRequires: intltool BuildRequires: kf5-kwallet-devel BuildRequires: libappstream-glib From 4a206719c12079a440383a79c2fe6300d64e7165 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 20 Aug 2019 21:53:25 +0200 Subject: [PATCH 127/185] Workaround for Pango on Fedora 31+ --- remmina.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/remmina.spec b/remmina.spec index 0fb8ca0..ba730f8 100644 --- a/remmina.spec +++ b/remmina.spec @@ -226,6 +226,9 @@ sed -i -e '/x-scheme-handler/d' data/desktop/remmina-file.desktop.in %build mkdir -p build +# Workaround for Pango on Fedora 31+ +export CFLAGS="%{optflags} -I%{_includedir}/harfbuzz" + %cmake --build=build \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ From bd03c12a668e857c724d047ffcfb4e8fb74df688 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 6 Sep 2019 22:25:20 +0200 Subject: [PATCH 128/185] Allow building on RHEL/CentOS 7 --- remmina.spec | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index ba730f8..8d94049 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.3.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -16,7 +16,11 @@ Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina- Source1: pluginBuild-CMakeLists.txt BuildRequires: gcc-c++ -BuildRequires: cmake >= 2.8 +%if 0%{?fedora} || 0%{?rhel} >= 8 +BuildRequires: cmake >= 3.0.0 +%else +BuildRequires: cmake3 +%endif BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: harfbuzz-devel @@ -43,6 +47,7 @@ BuildRequires: pkgconfig(xkbfile) # We don't ship the remmina-plugins-telepathy package any longer Obsoletes: %{name}-plugins-telepathy < %{version}-%{release} +%if 0%{?fedora} || 0%{?rhel} >= 8 Recommends: %{name}-plugins-exec Recommends: %{name}-plugins-nx Recommends: %{name}-plugins-rdp @@ -50,6 +55,15 @@ Recommends: %{name}-plugins-secret Recommends: %{name}-plugins-st Recommends: %{name}-plugins-vnc Recommends: %{name}-plugins-xdmcp +%else +Requires: %{name}-plugins-exec +Requires: %{name}-plugins-nx +Requires: %{name}-plugins-rdp +Requires: %{name}-plugins-secret +Requires: %{name}-plugins-st +Requires: %{name}-plugins-vnc +Requires: %{name}-plugins-xdmcp +%endif %description Remmina is a remote desktop client written in GTK+, aiming to be useful for @@ -229,7 +243,11 @@ mkdir -p build # Workaround for Pango on Fedora 31+ export CFLAGS="%{optflags} -I%{_includedir}/harfbuzz" +%if 0%{?fedora} || 0%{?rhel} >= 8 %cmake --build=build \ +%else +%cmake3 --build=build \ +%endif -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DWITH_APPINDICATOR=ON \ @@ -329,6 +347,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Fri Sep 06 2019 Simone Caronni - 1.3.5-3 +- Allow building on RHEL/CentOS 7. + * Tue Aug 20 2019 Simone Caronni - 1.3.5-2 - Enable KDE Wallet plugin. From 558cc9fc0904028d140cc9179ba779e630820bfc Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 6 Sep 2019 22:35:00 +0200 Subject: [PATCH 129/185] RHEL 7 aarch64 does not have freerdp libs --- remmina.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/remmina.spec b/remmina.spec index 8d94049..11c5de5 100644 --- a/remmina.spec +++ b/remmina.spec @@ -9,6 +9,10 @@ URL: http://remmina.org Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-%{version}.tar.gz#/%{name}-%{version}.tar.gz +%if 0%{?rhel} == 7 +ExcludeArch: aarch64 +%endif + # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which # use http://www.muflone.com/remmina-plugin-builder/ with remmina bundled source. From f40572f2d3c078e59ab33acd41f2bfbfd1ff21ce Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 6 Sep 2019 22:45:28 +0200 Subject: [PATCH 130/185] Update to 1.3.6 --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index b78826a..09b6b15 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ remmina-0.7.5.tar.gz /remmina-1.3.3.tar.gz /remmina-1.3.4.tar.gz /remmina-1.3.5.tar.gz +/remmina-1.3.6.tar.gz diff --git a/remmina.spec b/remmina.spec index 11c5de5..f43e2f5 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ -%global commit0 e1a0ffd30a0d8e35ed86ec81ecb4719bb870d62c +%global commit0 88fcce0da63548e33f83d4cfaefffc56000c5c2f Name: remmina -Version: 1.3.5 -Release: 3%{?dist} +Version: 1.3.6 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -351,6 +351,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Fri Sep 06 2019 Simone Caronni - 1.3.6-1 +- Update to 1.3.6. + * Fri Sep 06 2019 Simone Caronni - 1.3.5-3 - Allow building on RHEL/CentOS 7. diff --git a/sources b/sources index a32364d..4320e73 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.3.5.tar.gz) = ac0eda2ff9b4a4ba1702e13301df96968ca13f61f9cde2738c34fc769871cc69e2d3b2b5ebb37353183cbb5842a7250332a6935f5d44dd9890dd926782108c53 +SHA512 (remmina-1.3.6.tar.gz) = ce81743c6c491fe0ed1ae468c734b0dceb96c9bfe37d630d3fa0554e0eeb00866df8c8283d9ee520d13095d4783a555137a260cddd27acf0ffb7363c57e7d96a From 856b3989eabb39b625baa3bf04696649275d7ae1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 30 Jan 2020 17:33:56 +0000 Subject: [PATCH 131/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index f43e2f5..c8e33d7 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.3.6 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -351,6 +351,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Thu Jan 30 2020 Fedora Release Engineering - 1.3.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Fri Sep 06 2019 Simone Caronni - 1.3.6-1 - Update to 1.3.6. From e4082f7d7164661f2fa276c4681a870795a135a3 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 7 Feb 2020 18:06:53 +0100 Subject: [PATCH 132/185] Update to 1.3.10 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 09b6b15..aef341e 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ remmina-0.7.5.tar.gz /remmina-1.3.4.tar.gz /remmina-1.3.5.tar.gz /remmina-1.3.6.tar.gz +/remmina-1.3.10.tar.gz diff --git a/remmina.spec b/remmina.spec index c8e33d7..3686c3c 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ %global commit0 88fcce0da63548e33f83d4cfaefffc56000c5c2f Name: remmina -Version: 1.3.6 -Release: 2%{?dist} +Version: 1.3.10 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -351,6 +351,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Fri Feb 07 2020 Simone Caronni - 1.3.10-1 +- Update to 1.3.10. + * Thu Jan 30 2020 Fedora Release Engineering - 1.3.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index 4320e73..961d6d1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.3.6.tar.gz) = ce81743c6c491fe0ed1ae468c734b0dceb96c9bfe37d630d3fa0554e0eeb00866df8c8283d9ee520d13095d4783a555137a260cddd27acf0ffb7363c57e7d96a +SHA512 (remmina-1.3.10.tar.gz) = 0cc211dddd245a2490e43fe4c45cd8d2f22f5218732227f0d6eec841da8552e49cf569d87a81aa23b5a343bbea1c36f470f35ee34172683ca3d679cb993042a4 From 86762e9813a7af225c18ad147454baba9931987c Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 7 Feb 2020 22:25:38 +0100 Subject: [PATCH 133/185] Update commit id --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 3686c3c..0a49ced 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,4 +1,4 @@ -%global commit0 88fcce0da63548e33f83d4cfaefffc56000c5c2f +%global commit0 855d285be8e7096d18d653941d00e3be5e17256f Name: remmina Version: 1.3.10 From 4fc9c5feef3fb1407a34b48c8b6f209e7f9ee7a2 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 8 Feb 2020 10:09:40 +0100 Subject: [PATCH 134/185] Add missing build requirement --- remmina.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 0a49ced..ce0577b 100644 --- a/remmina.spec +++ b/remmina.spec @@ -19,13 +19,14 @@ ExcludeArch: aarch64 # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt -BuildRequires: gcc-c++ %if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: cmake >= 3.0.0 %else BuildRequires: cmake3 %endif +BuildRequires: cups-devel BuildRequires: desktop-file-utils +BuildRequires: gcc-c++ BuildRequires: gettext BuildRequires: harfbuzz-devel BuildRequires: intltool From 1e3778dd6e7404c38df074acfd67667287c6f353 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 8 Feb 2020 13:44:35 +0100 Subject: [PATCH 135/185] Update files list --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index ce0577b..d8317c1 100644 --- a/remmina.spec +++ b/remmina.spec @@ -286,17 +286,20 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %license LICENSE %doc AUTHORS ChangeLog README.md %{_bindir}/%{name} -%{_bindir}/%{name}-file-wrapper.sh +%{_bindir}/%{name}-file-wrapper %{_datadir}/metainfo/*.appdata.xml %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/actions/*.* %{_datadir}/icons/hicolor/*/apps/*.* %{_datadir}/icons/hicolor/*/emblems/remmina-*.svg +%{_datadir}/icons/hicolor/apps/*.svg +%{_datadir}/icons/hicolor/scalable/panel/*.svg %{_datadir}/mime/packages/*.xml %{_datadir}/%{name}/ %dir %{_libdir}/remmina/ %dir %{_libdir}/remmina/plugins/ %{_mandir}/man1/%{name}.* +%{_mandir}/man1/%{name}-file-wrapper.* %files devel %{_includedir}/%{name}/ From cf325d9d6fe8faa238d600d87ea33d37dbea2738 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 8 Feb 2020 14:08:00 +0100 Subject: [PATCH 136/185] Also exclude on RHEL/CentOS 8 aarch64 --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index d8317c1..a9379f4 100644 --- a/remmina.spec +++ b/remmina.spec @@ -9,7 +9,7 @@ URL: http://remmina.org Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-%{version}.tar.gz#/%{name}-%{version}.tar.gz -%if 0%{?rhel} == 7 +%if 0%{?rhel} >= 7 ExcludeArch: aarch64 %endif From 23eaab37e94231b83c442fbaed3fdf0df89d03f6 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 8 Feb 2020 14:36:16 +0100 Subject: [PATCH 137/185] Also exclude on RHEL/CentOS 8 ppc64le --- remmina.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/remmina.spec b/remmina.spec index a9379f4..6873a7a 100644 --- a/remmina.spec +++ b/remmina.spec @@ -13,6 +13,10 @@ Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina- ExcludeArch: aarch64 %endif +%if 0%{?rhel} >= 8 +ExcludeArch: ppc64le +%endif + # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which # use http://www.muflone.com/remmina-plugin-builder/ with remmina bundled source. From f90e77fff5face072af3d007820caec837626dba Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 8 Feb 2020 14:44:34 +0100 Subject: [PATCH 138/185] Revert last commit, due to the stupid RHEL 8 policy of missing devel packages it can not be built. --- remmina.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/remmina.spec b/remmina.spec index 6873a7a..a9379f4 100644 --- a/remmina.spec +++ b/remmina.spec @@ -13,10 +13,6 @@ Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina- ExcludeArch: aarch64 %endif -%if 0%{?rhel} >= 8 -ExcludeArch: ppc64le -%endif - # Cmake helper file to easy build plugins outside remmina source tree # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which # use http://www.muflone.com/remmina-plugin-builder/ with remmina bundled source. From c58d86a30e8e8a987176c521c8dd5d93e64a8cd4 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 9 Feb 2020 09:10:01 +0100 Subject: [PATCH 139/185] Enable -fcommon for GCC 10 --- remmina.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/remmina.spec b/remmina.spec index a9379f4..950cba3 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,3 +1,4 @@ +%define _legacy_common_support 1 %global commit0 855d285be8e7096d18d653941d00e3be5e17256f Name: remmina From 2a1e70b0202133e6356672c9c9557a828b27f113 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sun, 9 Feb 2020 19:15:52 +0100 Subject: [PATCH 140/185] Backport patch to fix build with default GCC 10 options --- remmina-gcc10.patch | 23 +++++++++++++++++++++++ remmina.spec | 8 ++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 remmina-gcc10.patch diff --git a/remmina-gcc10.patch b/remmina-gcc10.patch new file mode 100644 index 0000000..6b16786 --- /dev/null +++ b/remmina-gcc10.patch @@ -0,0 +1,23 @@ +diff --git a/src/remmina_stats.c b/src/remmina_stats.c +index a6eb6f609ba7f0a5d444da2eb9f34684725625a5..3b7cbf0bf61964cc027c936b753bece49986c193 100644 +--- a/src/remmina_stats.c ++++ b/src/remmina_stats.c +@@ -159,8 +159,6 @@ + #endif + #include "remmina_stats.h" + +-struct utsname u; +- + struct ProfilesData { + GHashTable *proto_count; + GHashTable *proto_date; +@@ -864,9 +862,6 @@ JsonNode *remmina_stats_get_all() + json_builder_set_member_name(b, "REMMINAVERSION"); + json_builder_add_value(b, n); + +- if (uname(&u) == -1) +- g_print("uname:"); +- + n = remmina_stats_get_os_info(); + json_builder_set_member_name(b, "SYSTEM"); + json_builder_add_value(b, n); diff --git a/remmina.spec b/remmina.spec index 950cba3..d9c353a 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,9 +1,8 @@ -%define _legacy_common_support 1 %global commit0 855d285be8e7096d18d653941d00e3be5e17256f Name: remmina Version: 1.3.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -20,6 +19,8 @@ ExcludeArch: aarch64 # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt +Patch0: https://gitlab.com/Remmina/Remmina/commit/27f84d1c0a2e4c2432281f25ef3026bb00bbdc15.diff#/remmina-gcc10.patch + %if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: cmake >= 3.0.0 %else @@ -356,6 +357,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Sun Feb 09 2020 Simone Caronni - 1.3.10-2 +- Backport patch to fix build with default GCC 10 options. + * Fri Feb 07 2020 Simone Caronni - 1.3.10-1 - Update to 1.3.10. From daf66a482217f60d860d9b737385a9cf5e502273 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 25 Feb 2020 12:27:22 +0100 Subject: [PATCH 141/185] Update to 1.4.1 --- .gitignore | 1 + remmina-gcc10.patch | 23 ----------------------- remmina.spec | 11 ++++++----- sources | 2 +- 4 files changed, 8 insertions(+), 29 deletions(-) delete mode 100644 remmina-gcc10.patch diff --git a/.gitignore b/.gitignore index aef341e..b60dad6 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ remmina-0.7.5.tar.gz /remmina-1.3.5.tar.gz /remmina-1.3.6.tar.gz /remmina-1.3.10.tar.gz +/remmina-1.4.1.tar.gz diff --git a/remmina-gcc10.patch b/remmina-gcc10.patch deleted file mode 100644 index 6b16786..0000000 --- a/remmina-gcc10.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/src/remmina_stats.c b/src/remmina_stats.c -index a6eb6f609ba7f0a5d444da2eb9f34684725625a5..3b7cbf0bf61964cc027c936b753bece49986c193 100644 ---- a/src/remmina_stats.c -+++ b/src/remmina_stats.c -@@ -159,8 +159,6 @@ - #endif - #include "remmina_stats.h" - --struct utsname u; -- - struct ProfilesData { - GHashTable *proto_count; - GHashTable *proto_date; -@@ -864,9 +862,6 @@ JsonNode *remmina_stats_get_all() - json_builder_set_member_name(b, "REMMINAVERSION"); - json_builder_add_value(b, n); - -- if (uname(&u) == -1) -- g_print("uname:"); -- - n = remmina_stats_get_os_info(); - json_builder_set_member_name(b, "SYSTEM"); - json_builder_add_value(b, n); diff --git a/remmina.spec b/remmina.spec index d9c353a..41ac05e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ -%global commit0 855d285be8e7096d18d653941d00e3be5e17256f +%global commit0 d932484070fa4182666a55817dc00783a20785fa Name: remmina -Version: 1.3.10 -Release: 2%{?dist} +Version: 1.4.1 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -19,8 +19,6 @@ ExcludeArch: aarch64 # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt -Patch0: https://gitlab.com/Remmina/Remmina/commit/27f84d1c0a2e4c2432281f25ef3026bb00bbdc15.diff#/remmina-gcc10.patch - %if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: cmake >= 3.0.0 %else @@ -357,6 +355,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Tue Feb 25 2020 Simone Caronni - 1.4.1-1 +- Update to 1.4.1. + * Sun Feb 09 2020 Simone Caronni - 1.3.10-2 - Backport patch to fix build with default GCC 10 options. diff --git a/sources b/sources index 961d6d1..12e964c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.3.10.tar.gz) = 0cc211dddd245a2490e43fe4c45cd8d2f22f5218732227f0d6eec841da8552e49cf569d87a81aa23b5a343bbea1c36f470f35ee34172683ca3d679cb993042a4 +SHA512 (remmina-1.4.1.tar.gz) = 1e72010a7a3e995af5e7967e65614883f551175923b49ef8d13b5a6dbb6493635aa054a819e63a3b5a1e1eead32dc97b24b69625825d657b9ac2fec2120fc937 From e8aa00b75a6623783326b480a8403140b46404f7 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 22 May 2020 21:52:08 +0200 Subject: [PATCH 142/185] Update to 1.4.4 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b60dad6..800ff31 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ remmina-0.7.5.tar.gz /remmina-1.3.6.tar.gz /remmina-1.3.10.tar.gz /remmina-1.4.1.tar.gz +/remmina-1.4.4.tar.gz diff --git a/remmina.spec b/remmina.spec index 41ac05e..113b4b2 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 d932484070fa4182666a55817dc00783a20785fa +%global commit0 cc52d09668b01c99229d8869e9694a8be363a2f9 Name: remmina -Version: 1.4.1 +Version: 1.4.4 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -355,6 +355,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Fri May 22 2020 Simone Caronni - 1.4.4-1 +- Update to 1.4.4. + * Tue Feb 25 2020 Simone Caronni - 1.4.1-1 - Update to 1.4.1. diff --git a/sources b/sources index 12e964c..40ccefc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.1.tar.gz) = 1e72010a7a3e995af5e7967e65614883f551175923b49ef8d13b5a6dbb6493635aa054a819e63a3b5a1e1eead32dc97b24b69625825d657b9ac2fec2120fc937 +SHA512 (remmina-1.4.4.tar.gz) = 52551bc5cd88266bde014501753fe31736bd508c1d338840a185c72e7e4607407626bf098cc984d5ac752b0923f96bcf59c291943b654fe00ee19e3859e717f3 From ab633171759eb676d1c5db4b10d56520dd5a4478 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 30 Jun 2020 08:43:46 +0200 Subject: [PATCH 143/185] Update to 1.4.7 --- .gitignore | 1 + remmina.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 800ff31..b02cf82 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ remmina-0.7.5.tar.gz /remmina-1.3.10.tar.gz /remmina-1.4.1.tar.gz /remmina-1.4.4.tar.gz +/remmina-1.4.7.tar.gz diff --git a/remmina.spec b/remmina.spec index 113b4b2..3d99d94 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 cc52d09668b01c99229d8869e9694a8be363a2f9 +%global commit0 da3b4196eabbc5ad9719bd35fa6a633f4aa6337e Name: remmina -Version: 1.4.4 +Version: 1.4.7 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -260,6 +260,7 @@ export CFLAGS="%{optflags} -I%{_includedir}/harfbuzz" -DWITH_FREERDP=ON \ -DWITH_GCRYPT=ON \ -DWITH_GETTEXT=ON \ + -DWITH_KIOSK_SESSION=ON \ -DWITH_LIBSSH=ON \ -DWITH_SPICE=ON \ -DWITH_TELEPATHY=OFF \ @@ -355,6 +356,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Tue Jun 30 2020 Simone Caronni - 1.4.7-1 +- Update to 1.4.7. + * Fri May 22 2020 Simone Caronni - 1.4.4-1 - Update to 1.4.4. diff --git a/sources b/sources index 40ccefc..20af194 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.4.tar.gz) = 52551bc5cd88266bde014501753fe31736bd508c1d338840a185c72e7e4607407626bf098cc984d5ac752b0923f96bcf59c291943b654fe00ee19e3859e717f3 +SHA512 (remmina-1.4.7.tar.gz) = 099f47746001757521a5318dbff6e8cec0892c4786bc6d16edca2dadf5aeb1873073153632c8301c033a3427e8cc97c124e1ff7ad2ba1d81746d08974633db44 From 328cd9f8e03ef4ca6548669a29db7ee134856619 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 13 Jul 2020 10:32:03 +0200 Subject: [PATCH 144/185] Add workaround for el7 (does not work yet due to freerdp being too old) --- remmina.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/remmina.spec b/remmina.spec index 3d99d94..2917fa5 100644 --- a/remmina.spec +++ b/remmina.spec @@ -245,8 +245,14 @@ sed -i -e '/x-scheme-handler/d' data/desktop/remmina-file.desktop.in %build mkdir -p build +%if 0%{?fedora} # Workaround for Pango on Fedora 31+ export CFLAGS="%{optflags} -I%{_includedir}/harfbuzz" +%endif + +%if 0%{?rhel} == 7 +export CFLAGS="%{optflags} -std=gnu99" +%endif %if 0%{?fedora} || 0%{?rhel} >= 8 %cmake --build=build \ From 68db1988d68826e5bcc411128f16113825a9dfce Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 05:41:27 +0000 Subject: [PATCH 145/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 2917fa5..7422dfe 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -362,6 +362,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1.4.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Jun 30 2020 Simone Caronni - 1.4.7-1 - Update to 1.4.7. From 80c46dd93948bc5e79ba60dfe569b4d62ce16d13 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 1 Aug 2020 07:47:34 +0000 Subject: [PATCH 146/185] - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 7422dfe..70d8012 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -362,6 +362,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Sat Aug 01 2020 Fedora Release Engineering - 1.4.7-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 1.4.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 5805cd2899e49423745819e36b46bee1434bea0b Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Mon, 7 Sep 2020 12:17:40 +0200 Subject: [PATCH 147/185] Fix FTBFS --- remmina.spec | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/remmina.spec b/remmina.spec index 70d8012..b79f73d 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.7 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -254,11 +254,7 @@ export CFLAGS="%{optflags} -I%{_includedir}/harfbuzz" export CFLAGS="%{optflags} -std=gnu99" %endif -%if 0%{?fedora} || 0%{?rhel} >= 8 -%cmake --build=build \ -%else -%cmake3 --build=build \ -%endif +%cmake \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DWITH_APPINDICATOR=ON \ @@ -270,13 +266,12 @@ export CFLAGS="%{optflags} -std=gnu99" -DWITH_LIBSSH=ON \ -DWITH_SPICE=ON \ -DWITH_TELEPATHY=OFF \ - -DWITH_VTE=ON \ - . + -DWITH_VTE=ON -%make_build +%cmake_build %install -%make_install +%cmake_install mkdir -p %{buildroot}/%{_libdir}/cmake/%{name}/ cp -pr cmake/*.cmake %{buildroot}/%{_libdir}/cmake/%{name}/ @@ -362,6 +357,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Mon Sep 07 2020 Than Ngo - 1.4.7-4 +- Fix FTBFS + * Sat Aug 01 2020 Fedora Release Engineering - 1.4.7-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 3a1838c5ea361d8efdcd566ed56eaba586164d47 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 11 Sep 2020 10:00:17 +0200 Subject: [PATCH 148/185] Update to 1.4.8 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b02cf82..69abc36 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.1.tar.gz /remmina-1.4.4.tar.gz /remmina-1.4.7.tar.gz +/remmina-1.4.8.tar.gz diff --git a/remmina.spec b/remmina.spec index b79f73d..f4d7b47 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ %global commit0 da3b4196eabbc5ad9719bd35fa6a633f4aa6337e Name: remmina -Version: 1.4.7 -Release: 4%{?dist} +Version: 1.4.8 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -357,6 +357,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Fri Sep 11 2020 Simone Caronni - 1.4.8-1 +- Update to 1.4.8. + * Mon Sep 07 2020 Than Ngo - 1.4.7-4 - Fix FTBFS diff --git a/sources b/sources index 20af194..2ad7db8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.7.tar.gz) = 099f47746001757521a5318dbff6e8cec0892c4786bc6d16edca2dadf5aeb1873073153632c8301c033a3427e8cc97c124e1ff7ad2ba1d81746d08974633db44 +SHA512 (remmina-1.4.8.tar.gz) = 4120fee21a58eb2b71cbff7a48dabbd0c2f93e391e6f0192d38db79fb3d5b518aea66cbf65bf982f9ea03fb963440c13ee39ab7b98ab81143e858085fa76dcae From 4b3eea1406dad362620b8808bd6cd5a1b4e9e9bd Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Fri, 11 Sep 2020 10:47:35 +0200 Subject: [PATCH 149/185] Fix commit id --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index f4d7b47..189c295 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,4 +1,4 @@ -%global commit0 da3b4196eabbc5ad9719bd35fa6a633f4aa6337e +%global commit0 7ebc497062de66881b71bbe7f54dabfda0129ac2 Name: remmina Version: 1.4.8 From 8fd6a28adaaa64cd20db51ae6f33c3e5d4c1b183 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 30 Nov 2020 11:02:29 +0100 Subject: [PATCH 150/185] Update to 1.4.9 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 69abc36..a29e7e4 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.4.tar.gz /remmina-1.4.7.tar.gz /remmina-1.4.8.tar.gz +/remmina-1.4.9.tar.gz diff --git a/remmina.spec b/remmina.spec index 189c295..d9e9370 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 7ebc497062de66881b71bbe7f54dabfda0129ac2 +%global commit0 01a2c3563fd67c40e72fa51f9a86043c9fb55423 Name: remmina -Version: 1.4.8 +Version: 1.4.9 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -357,6 +357,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Mon Nov 30 2020 Simone Caronni - 1.4.9-1 +- Update to 1.4.9. + * Fri Sep 11 2020 Simone Caronni - 1.4.8-1 - Update to 1.4.8. diff --git a/sources b/sources index 2ad7db8..8538881 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.8.tar.gz) = 4120fee21a58eb2b71cbff7a48dabbd0c2f93e391e6f0192d38db79fb3d5b518aea66cbf65bf982f9ea03fb963440c13ee39ab7b98ab81143e858085fa76dcae +SHA512 (remmina-1.4.9.tar.gz) = b9de8bc0ccc9b02ebb8299e739b0151125a5381c539fba8de78f2ae7428d58bca900ed91ecec82b116dae59896a6e2588a470057db68b3e73da7e9da30be1fa0 From b8b5ae48996426b12318880fe883581470aff5ed Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 30 Nov 2020 11:28:52 +0100 Subject: [PATCH 151/185] Fix build on CentOS/RHEL 7 --- remmina.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/remmina.spec b/remmina.spec index d9e9370..8933eb4 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -254,7 +254,7 @@ export CFLAGS="%{optflags} -I%{_includedir}/harfbuzz" export CFLAGS="%{optflags} -std=gnu99" %endif -%cmake \ +%cmake3 \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DWITH_APPINDICATOR=ON \ @@ -268,10 +268,10 @@ export CFLAGS="%{optflags} -std=gnu99" -DWITH_TELEPATHY=OFF \ -DWITH_VTE=ON -%cmake_build +%cmake3_build %install -%cmake_install +%cmake3_install mkdir -p %{buildroot}/%{_libdir}/cmake/%{name}/ cp -pr cmake/*.cmake %{buildroot}/%{_libdir}/cmake/%{name}/ @@ -357,6 +357,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Mon Nov 30 2020 Simone Caronni - 1.4.9-2 +- Fix build on CentOS/RHEL 7. + * Mon Nov 30 2020 Simone Caronni - 1.4.9-1 - Update to 1.4.9. From f2503441aa11aadc1d6b89371d7d25bf564967f3 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 28 Dec 2020 22:46:12 +0100 Subject: [PATCH 152/185] Update to 1.4.10 --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index a29e7e4..00d08d6 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.7.tar.gz /remmina-1.4.8.tar.gz /remmina-1.4.9.tar.gz +/remmina-1.4.10.tar.gz diff --git a/remmina.spec b/remmina.spec index 8933eb4..367a772 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ -%global commit0 01a2c3563fd67c40e72fa51f9a86043c9fb55423 +%global commit0 9d1dbdf2d648644e0de9590c6291d7e7b72a1473 Name: remmina -Version: 1.4.9 -Release: 2%{?dist} +Version: 1.4.10 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -357,6 +357,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Mon Dec 28 2020 Simone Caronni - 1.4.10-1 +- Update to 1.4.10. + * Mon Nov 30 2020 Simone Caronni - 1.4.9-2 - Fix build on CentOS/RHEL 7. diff --git a/sources b/sources index 8538881..8b3659e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.9.tar.gz) = b9de8bc0ccc9b02ebb8299e739b0151125a5381c539fba8de78f2ae7428d58bca900ed91ecec82b116dae59896a6e2588a470057db68b3e73da7e9da30be1fa0 +SHA512 (remmina-1.4.10.tar.gz) = 7e54de9cafea306da1a858329a8b8476f1cff3b5d7cd2df7bd0c555ea0e2151b429b58ba958e44a4ce0fde24382387d0140884effaa743f2c536e51e17f1679a From b5471a53a8dc92310500a590199a358ee93c6d5a Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 28 Dec 2020 23:12:24 +0100 Subject: [PATCH 153/185] Explicitly enable KDE wallet build option --- remmina.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/remmina.spec b/remmina.spec index 367a772..44d371b 100644 --- a/remmina.spec +++ b/remmina.spec @@ -262,6 +262,7 @@ export CFLAGS="%{optflags} -std=gnu99" -DWITH_FREERDP=ON \ -DWITH_GCRYPT=ON \ -DWITH_GETTEXT=ON \ + -DWITH_KF5WALLET=ON \ -DWITH_KIOSK_SESSION=ON \ -DWITH_LIBSSH=ON \ -DWITH_SPICE=ON \ From 4ae7c33929f4e0ff3484c0122bdfab0ff8ba9267 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 15:13:53 +0000 Subject: [PATCH 154/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 44d371b..90b7157 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -358,6 +358,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.4.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Mon Dec 28 2020 Simone Caronni - 1.4.10-1 - Update to 1.4.10. From 93e130bae384c0e76e8a3e0579dc0930ce11e26f Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 3 Feb 2021 09:27:24 +0100 Subject: [PATCH 155/185] Update to 1.4.11 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 00d08d6..0989a3f 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.8.tar.gz /remmina-1.4.9.tar.gz /remmina-1.4.10.tar.gz +/remmina-1.4.11.tar.gz diff --git a/remmina.spec b/remmina.spec index 90b7157..498156b 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ %global commit0 9d1dbdf2d648644e0de9590c6291d7e7b72a1473 Name: remmina -Version: 1.4.10 -Release: 2%{?dist} +Version: 1.4.11 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -358,6 +358,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Wed Feb 03 2021 Simone Caronni - 1.4.11-1 +- Update to 1.4.11. + * Wed Jan 27 2021 Fedora Release Engineering - 1.4.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 8b3659e..e87bb90 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.10.tar.gz) = 7e54de9cafea306da1a858329a8b8476f1cff3b5d7cd2df7bd0c555ea0e2151b429b58ba958e44a4ce0fde24382387d0140884effaa743f2c536e51e17f1679a +SHA512 (remmina-1.4.11.tar.gz) = 441d9d91deed137fe228f7dd63f66a8e55dffaca87fbaf176726e44aa60ddef03f8dae1a1213dc4732ddbb714c97fdd731626ae6783a8b610558bd5960022d11 From 9aaea3a76f7575a4e44054be34d0e84abc089832 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 3 Feb 2021 14:16:58 +0100 Subject: [PATCH 156/185] Update SHA hash --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 498156b..dc70b07 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,4 +1,4 @@ -%global commit0 9d1dbdf2d648644e0de9590c6291d7e7b72a1473 +%global commit0 3f3b527f141bb4f1361157759251edfe5bfe2bfb Name: remmina Version: 1.4.11 From e60f330d285418876a18338691acdf75df734eef Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 11 Mar 2021 14:38:33 +0100 Subject: [PATCH 157/185] Update to 1.4.12 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0989a3f..6b040b0 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.9.tar.gz /remmina-1.4.10.tar.gz /remmina-1.4.11.tar.gz +/remmina-1.4.12.tar.gz diff --git a/remmina.spec b/remmina.spec index dc70b07..a5fe814 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 3f3b527f141bb4f1361157759251edfe5bfe2bfb +%global commit0 97312f67d1e782a709740e79d355348055a272ec Name: remmina -Version: 1.4.11 +Version: 1.4.12 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -358,6 +358,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Thu Mar 11 2021 Simone Caronni - 1.4.12-1 +- Update to 1.4.12. + * Wed Feb 03 2021 Simone Caronni - 1.4.11-1 - Update to 1.4.11. diff --git a/sources b/sources index e87bb90..b6415b5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.11.tar.gz) = 441d9d91deed137fe228f7dd63f66a8e55dffaca87fbaf176726e44aa60ddef03f8dae1a1213dc4732ddbb714c97fdd731626ae6783a8b610558bd5960022d11 +SHA512 (remmina-1.4.12.tar.gz) = 1452ff826f2678713c2a451ae591b0c0ce317ad39993afc2ef406e36c326bfb7610ab79c51c9146d1826f9f935916424b8248b2b5f8040e07e0e1d47baddb8db From ce457b2870480d4893e70dcef6e6cf5a8245a75f Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 30 Mar 2021 16:03:58 +0200 Subject: [PATCH 158/185] Update to 1.4.13 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6b040b0..7922f41 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.10.tar.gz /remmina-1.4.11.tar.gz /remmina-1.4.12.tar.gz +/remmina-1.4.13.tar.gz diff --git a/remmina.spec b/remmina.spec index a5fe814..6e39482 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 97312f67d1e782a709740e79d355348055a272ec +%global commit0 bd1be9d309b420234961b6dd5d2c6364f4a08e49 Name: remmina -Version: 1.4.12 +Version: 1.4.13 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -358,6 +358,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Tue Mar 30 2021 Simone Caronni - 1.4.13-1 +- Update to 1.4.13. + * Thu Mar 11 2021 Simone Caronni - 1.4.12-1 - Update to 1.4.12. diff --git a/sources b/sources index b6415b5..003e1ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.12.tar.gz) = 1452ff826f2678713c2a451ae591b0c0ce317ad39993afc2ef406e36c326bfb7610ab79c51c9146d1826f9f935916424b8248b2b5f8040e07e0e1d47baddb8db +SHA512 (remmina-1.4.13.tar.gz) = 94d2f5c0db9df7ebc57613b26502b79d53efac827b3b1607085619a6d9dcf681ee9af7dc0d426d4718e867af947814a31aa42117a552c8aec358e8d1db93207d From 6ed85954b6523b3c3af8bd4dc83ed56a43dac6a2 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Thu, 15 Apr 2021 15:03:13 +0200 Subject: [PATCH 159/185] Rebuild for updated FreeRDP --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 6e39482..ae6fe2d 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.13 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -358,6 +358,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Thu Apr 15 2021 Simone Caronni - 1.4.13-2 +- Rebuild for updated FreeRDP. + * Tue Mar 30 2021 Simone Caronni - 1.4.13-1 - Update to 1.4.13. From 9667786d216f736d3d8504e9c56bc7a984984d0e Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 10 May 2021 17:28:20 +0200 Subject: [PATCH 160/185] Update to 1.4.14 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7922f41..8031909 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.11.tar.gz /remmina-1.4.12.tar.gz /remmina-1.4.13.tar.gz +/remmina-1.4.14.tar.gz diff --git a/remmina.spec b/remmina.spec index ae6fe2d..0a89401 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ %global commit0 bd1be9d309b420234961b6dd5d2c6364f4a08e49 Name: remmina -Version: 1.4.13 -Release: 2%{?dist} +Version: 1.4.14 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -358,6 +358,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Mon May 10 2021 Simone Caronni - 1.4.14-1 +- Update to 1.4.14. + * Thu Apr 15 2021 Simone Caronni - 1.4.13-2 - Rebuild for updated FreeRDP. diff --git a/sources b/sources index 003e1ff..1571bfd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.13.tar.gz) = 94d2f5c0db9df7ebc57613b26502b79d53efac827b3b1607085619a6d9dcf681ee9af7dc0d426d4718e867af947814a31aa42117a552c8aec358e8d1db93207d +SHA512 (remmina-1.4.14.tar.gz) = c669fdce010f23a6237a0e149b1925bd55870e62fcb3690d0ba72668ed6807d74771f6492f0e47fd47301294bff4215fb1c3c19b21a36fe2b5d6967a59563c7c From 4b12e3aaea961f4e7c1ec3b47ea6e1fb79aa24ff Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Mon, 10 May 2021 17:55:40 +0200 Subject: [PATCH 161/185] Update commit hash --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 0a89401..2cfdf88 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,4 +1,4 @@ -%global commit0 bd1be9d309b420234961b6dd5d2c6364f4a08e49 +%global commit0 1b8667e5d496f9d54b1db72267d2215f79965336 Name: remmina Version: 1.4.14 From 4e6ae71b6e26d9ca034e12c155feb3193c84ac3a Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 11 May 2021 09:36:29 +0200 Subject: [PATCH 162/185] Update to 1.4.15 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8031909..9366733 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.12.tar.gz /remmina-1.4.13.tar.gz /remmina-1.4.14.tar.gz +/remmina-1.4.15.tar.gz diff --git a/remmina.spec b/remmina.spec index 2cfdf88..f1db4d5 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 1b8667e5d496f9d54b1db72267d2215f79965336 +%global commit0 446660672061d77b80acca3ca20be76296abbdb6 Name: remmina -Version: 1.4.14 +Version: 1.4.15 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -358,6 +358,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Tue May 11 2021 Simone Caronni - 1.4.15-1 +- Update to 1.4.15. + * Mon May 10 2021 Simone Caronni - 1.4.14-1 - Update to 1.4.14. diff --git a/sources b/sources index 1571bfd..4708423 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.14.tar.gz) = c669fdce010f23a6237a0e149b1925bd55870e62fcb3690d0ba72668ed6807d74771f6492f0e47fd47301294bff4215fb1c3c19b21a36fe2b5d6967a59563c7c +SHA512 (remmina-1.4.15.tar.gz) = f76cf06d01f560df66006bda730c05ba9c1b4ea52435abb46fcba266987a1170106809cbed0dfca04001b259e5d01a583cd6a23a795914a189cc3ed2c3c1ba9d From e5f0b975959783fac964cf12ea95b6a076250935 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Tue, 11 May 2021 16:40:01 +0200 Subject: [PATCH 163/185] Update to 1.4.16 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 9366733..3d612aa 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.13.tar.gz /remmina-1.4.14.tar.gz /remmina-1.4.15.tar.gz +/remmina-1.4.16.tar.gz diff --git a/remmina.spec b/remmina.spec index f1db4d5..2cebb2e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 446660672061d77b80acca3ca20be76296abbdb6 +%global commit0 20d315a4115f6934193e101cd34388ab68e50a64 Name: remmina -Version: 1.4.15 +Version: 1.4.16 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -358,6 +358,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Tue May 11 2021 Simone Caronni - 1.4.16-1 +- Update to 1.4.16. + * Tue May 11 2021 Simone Caronni - 1.4.15-1 - Update to 1.4.15. diff --git a/sources b/sources index 4708423..370bd17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.15.tar.gz) = f76cf06d01f560df66006bda730c05ba9c1b4ea52435abb46fcba266987a1170106809cbed0dfca04001b259e5d01a583cd6a23a795914a189cc3ed2c3c1ba9d +SHA512 (remmina-1.4.16.tar.gz) = 8ad44d3039fb4e05553036922d8f8c296578381fab7b63b530d8b4d7641db45a8d5d10ad3dfae733ddd43d83fe6355506d8a167de2468ee5aa8c4fa39ca97e4b From 553783bf7b11e1be7812058e38a9d465db742e47 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 26 May 2021 11:49:23 +0200 Subject: [PATCH 164/185] Update to 1.4.17 --- .gitignore | 1 + remmina.spec | 10 ++++++++-- sources | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3d612aa..91d5e20 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.14.tar.gz /remmina-1.4.15.tar.gz /remmina-1.4.16.tar.gz +/remmina-1.4.17.tar.gz diff --git a/remmina.spec b/remmina.spec index 2cebb2e..eddf4b3 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 20d315a4115f6934193e101cd34388ab68e50a64 +%global commit0 0ef1621b3e16b3168213147a2bfca39da2c2668f Name: remmina -Version: 1.4.16 +Version: 1.4.17 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -39,6 +39,7 @@ BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 BuildRequires: pkgconfig(freerdp2) BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(gtk-vnc-2.0) BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libsoup-2.4) @@ -265,6 +266,7 @@ export CFLAGS="%{optflags} -std=gnu99" -DWITH_KF5WALLET=ON \ -DWITH_KIOSK_SESSION=ON \ -DWITH_LIBSSH=ON \ + -DWITH_NEWS=OFF \ -DWITH_SPICE=ON \ -DWITH_TELEPATHY=OFF \ -DWITH_VTE=ON @@ -358,6 +360,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Wed May 26 2021 Simone Caronni - 1.4.17-1 +- Update to 1.4.17. +- Disable news at every update. + * Tue May 11 2021 Simone Caronni - 1.4.16-1 - Update to 1.4.16. diff --git a/sources b/sources index 370bd17..e5cb3f2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.16.tar.gz) = 8ad44d3039fb4e05553036922d8f8c296578381fab7b63b530d8b4d7641db45a8d5d10ad3dfae733ddd43d83fe6355506d8a167de2468ee5aa8c4fa39ca97e4b +SHA512 (remmina-1.4.17.tar.gz) = 5b1286f165c562d6369eed3d98a7085cc2fb9ff281ed27e04a57aa0e3a306677be0a4d2e37cfe1d8a62c99a96710f83828ae9f6797707d2f6494f2ddada2c88f From 2cfe3690509cbbbf80a8fb81eb7dd76d11d357f7 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Sat, 5 Jun 2021 17:56:54 +0200 Subject: [PATCH 165/185] Update to 1.4.18 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 91d5e20..221c996 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.15.tar.gz /remmina-1.4.16.tar.gz /remmina-1.4.17.tar.gz +/remmina-1.4.18.tar.gz diff --git a/remmina.spec b/remmina.spec index eddf4b3..549b178 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 0ef1621b3e16b3168213147a2bfca39da2c2668f +%global commit0 045862cc7d7dd986b349c68131df2f86b9b1cd9c Name: remmina -Version: 1.4.17 +Version: 1.4.18 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -360,6 +360,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Sat Jun 05 2021 Simone Caronni - 1.4.18-1 +- Update to 1.4.18. + * Wed May 26 2021 Simone Caronni - 1.4.17-1 - Update to 1.4.17. - Disable news at every update. diff --git a/sources b/sources index e5cb3f2..b7bfa6d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.17.tar.gz) = 5b1286f165c562d6369eed3d98a7085cc2fb9ff281ed27e04a57aa0e3a306677be0a4d2e37cfe1d8a62c99a96710f83828ae9f6797707d2f6494f2ddada2c88f +SHA512 (remmina-1.4.18.tar.gz) = 913020ce00cd3eb1c310aa93324670eeb6f4fb2ab6c6655b0654ef9f6e00f5aa864ede767cf21ab58253e24de3c42196aad3816196176181e00121f9b5423952 From aa85db31fe86849109e6a8e72515f51b16588211 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 30 Jun 2021 11:23:44 +0200 Subject: [PATCH 166/185] Update to 1.4.19 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 221c996..7090fc3 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.16.tar.gz /remmina-1.4.17.tar.gz /remmina-1.4.18.tar.gz +/remmina-1.4.19.tar.gz diff --git a/remmina.spec b/remmina.spec index 549b178..c403bd8 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 045862cc7d7dd986b349c68131df2f86b9b1cd9c +%global commit0 875ab53e32986c6a27d2345fd4b4300e00e47b2e Name: remmina -Version: 1.4.18 +Version: 1.4.19 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -360,6 +360,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Wed Jun 30 2021 Simone Caronni - 1.4.19-1 +- Update to 1.4.19. + * Sat Jun 05 2021 Simone Caronni - 1.4.18-1 - Update to 1.4.18. diff --git a/sources b/sources index b7bfa6d..4955e00 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.18.tar.gz) = 913020ce00cd3eb1c310aa93324670eeb6f4fb2ab6c6655b0654ef9f6e00f5aa864ede767cf21ab58253e24de3c42196aad3816196176181e00121f9b5423952 +SHA512 (remmina-1.4.19.tar.gz) = a0405c4e292ca9f76e1d34fa5b344e3fa23aceff73fd8badb7f80106a66b04f6f6fb0479c4cdc2a93fe4660186644e3bc8ab272000f4007b609a83d2b9328429 From aa3b02f3596efe729c0e8ece2bb0539f27e224b4 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 30 Jun 2021 11:57:29 +0200 Subject: [PATCH 167/185] Adjust file list --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index c403bd8..c14122e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -297,8 +297,8 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_datadir}/icons/hicolor/*/actions/*.* %{_datadir}/icons/hicolor/*/apps/*.* %{_datadir}/icons/hicolor/*/emblems/remmina-*.svg +%{_datadir}/icons/hicolor/*/status/remmina-status.svg %{_datadir}/icons/hicolor/apps/*.svg -%{_datadir}/icons/hicolor/scalable/panel/*.svg %{_datadir}/mime/packages/*.xml %{_datadir}/%{name}/ %dir %{_libdir}/remmina/ From e1a8165a6cb4b91597a3bf57fa8ac87bebc7c1ec Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 21 Jul 2021 11:29:56 +0200 Subject: [PATCH 168/185] Update to 1.4.20 --- .gitignore | 1 + remmina.spec | 71 ++++++++-------------------------------------------- sources | 2 +- 3 files changed, 12 insertions(+), 62 deletions(-) diff --git a/.gitignore b/.gitignore index 7090fc3..e371b57 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.17.tar.gz /remmina-1.4.18.tar.gz /remmina-1.4.19.tar.gz +/remmina-1.4.20.tar.gz diff --git a/remmina.spec b/remmina.spec index c14122e..e6bb066 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 875ab53e32986c6a27d2345fd4b4300e00e47b2e +%global commit0 0bc0560e73687581f7d5f9d006fde8f8f7bd1c4a Name: remmina -Version: 1.4.19 +Version: 1.4.20 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -50,25 +50,21 @@ BuildRequires: pkgconfig(vte-2.91) BuildRequires: pkgconfig(webkit2gtk-4.0) BuildRequires: pkgconfig(xkbfile) -# We don't ship the remmina-plugins-telepathy package any longer -Obsoletes: %{name}-plugins-telepathy < %{version}-%{release} +# We don't ship these remmina plugins any longer +Obsoletes: %{name}-plugins-nx < %{version}-%{release} +Obsoletes: %{name}-plugins-st < %{version}-%{release} +Obsoletes: %{name}-plugins-xdmcp < %{version}-%{release} %if 0%{?fedora} || 0%{?rhel} >= 8 Recommends: %{name}-plugins-exec -Recommends: %{name}-plugins-nx Recommends: %{name}-plugins-rdp Recommends: %{name}-plugins-secret -Recommends: %{name}-plugins-st Recommends: %{name}-plugins-vnc -Recommends: %{name}-plugins-xdmcp %else Requires: %{name}-plugins-exec -Requires: %{name}-plugins-nx Requires: %{name}-plugins-rdp Requires: %{name}-plugins-secret -Requires: %{name}-plugins-st Requires: %{name}-plugins-vnc -Requires: %{name}-plugins-xdmcp %endif %description @@ -120,19 +116,6 @@ This package contains the plugin with keyring support for the Remmina remote desktop client. -%package plugins-nx -Summary: NX plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: nxproxy - -%description plugins-nx -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny net-books. - -This package contains the NX plugin for the Remmina remote desktop client. - - %package plugins-rdp Summary: RDP plugin for Remmina Remote Desktop Client Requires: %{name}%{?_isa} = %{version}-%{release} @@ -145,17 +128,6 @@ computers in front of either large monitors or tiny net-books. This package contains the Remote Desktop Protocol (RDP) plugin for the Remmina remote desktop client. -%package plugins-st -Summary: Simple Terminal plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description plugins-st -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny net-books. - -This package contains the Simple Terminal plugin for the Remmina remote desktop -client. %package plugins-vnc Summary: VNC plugin for Remmina Remote Desktop Client @@ -170,20 +142,6 @@ This package contains the VNC plugin for the Remmina remote desktop client. -%package plugins-xdmcp -Summary: XDMCP plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: xorg-x11-server-Xephyr - -%description plugins-xdmcp -Remmina is a remote desktop client written in GTK+, aiming to be useful for -system administrators and travelers, who need to work with lots of remote -computers in front of either large monitors or tiny net-books. - -This package contains the XDMCP plugin for the Remmina remote desktop -client. - - %package plugins-spice Summary: SPICE plugin for Remmina Remote Desktop Client Requires: %{name}%{?_isa} = %{version}-%{release} @@ -317,29 +275,16 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %files plugins-secret %{_libdir}/remmina/plugins/remmina-plugin-secret.so -%files plugins-nx -%{_libdir}/remmina/plugins/remmina-plugin-nx.so -%{_datadir}/icons/hicolor/*/emblems/remmina-nx-symbolic.svg - %files plugins-rdp %{_libdir}/remmina/plugins/remmina-plugin-rdp.so %{_datadir}/icons/hicolor/*/emblems/remmina-rdp-ssh-symbolic.svg %{_datadir}/icons/hicolor/*/emblems/remmina-rdp-symbolic.svg -%files plugins-st -%{_libdir}/remmina/plugins/remmina-plugin-st.so -%{_datadir}/icons/hicolor/*/emblems/remmina-tool-symbolic.svg - %files plugins-vnc %{_libdir}/remmina/plugins/remmina-plugin-vnc.so %{_datadir}/icons/hicolor/*/emblems/remmina-vnc-ssh-symbolic.svg %{_datadir}/icons/hicolor/*/emblems/remmina-vnc-symbolic.svg -%files plugins-xdmcp -%{_libdir}/remmina/plugins/remmina-plugin-xdmcp.so -%{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp-ssh-symbolic.svg -%{_datadir}/icons/hicolor/*/emblems/remmina-xdmcp-symbolic.svg - %files plugins-spice %{_libdir}/remmina/plugins/remmina-plugin-spice.so %{_datadir}/icons/hicolor/*/emblems/remmina-spice-ssh-symbolic.svg @@ -360,6 +305,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Wed Jul 21 2021 Simone Caronni - 1.4.20-1 +- Update to 1.4.20. +- Remove unmaintained nx, st, xdmcp plugins. + * Wed Jun 30 2021 Simone Caronni - 1.4.19-1 - Update to 1.4.19. diff --git a/sources b/sources index 4955e00..d463e93 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.19.tar.gz) = a0405c4e292ca9f76e1d34fa5b344e3fa23aceff73fd8badb7f80106a66b04f6f6fb0479c4cdc2a93fe4660186644e3bc8ab272000f4007b609a83d2b9328429 +SHA512 (remmina-1.4.20.tar.gz) = dabdfc7a4dfb3f34a07df3f155f1ccdc443ce42ce7041fba37708f261e0d92863f6b38804477e168f2b20323937d4dd47b9262023db3d56b889ceeb69a4c4609 From 81b7f50c2227ee1b5f6085619f82b7e92d473fef Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 11:20:44 +0000 Subject: [PATCH 169/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index e6bb066..407b559 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.20 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -305,6 +305,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.4.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Wed Jul 21 2021 Simone Caronni - 1.4.20-1 - Update to 1.4.20. - Remove unmaintained nx, st, xdmcp plugins. From cffe633b93d442b290078fd40b8b76f3d7598137 Mon Sep 17 00:00:00 2001 From: Sahana Prasad Date: Tue, 14 Sep 2021 19:13:24 +0200 Subject: [PATCH 170/185] Rebuilt with OpenSSL 3.0.0 --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 407b559..a280b81 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.20 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -305,6 +305,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Tue Sep 14 2021 Sahana Prasad - 1.4.20-3 +- Rebuilt with OpenSSL 3.0.0 + * Fri Jul 23 2021 Fedora Release Engineering - 1.4.20-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 487b5bb4bfe53bdbec8ac7368ddf323d3b4740f4 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 10 Nov 2021 20:45:16 +0100 Subject: [PATCH 171/185] Update to 1.4.21 --- .gitignore | 1 + remmina.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index e371b57..2d9c96f 100644 --- a/.gitignore +++ b/.gitignore @@ -63,3 +63,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.18.tar.gz /remmina-1.4.19.tar.gz /remmina-1.4.20.tar.gz +/remmina-1.4.21.tar.gz diff --git a/remmina.spec b/remmina.spec index a280b81..2fa13ff 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ %global commit0 0bc0560e73687581f7d5f9d006fde8f8f7bd1c4a Name: remmina -Version: 1.4.20 -Release: 3%{?dist} +Version: 1.4.21 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -305,6 +305,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Wed Nov 10 2021 Simone Caronni - 1.4.21-1 +- Update to 1.4.21. + * Tue Sep 14 2021 Sahana Prasad - 1.4.20-3 - Rebuilt with OpenSSL 3.0.0 diff --git a/sources b/sources index d463e93..924e53d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.20.tar.gz) = dabdfc7a4dfb3f34a07df3f155f1ccdc443ce42ce7041fba37708f261e0d92863f6b38804477e168f2b20323937d4dd47b9262023db3d56b889ceeb69a4c4609 +SHA512 (remmina-1.4.21.tar.gz) = cabcc7ce6fb5ca6949c2db626c2c336ec9666799a275d1604f2c5bb998113e98fbf392bd7a211952e41f12dcdbae14ac5299e857d9a81cc31a746ee9011c99b4 From 81d4350b08bd8a0c4186eaef065cf07cdfdcab92 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 10 Nov 2021 20:56:21 +0100 Subject: [PATCH 172/185] Update release hash --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 2fa13ff..db837c8 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,4 +1,4 @@ -%global commit0 0bc0560e73687581f7d5f9d006fde8f8f7bd1c4a +%global commit0 bbd98e2b69c99f30c81ffbc88ebc27d469287e4d Name: remmina Version: 1.4.21 From f9d5a2e5eb6bed2871aa1f3a266455b1af8f5c04 Mon Sep 17 00:00:00 2001 From: Simone Caronni Date: Wed, 10 Nov 2021 21:18:59 +0100 Subject: [PATCH 173/185] Update SPEC file --- remmina.spec | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/remmina.spec b/remmina.spec index db837c8..bef2b48 100644 --- a/remmina.spec +++ b/remmina.spec @@ -198,9 +198,6 @@ that shows up under the display manager session menu. %prep %autosetup -p1 -n Remmina-v%{version}-%{commit0} -# Remove unsupported entries -sed -i -e '/x-scheme-handler/d' data/desktop/remmina-file.desktop.in - %build mkdir -p build @@ -254,8 +251,8 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/*/actions/*.* %{_datadir}/icons/hicolor/*/apps/*.* -%{_datadir}/icons/hicolor/*/emblems/remmina-*.svg -%{_datadir}/icons/hicolor/*/status/remmina-status.svg +%{_datadir}/icons/hicolor/*/emblems/org.remmina.Remmina-*.svg +%{_datadir}/icons/hicolor/*/status/org.remmina.Remmina-status.svg %{_datadir}/icons/hicolor/apps/*.svg %{_datadir}/mime/packages/*.xml %{_datadir}/%{name}/ @@ -277,18 +274,18 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %files plugins-rdp %{_libdir}/remmina/plugins/remmina-plugin-rdp.so -%{_datadir}/icons/hicolor/*/emblems/remmina-rdp-ssh-symbolic.svg -%{_datadir}/icons/hicolor/*/emblems/remmina-rdp-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/org.remmina.Remmina-rdp-ssh-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/org.remmina.Remmina-rdp-symbolic.svg %files plugins-vnc %{_libdir}/remmina/plugins/remmina-plugin-vnc.so -%{_datadir}/icons/hicolor/*/emblems/remmina-vnc-ssh-symbolic.svg -%{_datadir}/icons/hicolor/*/emblems/remmina-vnc-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/org.remmina.Remmina-vnc-ssh-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/org.remmina.Remmina-vnc-symbolic.svg %files plugins-spice %{_libdir}/remmina/plugins/remmina-plugin-spice.so -%{_datadir}/icons/hicolor/*/emblems/remmina-spice-ssh-symbolic.svg -%{_datadir}/icons/hicolor/*/emblems/remmina-spice-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/org.remmina.Remmina-spice-ssh-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/org.remmina.Remmina-spice-symbolic.svg %files plugins-www %{_libdir}/remmina/plugins/remmina-plugin-www.so From ce3a8236d5399bdc81dd5f5d660ac67ffc9fa3e8 Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Wed, 19 Jan 2022 04:51:45 +0000 Subject: [PATCH 174/185] Update to 1.4.23. --- .gitignore | 1 + remmina.spec | 32 +++++++++++++++++++++++++++++--- sources | 2 +- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2d9c96f..38cbe28 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.19.tar.gz /remmina-1.4.20.tar.gz /remmina-1.4.21.tar.gz +/remmina-1.4.23.tar.gz diff --git a/remmina.spec b/remmina.spec index bef2b48..e5c7369 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,7 +1,7 @@ -%global commit0 bbd98e2b69c99f30c81ffbc88ebc27d469287e4d +%global commit0 a03c1648a090458736434c77c0be00a7cf9cc44b Name: remmina -Version: 1.4.21 +Version: 1.4.23 Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT @@ -34,6 +34,9 @@ BuildRequires: kf5-kwallet-devel BuildRequires: libappstream-glib BuildRequires: libgcrypt-devel BuildRequires: libsodium-devel +# pyhoca-cli needed as build dep for x2go plugin to be built when actually +# only a runtime dep. Has a FIXME on it in upstream tarball. +BuildRequires: pyhoca-cli BuildRequires: pkgconfig(appindicator3-0.1) BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 @@ -182,6 +185,19 @@ client. It will be activated automatically if KDE Wallet is installed and running. +%package plugins-x2go +Summary: x2go plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pyhoca-cli + +%description plugins-x2go +Remmina is a remote desktop client written in GTK+, aiming to be useful for +system administrators and travelers, who need to work with lots of remote +computers in front of either large monitors or tiny net-books. + +This package contains the x2go plugin for the Remmina remote desktop client. + + %package gnome-session Summary: Gnome Shell session for Remmina kiosk mode Requires: %{name}%{?_isa} = %{version}-%{release} @@ -224,7 +240,8 @@ export CFLAGS="%{optflags} -std=gnu99" -DWITH_NEWS=OFF \ -DWITH_SPICE=ON \ -DWITH_TELEPATHY=OFF \ - -DWITH_VTE=ON + -DWITH_VTE=ON \ + -DWITH_X2GO=ON %cmake3_build @@ -293,6 +310,11 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %files plugins-kwallet %{_libdir}/remmina/plugins/remmina-plugin-kwallet.so +%files plugins-x2go +%{_libdir}/remmina/plugins/remmina-plugin-x2go.so +%{_datadir}/icons/hicolor/*/emblems/org.remmina.Remmina-x2go-ssh-symbolic.svg +%{_datadir}/icons/hicolor/*/emblems/org.remmina.Remmina-x2go-symbolic.svg + %files gnome-session %{_bindir}/gnome-session-remmina %{_bindir}/remmina-gnome @@ -302,6 +324,10 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Wed Jan 19 2022 Phil Wyett - 1.4.23-1 +- New upstream version 1.4.23. +- Enable x2go plugin. + * Wed Nov 10 2021 Simone Caronni - 1.4.21-1 - Update to 1.4.21. diff --git a/sources b/sources index 924e53d..d9b12b5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.21.tar.gz) = cabcc7ce6fb5ca6949c2db626c2c336ec9666799a275d1604f2c5bb998113e98fbf392bd7a211952e41f12dcdbae14ac5299e857d9a81cc31a746ee9011c99b4 +SHA512 (remmina-1.4.23.tar.gz) = 2fc175d4e81483dcd00bad4a1e62077952d89961f0bf1825c30459fa57b198b646658b456525a278b18550e458c05c450bab991b3c5cba00675dcedb481965a2 From 406367fc80404c6454d68f90511281a29d78d7ac Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Wed, 19 Jan 2022 09:22:10 +0000 Subject: [PATCH 175/185] Remove unneeded BuildRequires for gtk-vnc-2.0. --- remmina.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index e5c7369..41c6c75 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.23 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -42,7 +42,6 @@ BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 BuildRequires: pkgconfig(freerdp2) BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(gtk-vnc-2.0) BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libsoup-2.4) @@ -324,6 +323,11 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Wed Jan 19 2022 Phil Wyett - 1.4.23-2 +- Remove unneeded BuildRequires for gtk-vnc-2.0. + libvncserver is the preferred for VNC and disables the gvnc plugin if found. + We have not in the recent past built the gvnc plugin. + * Wed Jan 19 2022 Phil Wyett - 1.4.23-1 - New upstream version 1.4.23. - Enable x2go plugin. From b86db47a9b213f106b35b3790457e24d529c6d67 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 21 Jan 2022 17:43:33 +0000 Subject: [PATCH 176/185] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- remmina.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 41c6c75..3abc429 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.23 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -323,6 +323,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Fri Jan 21 2022 Fedora Release Engineering - 1.4.23-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Wed Jan 19 2022 Phil Wyett - 1.4.23-2 - Remove unneeded BuildRequires for gtk-vnc-2.0. libvncserver is the preferred for VNC and disables the gvnc plugin if found. From 6f891dc08e3eea87a78ef85e5c68592f06923eb9 Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Fri, 28 Jan 2022 03:56:27 +0000 Subject: [PATCH 177/185] Update to 1.4.23-4. --- remmina.spec | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index 3abc429..7fbe52c 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,14 +2,15 @@ Name: remmina Version: 1.4.23 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-%{version}.tar.gz#/%{name}-%{version}.tar.gz -%if 0%{?rhel} >= 7 +# Exclude el7 from building on aarch64. +%if 0%{?rhel} == 7 ExcludeArch: aarch64 %endif @@ -37,6 +38,7 @@ BuildRequires: libsodium-devel # pyhoca-cli needed as build dep for x2go plugin to be built when actually # only a runtime dep. Has a FIXME on it in upstream tarball. BuildRequires: pyhoca-cli +BuildRequires: xdg-utils BuildRequires: pkgconfig(appindicator3-0.1) BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 @@ -258,6 +260,20 @@ cp -p %{SOURCE1} %{buildroot}/%{_includedir}/%{name}/ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdata.xml +%if 0%{?rhel} == 7 +%post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : +%endif + %files -f %{name}.lang %license LICENSE %doc AUTHORS ChangeLog README.md @@ -323,6 +339,12 @@ appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdat %{_mandir}/man1/remmina-gnome.1.* %changelog +* Sun Jan 23 2022 Phil Wyett - 1.4.23-4 +- Add missing xdg-utils BuildRequires for generation of icon and theme caches. +- Modify conditional to exclude el7 only from aarch64 builds. Will + now enable building for el8 and above. +- Add scriptlets for updating of icon cache on el7 as not automatic. + * Fri Jan 21 2022 Fedora Release Engineering - 1.4.23-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From bae7ee1d20970b8244ae970bc780106fc084ee2d Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Sat, 29 Jan 2022 16:05:59 +0000 Subject: [PATCH 178/185] Cleanup of spec file formatting. --- remmina.spec | 142 ++++++++++++++++++++++++--------------------------- 1 file changed, 66 insertions(+), 76 deletions(-) diff --git a/remmina.spec b/remmina.spec index 7fbe52c..e276627 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,13 +1,13 @@ %global commit0 a03c1648a090458736434c77c0be00a7cf9cc44b -Name: remmina -Version: 1.4.23 -Release: 4%{?dist} -Summary: Remote Desktop Client -License: GPLv2+ and MIT -URL: http://remmina.org +Name: emmina +Version: 1.4.23 +Release: 4%{?dist} +Summary: Remote Desktop Client +License: GPLv2+ and MIT +URL: http://remmina.org -Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-%{version}.tar.gz#/%{name}-%{version}.tar.gz # Exclude el7 from building on aarch64. %if 0%{?rhel} == 7 @@ -18,7 +18,7 @@ ExcludeArch: aarch64 # See http://www.muflone.com/remmina-plugin-rdesktop/english/install.html which # use http://www.muflone.com/remmina-plugin-builder/ with remmina bundled source. # So we can't use it directly only as instructions. -Source1: pluginBuild-CMakeLists.txt +Source1: pluginBuild-CMakeLists.txt %if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: cmake >= 3.0.0 @@ -54,21 +54,21 @@ BuildRequires: pkgconfig(vte-2.91) BuildRequires: pkgconfig(webkit2gtk-4.0) BuildRequires: pkgconfig(xkbfile) -# We don't ship these remmina plugins any longer -Obsoletes: %{name}-plugins-nx < %{version}-%{release} -Obsoletes: %{name}-plugins-st < %{version}-%{release} -Obsoletes: %{name}-plugins-xdmcp < %{version}-%{release} +# We don't ship these remmina plugins any longer. +Obsoletes: %{name}-plugins-nx < %{version}-%{release} +Obsoletes: %{name}-plugins-st < %{version}-%{release} +Obsoletes: %{name}-plugins-xdmcp < %{version}-%{release} %if 0%{?fedora} || 0%{?rhel} >= 8 -Recommends: %{name}-plugins-exec -Recommends: %{name}-plugins-rdp -Recommends: %{name}-plugins-secret -Recommends: %{name}-plugins-vnc +Recommends: %{name}-plugins-exec +Recommends: %{name}-plugins-rdp +Recommends: %{name}-plugins-secret +Recommends: %{name}-plugins-vnc %else -Requires: %{name}-plugins-exec -Requires: %{name}-plugins-rdp -Requires: %{name}-plugins-secret -Requires: %{name}-plugins-vnc +Requires: %{name}-plugins-exec +Requires: %{name}-plugins-rdp +Requires: %{name}-plugins-secret +Requires: %{name}-plugins-vnc %endif %description @@ -81,22 +81,20 @@ user interface. Currently RDP, VNC, XDMCP and SSH are supported. Please don't forget to install the plugins for the protocols you want to use. +%package devel +Summary: Development files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig -%package devel -Summary: Development files for %{name} -Requires: %{name} = %{version}-%{release} -Requires: pkgconfig - -%description devel +%description devel The %{name}-devel package contains header files for developing plugins for %{name}. +%package plugins-exec +Summary: External execution plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} -%package plugins-exec -Summary: External execution plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description plugins-exec +%description plugins-exec Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. @@ -104,14 +102,13 @@ computers in front of either large monitors or tiny net-books. This package contains the plugin to execute external processes (commands or applications) from the Remmina window. +%package plugins-secret +Summary: Keyring integration for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} +Obsoletes: %{name}-plugins-gnome < %{version}-%{release} +Provides: %{name}-plugins-gnome%{?_isa} = %{version}-%{release} -%package plugins-secret -Summary: Keyring integration for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} -Obsoletes: %{name}-plugins-gnome < %{version}-%{release} -Provides: %{name}-plugins-gnome%{?_isa} = %{version}-%{release} - -%description plugins-secret +%description plugins-secret Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. @@ -119,12 +116,11 @@ computers in front of either large monitors or tiny net-books. This package contains the plugin with keyring support for the Remmina remote desktop client. +%package plugins-rdp +Summary: RDP plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} -%package plugins-rdp -Summary: RDP plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description plugins-rdp +%description plugins-rdp Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. @@ -132,12 +128,11 @@ computers in front of either large monitors or tiny net-books. This package contains the Remote Desktop Protocol (RDP) plugin for the Remmina remote desktop client. +%package plugins-vnc +Summary: VNC plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} -%package plugins-vnc -Summary: VNC plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description plugins-vnc +%description plugins-vnc Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. @@ -145,12 +140,11 @@ computers in front of either large monitors or tiny net-books. This package contains the VNC plugin for the Remmina remote desktop client. +%package plugins-spice +Summary: SPICE plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} -%package plugins-spice -Summary: SPICE plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description plugins-spice +%description plugins-spice Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. @@ -158,12 +152,11 @@ computers in front of either large monitors or tiny net-books. This package contains the SPICE plugin for the Remmina remote desktop client. +%package plugins-www +Summary: WWW plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} -%package plugins-www -Summary: WWW plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description plugins-www +%description plugins-www Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. @@ -171,12 +164,11 @@ computers in front of either large monitors or tiny net-books. This package contains the WWW plugin (web browser with authentication) for the Remmina remote desktop client. +%package plugins-kwallet +Summary: KDE Wallet plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} -%package plugins-kwallet -Summary: KDE Wallet plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description plugins-kwallet +%description plugins-kwallet Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. @@ -185,26 +177,24 @@ This package contains the KDE Wallet plugin for the Remmina remote desktop client. It will be activated automatically if KDE Wallet is installed and running. +%package plugins-x2go +Summary: x2go plugin for Remmina Remote Desktop Client +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pyhoca-cli -%package plugins-x2go -Summary: x2go plugin for Remmina Remote Desktop Client -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: pyhoca-cli - -%description plugins-x2go +%description plugins-x2go Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. This package contains the x2go plugin for the Remmina remote desktop client. +%package gnome-session +Summary: Gnome Shell session for Remmina kiosk mode +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: gnome-session -%package gnome-session -Summary: Gnome Shell session for Remmina kiosk mode -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: gnome-session - -%description gnome-session +%description gnome-session Remmina is a remote desktop client written in GTK+, aiming to be useful for system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. @@ -219,7 +209,7 @@ that shows up under the display manager session menu. mkdir -p build %if 0%{?fedora} -# Workaround for Pango on Fedora 31+ +# Workaround for Pango on Fedora 31+. export CFLAGS="%{optflags} -I%{_includedir}/harfbuzz" %endif From d7bd3811df3f430b88baaf7472533cc8942e914f Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Sat, 29 Jan 2022 16:06:48 +0000 Subject: [PATCH 179/185] Fix typo. --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index e276627..8614f6a 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,6 +1,6 @@ %global commit0 a03c1648a090458736434c77c0be00a7cf9cc44b -Name: emmina +Name: remmina Version: 1.4.23 Release: 4%{?dist} Summary: Remote Desktop Client From 412612ac6d48f6326ad8e8b33f176ef461576c55 Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Sat, 29 Jan 2022 16:15:38 +0000 Subject: [PATCH 180/185] Use descriptive commit hash variable for release. --- remmina.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remmina.spec b/remmina.spec index 8614f6a..462d48e 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,4 +1,4 @@ -%global commit0 a03c1648a090458736434c77c0be00a7cf9cc44b +%global release_commit_hash a03c1648a090458736434c77c0be00a7cf9cc44b Name: remmina Version: 1.4.23 @@ -203,7 +203,7 @@ This package contains Remmina kiosk mode, including a Gnome Shell session that shows up under the display manager session menu. %prep -%autosetup -p1 -n Remmina-v%{version}-%{commit0} +%autosetup -p1 -n Remmina-v%{version}-%{release_commit_hash} %build mkdir -p build From 588d24fe59e1a6edfcda58a5f43e01e7f32fb43b Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Thu, 10 Feb 2022 16:11:38 +0000 Subject: [PATCH 181/185] New upstream version 1.4.24. --- .gitignore | 1 + remmina.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 38cbe28..1fbd7c4 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,4 @@ remmina-0.7.5.tar.gz /remmina-1.4.20.tar.gz /remmina-1.4.21.tar.gz /remmina-1.4.23.tar.gz +/remmina-1.4.24.tar.gz diff --git a/remmina.spec b/remmina.spec index 462d48e..51aa272 100644 --- a/remmina.spec +++ b/remmina.spec @@ -1,8 +1,8 @@ -%global release_commit_hash a03c1648a090458736434c77c0be00a7cf9cc44b +%global release_commit_hash ffa6a7ef9c6be7951bac23d14df148098fd2d3fa Name: remmina -Version: 1.4.23 -Release: 4%{?dist} +Version: 1.4.24 +Release: 1%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: http://remmina.org @@ -329,6 +329,9 @@ fi %{_mandir}/man1/remmina-gnome.1.* %changelog +* Thu Feb 10 2022 Phil Wyett - 1.4.24-1 +- New upstream version 1.4.24. + * Sun Jan 23 2022 Phil Wyett - 1.4.23-4 - Add missing xdg-utils BuildRequires for generation of icon and theme caches. - Modify conditional to exclude el7 only from aarch64 builds. Will diff --git a/sources b/sources index d9b12b5..6e78639 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (remmina-1.4.23.tar.gz) = 2fc175d4e81483dcd00bad4a1e62077952d89961f0bf1825c30459fa57b198b646658b456525a278b18550e458c05c450bab991b3c5cba00675dcedb481965a2 +SHA512 (remmina-1.4.24.tar.gz) = 6314c6f4cbcefe5eb35b8bec85e7b57324e1e40b1de26b728a324f39922c7160871514b9efd9bbfa2db02af21b98f17f10c89786431adee2450735c7ab0e65a7 From cb2aa22829907370dd66e6384bf633a381c4c732 Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Thu, 10 Feb 2022 19:21:15 +0000 Subject: [PATCH 182/185] Remove obsolete XDMCP from description. --- remmina.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remmina.spec b/remmina.spec index 51aa272..31d469b 100644 --- a/remmina.spec +++ b/remmina.spec @@ -77,7 +77,7 @@ system administrators and travelers, who need to work with lots of remote computers in front of either large monitors or tiny net-books. Remmina supports multiple network protocols in an integrated and consistent -user interface. Currently RDP, VNC, XDMCP and SSH are supported. +user interface. Currently RDP, VNC and SSH are supported. Please don't forget to install the plugins for the protocols you want to use. From 4cf67398632fe78fff05135d73f5470a07521136 Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Sat, 12 Feb 2022 19:44:11 +0000 Subject: [PATCH 183/185] Various updates. --- remmina.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/remmina.spec b/remmina.spec index 31d469b..759bfaf 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,16 +2,16 @@ Name: remmina Version: 1.4.24 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT -URL: http://remmina.org +URL: https://remmina.org Source0: https://gitlab.com/Remmina/Remmina/-/archive/v%{version}/Remmina-%{version}.tar.gz#/%{name}-%{version}.tar.gz # Exclude el7 from building on aarch64. %if 0%{?rhel} == 7 -ExcludeArch: aarch64 +ExcludeArch: aarch64 %endif # Cmake helper file to easy build plugins outside remmina source tree @@ -35,9 +35,6 @@ BuildRequires: kf5-kwallet-devel BuildRequires: libappstream-glib BuildRequires: libgcrypt-devel BuildRequires: libsodium-devel -# pyhoca-cli needed as build dep for x2go plugin to be built when actually -# only a runtime dep. Has a FIXME on it in upstream tarball. -BuildRequires: pyhoca-cli BuildRequires: xdg-utils BuildRequires: pkgconfig(appindicator3-0.1) BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 @@ -250,6 +247,7 @@ cp -p %{SOURCE1} %{buildroot}/%{_includedir}/%{name}/ desktop-file-validate %{buildroot}/%{_datadir}/applications/*.desktop appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/*.appdata.xml +# Manually trigger icon cache generation on el7 only. %if 0%{?rhel} == 7 %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -329,6 +327,11 @@ fi %{_mandir}/man1/remmina-gnome.1.* %changelog +* Sat Feb 12 2022 Phil Wyett - 1.4.24-2 +- Remove XDMCP reference from remmina package description. +- Remove pyhoca-cli BuildRrequires. Only Requires on x2go now required. +- Use upstream projects HTTPS URL. + * Thu Feb 10 2022 Phil Wyett - 1.4.24-1 - New upstream version 1.4.24. From 85404cd9b8540427d1f6b88445d866f5f6b0c8e7 Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Sun, 13 Feb 2022 08:49:19 +0000 Subject: [PATCH 184/185] Remove unnecessary version constraints on BuildRequires. --- remmina.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/remmina.spec b/remmina.spec index 759bfaf..8515dd9 100644 --- a/remmina.spec +++ b/remmina.spec @@ -21,7 +21,7 @@ ExcludeArch: aarch64 Source1: pluginBuild-CMakeLists.txt %if 0%{?fedora} || 0%{?rhel} >= 8 -BuildRequires: cmake >= 3.0.0 +BuildRequires: cmake %else BuildRequires: cmake3 %endif @@ -37,14 +37,14 @@ BuildRequires: libgcrypt-devel BuildRequires: libsodium-devel BuildRequires: xdg-utils BuildRequires: pkgconfig(appindicator3-0.1) -BuildRequires: pkgconfig(avahi-ui) >= 0.6.30 -BuildRequires: pkgconfig(avahi-ui-gtk3) >= 0.6.30 +BuildRequires: pkgconfig(avahi-ui) +BuildRequires: pkgconfig(avahi-ui-gtk3) BuildRequires: pkgconfig(freerdp2) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(json-glib-1.0) BuildRequires: pkgconfig(libsecret-1) BuildRequires: pkgconfig(libsoup-2.4) -BuildRequires: pkgconfig(libssh) >= 0.6 +BuildRequires: pkgconfig(libssh) BuildRequires: pkgconfig(libvncserver) BuildRequires: pkgconfig(spice-client-gtk-3.0) BuildRequires: pkgconfig(vte-2.91) From 072d6e879c6e994c473ce15c1e0194c779d7aa23 Mon Sep 17 00:00:00 2001 From: Phil Wyett Date: Sun, 27 Feb 2022 10:11:27 +0000 Subject: [PATCH 185/185] Bugfix release 1.4.24-3. --- ...rare_crash_git_2609548e_and_9ed4c438.patch | 39 +++++++++++++++++++ ..._gnome_mediakeys_plugin_git_c901beef.patch | 10 +++++ remmina.spec | 14 +++++-- 3 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 0001_fix_rare_crash_git_2609548e_and_9ed4c438.patch create mode 100644 0002_drop_gnome_mediakeys_plugin_git_c901beef.patch diff --git a/0001_fix_rare_crash_git_2609548e_and_9ed4c438.patch b/0001_fix_rare_crash_git_2609548e_and_9ed4c438.patch new file mode 100644 index 0000000..8fa2598 --- /dev/null +++ b/0001_fix_rare_crash_git_2609548e_and_9ed4c438.patch @@ -0,0 +1,39 @@ +diff --git a/src/rcw.c b/src/rcw.c +index 0c3e591b045d2d06aa1aee1559041aa80edc2542..b750a16cb5d1387b61b1f14be325487f62e45b8a 100644 +--- a/src/rcw.c ++++ b/src/rcw.c +@@ -3399,6 +3399,7 @@ void rco_closewin(RemminaProtocolWidget *gp) + if (cnnobj) { + cnnobj->remmina_file = NULL; + g_free(cnnobj); ++ gp->cnnobj = NULL; + } + + remmina_application_condexit(REMMINA_CONDEXIT_ONDISCONNECT); +diff --git a/src/remmina_protocol_widget.c b/src/remmina_protocol_widget.c +index 7a7fbc44b2a28f5fe18f7409de2772234e17104a..307342009f493787d44f9b5cc34060ac7de4cb1d 100644 +--- a/src/remmina_protocol_widget.c ++++ b/src/remmina_protocol_widget.c +@@ -1519,6 +1519,9 @@ static gboolean remmina_protocol_widget_dialog_mt_setup(gpointer user_data) + RemminaMessagePanel *mp; + const gchar *s; + ++ if (d->gp->cnnobj == NULL) ++ return; ++ + mp = remmina_message_panel_new(); + + if (d->dtype == RPWDT_AUTH) { +diff --git a/src/remmina_protocol_widget.c b/src/remmina_protocol_widget.c +index 307342009f493787d44f9b5cc34060ac7de4cb1d..9a7099c9c631bc3785540ef0fb685e40d7f68da9 100644 +--- a/src/remmina_protocol_widget.c ++++ b/src/remmina_protocol_widget.c +@@ -1520,7 +1520,7 @@ static gboolean remmina_protocol_widget_dialog_mt_setup(gpointer user_data) + const gchar *s; + + if (d->gp->cnnobj == NULL) +- return; ++ return FALSE; + + mp = remmina_message_panel_new(); + diff --git a/0002_drop_gnome_mediakeys_plugin_git_c901beef.patch b/0002_drop_gnome_mediakeys_plugin_git_c901beef.patch new file mode 100644 index 0000000..af52209 --- /dev/null +++ b/0002_drop_gnome_mediakeys_plugin_git_c901beef.patch @@ -0,0 +1,10 @@ +diff --git a/data/desktop/remmina-gnome.session b/data/desktop/remmina-gnome.session +index 15c883aae42c170cbe07f892b20b48c708bf750d..08e43f87d832dc682003204b6fb8bf5f56b31acd 100644 +--- a/data/desktop/remmina-gnome.session ++++ b/data/desktop/remmina-gnome.session +@@ -2,4 +2,4 @@ + + [GNOME Session] + Name=remmina-gnome +-RequiredComponents=org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;remmina-gnome ++RequiredComponents=org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;remmina-gnome diff --git a/remmina.spec b/remmina.spec index 8515dd9..6acd577 100644 --- a/remmina.spec +++ b/remmina.spec @@ -2,7 +2,7 @@ Name: remmina Version: 1.4.24 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Remote Desktop Client License: GPLv2+ and MIT URL: https://remmina.org @@ -20,6 +20,10 @@ ExcludeArch: aarch64 # So we can't use it directly only as instructions. Source1: pluginBuild-CMakeLists.txt +# Patches. +Patch0: 0001_fix_rare_crash_git_2609548e_and_9ed4c438.patch +Patch1: 0002_drop_gnome_mediakeys_plugin_git_c901beef.patch + %if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: cmake %else @@ -203,8 +207,6 @@ that shows up under the display manager session menu. %autosetup -p1 -n Remmina-v%{version}-%{release_commit_hash} %build -mkdir -p build - %if 0%{?fedora} # Workaround for Pango on Fedora 31+. export CFLAGS="%{optflags} -I%{_includedir}/harfbuzz" @@ -230,7 +232,6 @@ export CFLAGS="%{optflags} -std=gnu99" -DWITH_TELEPATHY=OFF \ -DWITH_VTE=ON \ -DWITH_X2GO=ON - %cmake3_build %install @@ -327,6 +328,11 @@ fi %{_mandir}/man1/remmina-gnome.1.* %changelog +* Sun Feb 27 2022 Phil Wyett - 1.4.24-3 +- Add patch: 0001_fix_rare_crash_git_2609548e_and_9ed4c438.patch. +- Add patch: 0002_drop_gnome_mediakeys_plugin_git_c901beef.patch. +- Remove unneeded creation of 'build' folder. + * Sat Feb 12 2022 Phil Wyett - 1.4.24-2 - Remove XDMCP reference from remmina package description. - Remove pyhoca-cli BuildRrequires. Only Requires on x2go now required.